PDA

View Full Version : Actionscript help


lovinlazio9
07-24-2004, 08:25 PM
:mad: I made a simple motion tween (see it at www.Dannyk.us (http://www.dannyk.us) ) and I was wondering how i could just make it work on a rollover of the mouse so its just not continuously playing? I tried forever to work with action scirpt adding all sorts of stuff.....AND IT FRUSTRATED ME because none of it worked...any help please...

Michele Holland
07-25-2004, 01:14 AM
have you tried to put this mc ontop of the over state of a button symbol?

Dr Warm
07-25-2004, 08:54 AM
in the first frame inside the mc put stop();
then in the main stage click on the mc and press F9 then write
on(rollOver){
play():
}
then it will play when you go over it, r u sure you've made it a movie clip, not graphic/button?

lovinlazio9
07-25-2004, 11:23 AM
I tried what you said, by putting stop(); in the first frame of the MC....and then I put an instance of the movie clip on the stage... and typed in exactly what you said and it still won't play when I roll over it...now it just won't play at all... this is what the debugger says when I try to test it...

Scene=Scene 1, Layer=Layer 1, Frame=1: Line 2: ';' expected
play():

Scene=Scene 1, Layer=Layer 1, Frame=1: Line 3: Unexpected '}' encountered
}



is that of any use?
thanks again

Dr Warm
07-26-2004, 08:52 AM
Oops sorry there was a typo there, i should have wrote play();
instead of play(): !! just somthing simple like thats not good for scripts, umm yeah try that and see if it works!

ian27
07-26-2004, 01:14 PM
Or you could just create a button movie clip.

I do this by adding your button to frame 1, your rollover button to frame 2 and adding a stop(); action to frame 1. Then in frame one add the frame label "_up" and add the frame label "_over" in frame two.

Add it to your main movie, give it an instance name, and then it refer to it through your script ie. myButton.onRelease = whatever;

If you're using MX I believe that should work. Well it does for me anyway.

Ian

lovinlazio9
07-26-2004, 05:21 PM
THANK YOU! i FINALLY FIGURED OUT MY FIRST ACTIONSCRIPT THING....although very simple and just that, I am getting somewhere...thanks a bunch for everyone that helped, don't worry, you will see me asking many more questions in the near future...
thanks again...danny