Topic: Continuing animation (Flash MX) (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=11396" title="Pages that link to Topic: Continuing animation (Flash MX) (Page 1 of 1)" rel="nofollow" >Topic: Continuing animation (Flash MX) <span class="small">(Page 1 of 1)</span>\

 
FlagMan
Bipolar (III) Inmate

From: Calgary Alberta Canada
Insane since: Dec 2002

posted posted 02-26-2003 05:17

Maybe I am going about this all wrong, but what I want is an image that shrinks and fades when you move your mouse voer, then does not appear again after the animation had finished. That is the easy part, what I am stuck on is that I want it to continue animating after I move my mouse off until it's finished. Maybe I am going about this all wrong, but I made the image (just using a plain circle now to test) then made it into a button, inserted a keyframe under "over" then changed that image to a movie clip, and animated the clip. I have seen it doen before, so I am 100% sure it can be done, but I don't know how. I hope it's clear what I am trying to do, I will continue to test things, and post again if I have any luck.

FlagMan
Bipolar (III) Inmate

From: Calgary Alberta Canada
Insane since: Dec 2002

posted posted 02-26-2003 05:32

K, I got it to continue like this:
I have a movie clip of the circle shrinking. The first frame stops the movie, and on mouseover the little image of the circle (now a button) goes to frame 2, which starts the sequence, and then loops. The new problem is, as long as your mouse is over the image, it will loop infinately...I will probably have to use some variables so it doesn't start the animation unless your mouse has been out of the circle since the last animation...I will go try that now and post whether or not it works. I might have to post tomorrow, I have to go to bed soon (school tomorrow).

FlagMan
Bipolar (III) Inmate

From: Calgary Alberta Canada
Insane since: Dec 2002

posted posted 02-26-2003 05:44

What I want is so after you rollover the circle, it sets the variable so the movie won't repeat, then plays the movie. You would then have to rollover the box to reset the variable so you could play the animation again, the problem is heither of them work Could somebody please tell me what is wrong with my code, I haven't been using flash very much, and am lacking in actionscript skills, TH@NX

BTW, I have dried "Debug-->List Variables," but the variable isn't in there. The best guess I have of why it's not working is either A. I am an idiot and coded something stupidly wrong, or B. I have to create the variable with a different command before I can set it.

So far, just for testing the box (a button) has the script

code:
on (rollOver) {
test1 = "no";
}


The circle movie has the code

code:
on (rollOver) {
if (test1 = "no") {
test1 = "yes";
gotoAndPlay(2);
}
}



Fig
Paranoid (IV) Mad Scientist

From: Houston, TX, USA
Insane since: Apr 2000

posted posted 02-26-2003 10:19

try making your code read something like

code:
on (rollOver) {	
if (test1 == "no") {
test1 = "yes";
gotoAndPlay(2);
}
}



i think you're accidentally setting test1 = no rather than comparing it with your current code. if this doesn't work i'll look at it again in the morning after i've slept

chris

p.s. i also wrote a tute here that's sorta along the lines of what you're doing, might help.

[This message has been edited by Fig (edited 02-26-2003).]

Steve
Maniac (V) Inmate

From: Boston, MA, USA
Insane since: Apr 2000

posted posted 02-27-2003 02:19
quote:
then does not appear again after the animation had finished



Never, ever again? Then I think you need to remove the movie clip. If it shrinks and fades to nothing on mouse over, it's still there - nothing to prevent another on mouse over event from firing again.

Are you developing in MX? It seems to me you could do this with a movie clip and not a button symbol. The ActionScript would tell the movie clip to reduce its _xscale, _yscale and _alpha, and when they get to around 3% just remove itself:
this.removeMovieClip

Haven't tried it, but it's just a thought.

FlagMan
Bipolar (III) Inmate

From: Calgary Alberta Canada
Insane since: Dec 2002

posted posted 03-03-2003 01:49

Actually, that is kinda missleading, as explained (crappily) in later posts, I wanted it to animate again, but only if you have moved your mouse out of the button.

CPrompt
Maniac (V) Inmate

From: there...no..there.....
Insane since: May 2001

posted posted 03-03-2003 21:28

As I am just new to Flash, I am going to take a stab at this.

Fig's tut is what you need but you are going to have to expand on it some for the MouseOut. Check out some stuff on Action Script and "Tell Target".
You can also use "SetProperty" for this. Actually, SetProperty may be your best bet. I have found it a little easier to work with.

Do a Google search for SetProperty in Action Script.

Later,

C:\


~Binary is best~

[This message has been edited by CPrompt (edited 03-03-2003).]



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu