Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Button OnRollOut ...



hi,

I started a few days ago with flash and even though i think its going ok...
i also stumbled on some troubles also...
i'm having buttons who start to play a movie on the over state,
when i roll out, the button go's to the original state,
this is where i didn't find the solution ...yet ...! :the movie should just continue playing..and stay on the last framestate of the movie..
like i said , i keep on trying , but maybe someone could give me a hint?
When i was reading about it , i get even more confused, cause the reply with such button actions/questions are often answered with: "u should better use movie clips who act like buttons??"
as u can see , i still have a long way to go.., could use a hint...

thx



KirupaForum > Flash > Flash 8 (and earlier) > Flash MX 2004
Posted on: 02-13-2004, 09:19 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Button.onRollOut
Hi,
I have a target MC controlled by a button. The MC is a simple fade in fade out. I want to control the MC via a RollOver RollOut function.
Here's how the script looks:
button01.onRollOver = function() {
gallery.play();
};
button01.onRollOut = function() {
gallery.play(15);
};

The problem I'm having is that when I roll the mouse out sometimes the MC will get stuck (i.e. wont go to frame 15) where the fading begins.

Any ideas??
Thx in advance.

Button OnRollOut ...
hi,

I started a few days ago with flash and even though i think its going ok...
i also stumbled on some troubles also...
i'm having buttons who start to play a movie on the over state,
when i roll out, the button go's to the original state,
this is where i didn't find the solution ...yet ...! :the movie should just continue playing..and stay on the last framestate of the movie..
like i said , i keep on trying , but maybe someone could give me a hint?
When i was reading about it , i get even more confused, cause the reply with such button actions/questions are often answered with: "u should better use movie clips who act like buttons??"
as u can see , i still have a long way to go.., could use a hint...

thx

[F8] OnRollOut Button Overlapping Other Button Causes Problem
Okay, I have an "Exit" button on top of an expanding ad I'm creating that has the following AS:code: on(rollOut) {
stopAllSounds();
_root.collapse();
gotoAndStop("Scene 2", 1);
}

//MOTIF TRACKABLE CODE BEGINS
//Note: Don't edit this section. Please put your code before 'MOTIF CODE' section
on(release) {
_root.conduit.exit(2);
_root.collapse();
}

//MOTIF TRACKABLE CODE ENDS

on(release) {
getURL (clickTAG, "_blank");
stopAllSounds();
}So basically when the mouse rolls out of the button area, it stops all sounds, collapses the ad, and brings it to frame 1. When you click on the ad, it will stop all sounds and open up a webpage. Makes sense.

But I have a Sound On/Off button I created that has to sit within this area. Anytime the mouse hovers the Sound On/Off button, the ad does exactly what that actionscript says to do.

Is there a way I can tell it to do that rollout EXCEPT when going over the Sound On/Off button?

Onrollout Button Not Working
I have a button in a movie i just made that when you rollout it does doReverse but it ignores the stop AS in my frames.

heres the link

[F8] OnRollOut Only To The Sides Of A Button?
Hello,

i'm kinda new with Flash and i'm trying to work out a popup-menu.
I've been at it for over two months and it still doesn't work properly.
Last sunday i got, so to say, a revelation: i've been using buttons in buttons, and all of the sudden i figured out i should be entering each button with it's own popup in a separate frame.
It's actually quite simple (oh yes, now it is!).

But i still got one hurd to overtake.
When i move the cursor over the fist popup-button, my popup-balloons popup , like intended and when i move it sideways over to the next button, the ballons just stay put.
So i first have to go over the invisible button-area en roll out before they disapear and i can open a new popup and so on...

Is it possible for me to make some kind of 'onRollOut' for only the left and right sides of the main buttons?

If anyone has a clue how to do this or if you got another solution, your welcome.

Marcel.

How Do I Animate A OnRollout Of A Button?
Im sure this is simple, but here goes...

I have a button. when you roll over it, it rises up about 20 pixels. (very clean animation. It's actually a _mc i put in the over state of the button.

I want to create the reverse effect when you roll out of the button.

How?

here is a link to see what I mean....

www.zunskigraphics.com/KARIZMA/index.html Click on Home

please help, this has been a stump for me since i started working with flash.

thanks
ZG

Need A OnRollOut When You Press On Another Button
Hello,
Im going to do a menu on the left side of my site and I want the buttons to fade when you hold over them and then fade out when you leave them and when you click on the menu I want a new window to come out. I have done this but When you leave the button the new window disappear I think I can fix this but heres the big problem:

I want the window to go back (not only disappear at once) when you click on another button..

But I have no idea what action script I need to use to do this.. If anyone know a tutorial or can explane how to do this I would be very glad

Add OnrollOut Function In A Button
Hi all,
i have created a 5th frame inside a button (with a movie clip in it) for my OnRollOut function.

But i dont know where to put the action script for read my 5th frame when my mouth roll out the button.

my action script look like.

on (rollout) {
gotoandplay (5) ; <--- "for the 5th frame"
}

but i doesnt play my mc animation.
Thanks for any helps.

Button.onRollOut And OnRollOver
Here's the code:


Code:
theBackground.onRollOver = function () {
Mouse.hide();
startSight();

};
theBackground.onRollOut = function(){
trace("theBackground.onRollOut called");
delete theSight.onEnterFrame;
stopDrag();
theSight._visible = false;
Mouse.show();
}
where theBackground is a button that covers the whole movie.

here's my problem:

I can leave the mouse sitting over it and the rollOver and rollOut functions get called repeatedly which results in an ugly "blinking" effect with my custom pointer.

Why do they called repeatedly and how do I stop the damn thing?

Movie_mc.onRollOut Acting Like A Button?
So I've got a movie clip that contains a menu list that I want the user to scroll, select, and all that jazz. However, if they roll out of the mc, I want the movie clip to go away. The clip work absolute perfect until I add the following


Code:
chapMenu_mc.onRollOut = chapMenu_mc.end();
chapMenu_mc.end(), among other things, sets chapMenu_mc._visible = false.

The minute I add the above line, chapMenu_mc stops behaving like a movie clip and starts acting like a button. It switches the cursor to the click hand and won't let me interact with the list inside the mc.

What gives? and how do I get it to behave properly?

OnRollOut On The Left Or Right Side Of A Button Only?
Hello,

i'm kinda new with Flash and i'm trying to work out a popup-menu.
I've been at it for over two months and it still doesn't work properly.
Last sunday i got, so to say, a revelation: i've been using buttons in buttons, and all of the sudden i figured out i should be entering each button with it's own popup in a separate frame.
It's actually quite simple (oh yes, now it is!).

But i still got one hurd to overtake.
When i move the cursor over the fist popup-button, my popup-balloons popup , like intended and when i move it sideways over to the next button, the ballons just stay put.
So i first have to go over the invisible button-area en roll out before they disapear and i can open a new popup and so on...

Is it possible for me to make some kind of 'onRollOut' for only the left and right sides of the main buttons?

If anyone has a clue how to do this or if you got another solution, your welcome.

My .fla-file can be found here:
http://www.serelsnauw.nl/users/marcel/balloon-menu.rar

Marcel.

[CS3] OnRollOut Function / Button State Sticking
I have an issue that has been plagueing me all morning. I've searched and searched on google, here, other flash help sites, and even though I've seen a couple people with related problems, no solutions have seemed to tailor to my project.

I am working with a series of invisible buttons that perform actions on a movie clip and a text field to simulate the rollover. However, I'm finding there is a problem with the rollout. When you move your mouse over the buttons quickly, they often seem to ignore the rollout command and stay on the rollover state.

Warning to anyone downloading the zip is that I'm utilizing mc_tween. However, I created this same scenario a couple weeks ago (lost my work from a faulty drive, and I'm redoing it now), and I had no issues. Obviously, my code ended up slightly different in the rebuilding of this thing, but this side effect is really holding me back.

If anybody has any suggestions, that'd be wonderful. Thanks.

Onrollout Of Button, Disable Mouse Click
I have a button
on(rollOut)
{
trace("You rollded out");
}
There are many more buttons beside this button. What I want is the moment he rolls out of this button, mouse/cursor should be disabled(although visible) so that he is not able to do anything with other buttons.
There are lots of buttons so I cant use btn.enabled=false
Possible?
Thanks

OnRollOut Function / Button State Sticking
I have an issue that has been plagueing me all morning. I've searched and searched on google, here, other flash help sites, and even though I've seen a couple people with related problems, no solutions have seemed to tailor to my project.

I am working with a series of invisible buttons that perform actions on a movie clip and a text field to simulate the rollover. However, I'm finding there is a problem with the rollout. When you move your mouse over the buttons quickly, they often seem to ignore the rollout command and stay on the rollover state.

Warning to anyone downloading the zip is that I'm utilizing mc_tween. However, I created this same scenario a couple weeks ago (lost my work from a faulty drive, and I'm redoing it now), and I had no issues. Obviously, my code ended up slightly different in the rebuilding of this thing, but this side effect is really holding me back.

If anybody has any suggestions, that'd be wonderful. Thanks.

OnRollover OnRollout, Cursor Staying On Button
I have an image that will double as a button to make it larger if you click it.
on the rollovers I have a plus and minus sign depending on which size the image is currently.

if you click the image and it gets larger the cursor will probably still be on the image. Therefore the minus_mc won't play until you move your cursor off then back on the image. How can I have the rollover refresh without having the cursor move off of the image?

BUTTON In MC DropDown-MENU Wont Work With OnRollOut Function
Please see the attached file to see the problem I am having with the button inside of the Movie Clip. The button bContactUs wont work if I have...

mcButtons.onRollOut = function() {

mcButtons.onEnterFrame = function() {
this.slideClip( 1, 10, 3);
this.signal = 0;
};

}

And if I comment this block, then the button works fine, but then the the DropDown Menu wont retrieve itself back.

Any Help is appreciated.

Renatopia

Creating Onrollover / Onrollout Button That Plays Its Full ONanimation When Touched
Hey all,

On most of my option MC's I have something like:

this.onRollOver = function(){
this.gotoAndPlay("onanim")
}
this.onRollOut = function(){
this.gotoAndPlay("offanim")
}

Obviousy if you quickly roll on and then off the MC the animation is staggergy and not a fluid animation.

I would like to set it so that everytime you touch/roll on the option MC it will always play its full on animation right, then it will go to the off animation.

I believe you can incorporate onenterframe object to achive this. Could someone please show me a good solution.

Any help would be great.

Button On A Button... OnRollOut...
Hi,

I would like to know if there is any way to control two buttons, which the one is bigger and at the back, the other one is smaller and on the front. I would like to change a variable when only both of them are rolled out. But when I rollover to the smaller button the back button thinks it is rolled out for itself. I tried to control them with other variables but I could not manage it...

The example .swf and the .fla can be seen here.

http://www.gagaku.org/question/flash/button.fla
http://www.gagaku.org/question/flash/button.swf

When mouse is over the small square it is supposed to be on the big square as well...

Thank you.

OnRollOut
I have a problem with onRollOut on a movieclip.
I have a web page that use frame. One for the Flash menu and one for the HTML. When I RollOver I want my menu to have a different color and I want it to come back at normal when I RollOut so I use this :

this.onRollOver = function(){
gotoAndStop(2);
}

this.onRollOut = function(){
gotoAndStop(1);
}

This work well until I RollOut of my menu and also RollOut of the Flash Frame. My mouse cursor is in the HTML frame and one of my menu still have a different color.

I'd like to know, is there a way to check if the mouse is Over a MovieClip every second of anything like that?

Is there anybody who can help me with that?

OnRollOut Ignored?
Hi, I've got a little problem with a menu that I created.
The Menu has 6 Buttons. Each button is an instance of the same symbol.
I put this code :


Code:
var coeff=2;
//var Frame=0;
var Alpha=0;

this.onRollOver=function()
{
Lighten();
}

this.onRollOut=function()
{
Darken();
}


function SetAlpha()
{
//Frame++;
/*trace("vvvvv");
trace(PictoHome_mc._alpha);
trace(Alpha);
trace(Frame);
trace("^^^^^");*/
Alpha+=coeff;
if(Alpha>100||Alpha<0)
{
if(Alpha>100)
{
Alpha=100;
coeff=-2;
clearInterval(Lightening);
}
else
{
Alpha=0;
coeff=2;
clearInterval(Darkening);
}
//Frame=0;


//return;
}
Titre_mc._x=(Alpha/100)*20+10
Picto_mc._alpha=Alpha;

}

function Lighten()
{
clearInterval(Darkening);
clearInterval(Lightening);
coeff=2;
trace("Depart du Lighten, alpha actuel : "+Picto_mc._alpha);
Lightening=setInterval(SetAlpha,2)
}

function Darken()
{
trace("Depart du Darken, alpha actuel : "+Picto_mc._alpha);
clearInterval(Lightening);
clearInterval(Darkening);
coeff=-2;
Darkening=setInterval(SetAlpha,2)
}

function SetPicto(Id)
{

Picto_mc.Symbols_mc._x=-(Id*24)
trace(Picto_mc.Symbols_mc._x);

}

function SetTitle(Title)
{
Titre_mc.text=Title;
}

You can see the swf here :

http://www.ahhohh.com/Flash

thanks!!

Mc.onRollOut
I've a new problem...
I have a movieclip that shows an animation onRollOver and an animation on RollOut but onRelease the animation enlarge itselfs but now when I'll roll out when the animation isn't open (so i didn't release) the animation plays the animation for the minimizing of the animation.

Here's my code (I know its a bit amateuristic but I'm not a programmer )

sEt = the name of the mc
oPEN = the label in the mc to enlarge
cLOSE = the label to minimize the mc
and oUT = the label to rollOut when the mc isn't maximised


Code:
if(sET = oPEN) {
sET.onRollOut = function() {
this.gotoAndPlay('cLOSE');
}
} else {
sET.onRollOut = function() {
this.gotoAndPlay('oUT');
}
}
I hope sombody can fix this

Jakke

Onrollout Mc
Hello and thank you ahead of time for any help.
I wish to create a site navigation system similar to the one found on www.jboogie.com

Heres what I have done:
I created a buttons, however as symbols they are movie clips as I tend to use movie clips for functionality over buttons. I then created my box drop animation(box_mc)
I plugged in this actionscript to the maintimeline

button.onRollOver = function(){
box_mc.gotoAndPlay(suchandsuch);
};
box1.useHandCursor=false;
box_mc.onRollOut = function(){
box_mc.gotoAndPlay(suchandsuch);
};

And this pretty much works except in order for the box_mc to 'rewind' I have to take the cursor out of it then back in then out again. I wish to make an if statement that says if the user takes the cursor out of box_mc then the mc will gotoAndPlay a specific frame. All the if statements I have tried have been complete failures. If someone could please give me some suggestions. Perhaps I am going about this project completely wrong.
thanks again for any help-
-werther

Mc.onRollOut
I've a new problem...
I have a movieclip that shows an animation onRollOver and an animation on RollOut but onRelease the animation enlarge itselfs but now when I'll roll out when the animation isn't open (so i didn't release) the animation plays the animation for the minimizing of the animation.

Here's my code (I know its a bit amateuristic but I'm not a programmer )

sEt = the name of the mc
oPEN = the label in the mc to enlarge
cLOSE = the label to minimize the mc
and oUT = the label to rollOut when the mc isn't maximised


Code:
if(sET = oPEN) {
sET.onRollOut = function() {
this.gotoAndPlay('cLOSE');
}
} else {
sET.onRollOut = function() {
this.gotoAndPlay('oUT');
}
}
I hope sombody can fix this

Jakke

OnRollOut
k, this is what i need to have happen.. I rollOver a button and it plays a movie sliding a label to the stage, then the mouse roles off the button and the label slides back.. I have the label animation as two seperate movies, the rollIN movie and the rollOut movie..I have the rollIN movie attached to the over frame of the button, in its own layer of course..how do i code the rollOUT animation.. oh gods of ultrashock *holy HUMMMMMMMMMM sound*..

OnRollOut Problem
I dont know how to do the idea of playing a movie when the mouse rolls out of the mouse.Where do i place the movie?

OnRollOut Problem
Please see the attached file to see the problem I am having with the button inside of the Movie Clip. The button bContactUs wont work if I have...

mcButtons.onRollOut = function() {

mcButtons.onEnterFrame = function() {
this.slideClip( 1, 10, 3);
this.signal = 0;
};

}

And if I comment this block, then the button works fine, but then the the DropDown Menu wont retrieve itself back.

Any Help is appreciated.

Renatopia

OnRollOut Of A Movieclip
I have a blue box that follows the mouse when I scroll inside the movie window.

I want this blue box to slide all the way to the right and out of the view when the mouse is scrolled out of the movie window.

[F8] OnRollOut Not Registering
The best way I know how to explain my problem is to show it. Go to www.wandohigh.com/index_test.html and you will see a big main flash movie smack in the middle of the page. There are dropdown menus, blah blah.

Direct your attention to the far left drop down menu. It's the one that says "Families." Well once it's dropped down, roll your mouse out of it to the left, so that your mouse leaves the flash object. Apparently the mouse leaves the flash object too fast and flash never registers that there was a rollout, therefore never dispatching an onRollOut event, which is required to have the dropdown menu disapear! Ahh!

Does anybody know how I can fix this?

Thanks!
feigner

OnRollOut And OnDragOut
mcMyBtn.onRollOut = function():Void {
myFunction();
}
mcMyBtn.onDragOut = function():Void {
myFunction();
}

How do I type it in just one function? Tried everything that came to my mind in different combinations but no luck…

Where To Put .onRollOut Command
Can anyone give me an example of where to put this command? Is it within the button on the 'over' state?

I know this is very basic stuff, any help would be appreciated. I have looked in tutorials and can't find an example...

OnRollOut Problem
obviously when you rollOut of a button it will trigger an event.

but, when you roll out the stage, or loose focus of the entire embedded swf, then the onRollOut event does not trigger. is there a way to trigger a roll out of the stage?

if it can't be done with actionscript, then can javascript detect when you've rolled out of the swf? (so i can trigger an event in AS)

thanks

OnRollOut Delay
I've been trying for three days now to get a 5 second delay on RollOut... can anyone tell me where I'm going wrong. When I run the script it behaves as is the if, else statements are not even there!?!

Thanks

G

ActionScript Code:
onClipEvent(load)
{
    dir = 0;
    speed = 3;
    original._alpha = 100;

    this.onRollOver = function()
    {
        dir = -1;
    }
    this.onRollOut = function()
    {
        if (getTimer() <= getTimer() + 5000)
            {
            dir = -1;
            }
            else (getTimer() > getTimer() + 5000)
            {
            dir = 1;
            }
}
    useHandCursor = false;
}
onClipEvent(enterFrame)
{

    temp = BW._alpha + speed*dir;
    BW._alpha = Math.min(100,Math.max(temp,0));
   
}

OnRollOut/Over Issue
Hello,
I am creating a piece that onRollOver, calls a funct to switch from inactive to active, which is really just playing an animation, and onRollOut calls a funct to switch back to inactive, again another animation. Once active, a navigation, left/right btns, exists which does a few simple things. Everything works well, except the rollover/out.

My first attempt, I used an invisible btn that would call the functions, but when the user was in the active state and moved from the invisible btn and rolled over the nav btns ontop of the invisible btn, the inactive function would be called. So, I went another route. Currently, I have it setup so that it dynamically draws a rectangle defining a hit area. Then using a mouse listener, it checks to see if the the mouse enters or exits the rect area. If it enters, call active function, on exit, deactivate function called. This works, save one issue. The problem is that if you mouse out of the swf quickly and back the the html part of the page, the swf does not register that you left the hit area. I believe that it is due to the fact the non-hit area on the left/right sides are very thin and if you move too fast past those thin areas, the swf doesn’t register the entry into the non-hit area and the inactive function never gets called. Makeing the thin areas wider isnt an option due to the page design.

I am looking for a fix on this method or another method that can call function onRollOver/Out, but still allows for a nav with in a nav.

Here is the bit of code that creates the hit area and the calls the functions:

Code:
this.createEmptyMovieClip("theField", 1);
theField.beginFill(0xFF0000, 0);
theField.moveTo(5, 18);
theField.lineTo(202, 18);
theField.lineTo(202, 203);
theField.lineTo(5, 203);
theField.lineTo(5, 18);
theField.endFill();
//
var rect_obj:Object = theField.getRect(this);
var mouseListener:Object = new Object();
mouseListener.onMouseMove = function() {
if ((_xmouse>rect_obj.xMin && _xmouse<rect_obj.xMax) && (_ymouse>rect_obj.xMin && _ymouse<rect_obj.xMax)) {
clearInterval(intervalId2);
clearInterval(intervalId3);
showMeBox();
insideBox = true;
//trace("inside of box");
} else {
if (insideBox) {
//trace("outside of box");
hideMe();
insideBox = false;
}
}
};
//
Mouse.addListener(mouseListener);
any ideas?

Thanks,
JO

OnRollout Question
Hey guys i have a MC(out_btn) on stage that spans the whole stage and i placed the AS below in one of my frames. I also have another MC(close_btn) that is a button that when pressed i want the timeline to jump back to the first frame("start"). The problem is that MC(close_btn) is sitting on top of MC(out_btn) and when i even rollover MC(close_btn) the timeline jumps back to the first frame because i guess this technically means i've rolled out of MC(out_btn). What should i do to solve this?




Code:
this.out_btn.onRollOut=function(){
gotoAndPlay("start");
}
this.close_btn.onPress=function(){
gotoAndPlay("start");
}

Help OnRollover/onRollout
I am having trouble with my movie clip rollover/rollout animation. What i want is simple. I would like when rolled over the "about button" for the about animation to play and when roll out, for the about rollout animation to play. Once i get help with this i will animate the other buttons.

i have attached my fla.

Please explain what im doing wrong and feel free to edit the fla for me.

OnRollOut Problem
I am trying to create a menu right now that has 6 buttons side by side horizontally.

Each button has an action

on(rollOver){
nextpage = "buttonname"
over();
}
on(rollOut){
out();
}



The problem I am having is, I only want the rollOut to happen when you rollout of all buttons, and not just a single button.

Is there a good way to have the out(); function I am calling to only happen when you roll off all the buttons, without using the big button outside of all other buttons method (this is not possible as the movieclip which these buttons are housed is masked with a dynamic sized mask)?



This is very important to the site because I am making a menu in which the animation for the button which you are currently on cannot happen until the current buttons closing animation has finished.


Any help is appriciated.

OnRollOut Not Working
Did this

stop();
function desc(target_mc:MovieClip):Void {
target_mc.onRollOver = function():Void {
this.gotoAndStop(target_mc);
}
target_mc.onRollOut = function():Void {
this.gotoAndStop(1);

}

desc(web01);

but the onrollout isn't working... the only thing changing between frames is a text in a static text box..

OnRollOver And OnRollOut
Hey,

Im trying to create a menu similiar to the one used here
http://www.jazzcafeposk.co.uk/index-en.html

I dont really use flash and so far i have got the menu to glide in from the left. But if you look at this example. When you take the mouse OFF it instantly performs the RollOut movieclip.

On mine, when you take the mouse off. it continues playing the rolling in clip and then dissapears(or stays depending if i have "stop(); in place)

The rolling out will not play unless the rolling in clip is complete.
Here is the file i have been working with and the code.


ActionScript Code:
in_mc.onRollOver = function()
{
    this.play();
};

in_mc.onRollOut = function()
{
     this.Play(11);
};

I would like it to play from frame (11) as soon as the mouse leaves the clip area.

Many thanks for your help.

OnRollOut And OnReleaseOutside
While I was writing this question, It occurred to me that I could try my occurrence before posting, and It turned out true. so I'll share my "discovery" with all of you who doesn't know this.

You can use something like this:


ActionScript Code:
asdf.onRollOut = asdf.onReleaseOutside = function () {
to duplicate the script in various event handlers...

as an anecdote, I leave the incomplete (and a bit redundant) question:
simple question...
is there a way to "duplicate" the onRollOut and onReleaseOutside so the execute the same script, without using a function?
example, something like this:

ActionScript Code:
asdf.onRollOut = asdf.onReleaseOutside = function () {
asdfasdfasdf
}

OnRollOut And OnRelease
How would you get a scroll button to stop scrolling if the mouse is either released or it's moved away from the button? Currently I have an onRelease and an onRollOut but the onRollOut doesn't seem to take affect if the mouse is being held down and it's moved away from the button.

OnRollOver, OnRollOut
I have some movie clips I am using as buttons. They all have the same animation:
They consist of one layer which blurs a text through 16 frames (white text), and then blurs the same text in a different color(pink text) from frame 17-32. The layer below fades in duplicate text of opposite color(pink under white, white under pink), from frame 1-16, and frame 17-32. There is a stop at keyframe 1 and keyframe 16.

Here is the actionscript:

_root.home_btn.onRollOver = function() {
_root.home.gotoAndPlay(2);
}
_root.home_btn.onRollOut = function() {
_root.home.gotoAndPlay(17);
}


_root.models.onRollOver = function() {
_root.models.gotoAndPlay(2);
}
_root.models.onRollOut = function() {
_root.models.gotoAndPlay(17);
}


_root.apply.onRollOver = function() {
_root.apply.gotoAndPlay(2);
}
_root.apply.onRollOut = function() {
_root.apply.gotoAndPlay(17);
}


_root.special.onRollOver = function() {
_root.special.gotoAndPlay(2);
}
_root.special.onRollOut = function() {
_root.special.gotoAndPlay(17);
}


_root.contact.onRollOver = function() {
_root.contact.gotoAndPlay(2);
}
_root.contact.onRollOut = function() {
_root.contact.gotoAndPlay(17);
}


If I roll over, the text blurs from white to reveal pink underneath, if I roll out the text blurs from pink to reveal white. The problem is if I roll over or out too quick, the text stays pink, never plays the roll out animation and doesn't fade back to white.

Whats the problem?

Here is a link to test it.

http://www.south-beachmodels.com/links.swf

OnRollOver, OnRollOut
I have some movie clips I am using as buttons. They all have the same animation:
They consist of one layer which blurs a text through 16 frames (white text), and then blurs the same text in a different color(pink text) from frame 17-32. The layer below fades in duplicate text of opposite color(pink under white, white under pink), from frame 1-16, and frame 17-32. There is a stop at keyframe 1 and keyframe 16.

Here is the actionscript:

_root.home_btn.onRollOver = function() {
_root.home.gotoAndPlay(2);
}
_root.home_btn.onRollOut = function() {
_root.home.gotoAndPlay(17);
}


_root.models.onRollOver = function() {
_root.models.gotoAndPlay(2);
}
_root.models.onRollOut = function() {
_root.models.gotoAndPlay(17);
}


_root.apply.onRollOver = function() {
_root.apply.gotoAndPlay(2);
}
_root.apply.onRollOut = function() {
_root.apply.gotoAndPlay(17);
}


_root.special.onRollOver = function() {
_root.special.gotoAndPlay(2);
}
_root.special.onRollOut = function() {
_root.special.gotoAndPlay(17);
}


_root.contact.onRollOver = function() {
_root.contact.gotoAndPlay(2);
}
_root.contact.onRollOut = function() {
_root.contact.gotoAndPlay(17);
}


If I roll over, the text blurs from white to reveal pink underneath, if I roll out the text blurs from pink to reveal white. The problem is if I roll over or out too quick, the text stays pink, never plays the roll out animation and doesn't fade back to white.

Whats the problem?

Here is a link to test it.

http://www.south-beachmodels.com/links.swf

OnRollOut Problem
Hey all,

I've made a button_mc with an "_off" , "_over" and "_out" state (works fine)
I've also made the onRelease state gotoAndPlay("_out") state as well so when clicked
it doesn't just jump back to the off state looking jerky but a little more smooth.

Problem is when I rollOut of the button_mc it after "clicking" the button it jumps to the "_out" state again.
I want to put an if () statement in the onRollOut function but don't know how to
code it. Here is my first try but I dont' know what would be the correct coding for it.

Thanks for any ideas,
sky







Attach Code

button_mc.onRollOut = function () {
if(button_mc.gotoAndPlay("_out") == true){
// do nothing
}else{
button_mc.gotoAndPlay("_out");
}
};

//another try was

button_mc.onRollOut = function () {
if(this.onRelease = true){
// do nothing
}else{
button_mc.gotoAndPlay("_out");
}
}

Using OnRollout In XML Menus
I'm working on a XML menu similar to the one in this tutorial:

http://www.kirupa.com/developer/acti...pdown_menu.htm

I noticed that the submenus won't disappear when the mouse isn't on them unless the mouse button is pressed (onMouseUp). I tried modifying the Actionscript to correct this problem, but I can't get it to work. How do you fix this problem?

Is there a way you could use something like...

Pseudocode:
if(mouse arrow is visible)
CloseSubmenus()

Invisible OnRollOut..
Hey there..

I've got a little controlpanel with 5 buttons inside - everything inside a movieclip.

I launch my controlpanel with: controlpanel._visible = true;

When the user presses one of the buttons inside the panel, an action is launched and the visibility is set to false again - but I would also like it to turn invisible if the user just rollOut of the panel instead.

How can this be done - I've been messing around with some hitTest, but no luck..

Navigation OnRollOut
Good eve,

I got this .fla, its a horizontal navigation and its works fine, i even included an xml link to it...

now, the problem is the onRollOut function.. its not working properly, when you mouse over to the MC, it works fine but when you move your mouse a bit faster the navigation will not work properly and it will play what the last action it has taken.. kindly see attached .fla to check the problem..

Download .fla here

hope you can help me with this...

thanks and regards,

OnRollOver & OnRollOut On MC
Hi, I am new to action script and here is my problem, please take a look at my attached test file.

I have a main movie clip on the stage, and 3 sub movie clips are inside this main mc. I want to do some action on the onRollOver and onRollOut on the main mc, i got that working with no problem. In those 3 sub mc, i have the on(Release) script on each of these sub mc to do some action.

However, If I use the onRollOver and onRollOut on the main mc, the on(release) in those 3 sub mc will not execute. Is there any other way to accomplish this? Thank you for any help.

OnRollOut Issues
I have attached a sample fla as n0t sure how clear i will explain this...

The layout of my file is:

th1(main movie clip)
--items(hidden movie clip inside th1)
----th1Sub(menu items inside items)
----th2Sub
----th3Sub

Basically what i am trying to do is when the movie loads "items" will be hidden, when the user rolls over "th1" then "items" will become visible.

then when the user rolls over each sub item they will have onRollOver, onRelease, onRollOut functions.

Now I seem to be able to get this all working fine untill I try and put an onRollOut function on "th1". When i do this as soon as the user scrolls over "items" it then disappears as it is calling the "th1" onRollOut function.

Any ideas on what I could be doing to stop this? There will be more than main movie clip, ie th1, th2 th3 but just trying to get the functionality working on th1 first then will be asily to implement on the others

If this is not very clear the attached fla has the basic setup in it for you to look at.

any advice or guidance would be greatly appreciated.

Problem OnRollOut
I have a simple scroller that scrolls up or down as the user moves their mouse. The problem is that when you RollOut the scroller keeps moving. I can't figure out how to put a onRollOut function that will stop the scroll upon RollOut. Can you help?

years.onRollOver = yearsOver;


function yearsOver() {
this.onEnterFrame = yearsPanel;
delete this.onRollOver;
}


function yearsPanel() {
if (_xmouse<b.xMin || _xmouse>b.xMax || _ymouse<b.yMin || _ymouse>b.yMax) {
this.onRollOver = yearsOver;
delete this.onEnterFrame;
}
if (years._y >= 80) {
years._y = 80;
}
if (years._y <= -90) {
years._y = -90;
}
var ydist = _ymouse -170;
years._y += Math.round(-ydist/7);
}

var b = stroke.getBounds(_root);

Copyright © 2005-08 www.BigResource.com, All rights reserved