what i have here are two movie clips I made. what happens is the cursor goes over frame one, which goes to frame 2. frame 2 and 3 is an animation of the envelope going up.
my problem is that i can’t get the rollout to work.
also, in frame 3, i have assigned the rollout action to each of the objects, telling them to go to frame 1.
if i put a stop frame script on frame 3, it never works.
if i don’t put a stop frame script, then the rollout will work, but the animation loops forever.
can’t tell for sure without seeing your code, but heres some ideas:
in frame 3 there should be AS code gotoAndStop(1);
this will ‘rewind’ your animation to the beginning, so that it can be triggered again.
if you want to be more flexible, add labels to the frames where your transitions happen, ie instead of gotoAndPlay(2), you would say gotoAndPlay(“open”), which would send the mc to the frame labeled open. then you would have a stop(); in the appropriate frame to keep it open until you mouseOut, which you would label gotoAndPlay(“close”) --you could also add a little closing animation here, if you wish. this method would work with your current setup, as the mouseover would look for the label and not a hard-coded frame, but in general, it’s good practice to have it go back to the first frame and stop. it also has the advantage that you could add frames to your animation without having to change your goTo frame numbers–hope this helps…
-mojo
i’m away from my flash machine, so i can’t look at your file until later, but i can give you some answers to your questions now:
to add a label, go to the frame you want it to be in, and add a keyframe–people tend to put labels on their own layer, or else on the ‘actions’ layer (you should always make a layer called actions that is only for your AS code)
your AS command should be gotoAndStop(1);
i’m thinking your problem may be that your syntax isn’t exactly right–you need to have the capital letters in the right place, or it won’t work–flash will help you figure it out because each time you enter the proper syntax the command will turn blue–if it stays black, something’s wrong and you need to fix your syntax.
hopefully, this will help-i’ll take a look at your file later on, and let you know exactly what your problem is, unless someone else beats me to it! (-:
-mojo
i tried last night, but couldn’t open your file…and now i’m on a machine w. no flash–i’ll just try to spell it out for you here, it shouldn’t be that big of a deal…
so, just to go over the proper structure, you should have an invisible button that is controlling your movie clip, call it 'animMC (maybe this is your problem?)
on the btn you have your rollover actions:
on(rollOver){
animMC.gotoAndPlay(2);
}
on(rollOut){
animMC.gotoAndStop(1);
}
copy and paste that code on your button