FMX, newbie poster with newbie question

You can see what I’m talking about at

http://www.frogg609.com/nicelinesdev/button.html

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.

any help for a newbie?

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

2 things,

  1. where do you add labels to frames?

  2. the only code i have is as follows:

on frame 1 i have a general script that says STOP

I also have on rollover go to and play 2
on rollout go to and play 1

on frame 2 there is no action scripting whatsoever.

on frame 2 each piece of the envelope has :
onRollout go to and stop 1

i tried putting a script for that frame that says go to and stop 1 but it doesn’t work properly.

enclosed is the FLA for you to se what i’m doing wrong, and thanks for the help.

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

just wondering if you have gotten a chance to look at it yet.

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

inside of '‘animMC’ should be this code:

frame1: stop();
frame2-4: //animation frames
frame5: stop();

also, if you have any other code that’s affecting animMC, use ‘//’ to comment it out so it doesn’t interfere

that’s all there is to it–try this and let me know if it works…
-mojo

well i tried adding that.

my output screen gets this

Scene=Scene 1, Layer=animMC, Frame=1: Line 1: ‘;’ expected
frame1: stop();

i made animmc a square and assigned this to it.

frame1: stop();
frame2-4: //animation frames
frame5: stop();

which is assgined across all frames

now my movie is only three frames, so the frame 5 thing confuses me.

now i have two buttons in two seperate frames.
in frame one i have the closed envelope which is a movie clip.
this script is assigned to it:

on(rollOver){
animMC.gotoAndPlay(2);
}
on(rollOut){
animMC.gotoAndStop(1);
}

in this frame i also have a global AS which is stop, else the movie doesn’t ever stop looping.

frame two is of the envelope opening, and there is no scripting on this frame at all

frame 3 is of the card out of the envelope.
i put this script

on(rollOver){
animMC.gotoAndPlay(2);
}
on(rollOut){
animMC.gotoAndStop(1);
}

on the card, but i don’t think that’s right.

sorry about all this but thanks for the help.

nevermind, figured it out finally. thanks for all the help.