Stick Page Forums Archive

I need help with actionscript!

Started by: AlphaMan | Replies: 15 | Views: 1,514

AlphaMan
2

Posts: 1,039
Joined: Sep 2012
Rep: 10

View Profile
Oct 2, 2012 11:41 AM #750043
When I tried to pressing a button and for some reason it won't do what it pose to do. I have to right click and press play instead of just normally left clicking it. What's the problem here? Is it the button or is it the script? :(

This is the code I used. Using ActionScript 2 btw.

on(rollOver){
gotoAndStop (2);
}


on(release){
gotoAndStop (3);
}


on(release){
gotoAndStop (1);
}
Lag

Posts: 483
Joined: Jun 2007
Rep: 10

View Profile
Oct 2, 2012 12:08 PM #750049
Why are there 3 such events. you can do with just one goto. Also have you bound the AS to the button? Just use go to and play to 3rd frame on release.
GMR
2

Posts: 3,411
Joined: Aug 2012
Rep: 10

View Profile
Oct 2, 2012 12:51 PM #750063
Use this:
on(release){
_root.gotoAndStop(3);
}
You have to use _root If you want those to go to frames in the main timeline. Btw, use buttons, not movieclips. If you still have trouble, PM me the flash file and I'll fix it. ;)
Lag

Posts: 483
Joined: Jun 2007
Rep: 10

View Profile
Oct 2, 2012 7:57 PM #750260
???, if I'm not wrong, that's AS 3. He needs AS 2.0.
AlphaMan
2

Posts: 1,039
Joined: Sep 2012
Rep: 10

View Profile
Oct 2, 2012 8:31 PM #750281
Quote from Lag
Why are there 3 such events. you can do with just one goto. Also have you bound the AS to the button? Just use go to and play to 3rd frame on release.

Oh, I'm not using this for animation. It's for something else. And I think I believe I did what you are talking about, I just convert the object into a button symbol, click on the symbol and typed in the AS.
GMR
2

Posts: 3,411
Joined: Aug 2012
Rep: 10

View Profile
Oct 2, 2012 10:28 PM #750354
Quote from Lag
???, if I'm not wrong, that's AS 3. He needs AS 2.0.

No, that's AS2. I only program in AS2, and I use that for all of my buttons.
AlphaMan
2

Posts: 1,039
Joined: Sep 2012
Rep: 10

View Profile
Oct 2, 2012 11:22 PM #750393
Quote from ???
No, that's AS2. I only program in AS2, and I use that for all of my buttons.

Wanna just let me send you the .fla and you can do the coding?
carstraft
2

Posts: 232
Joined: Aug 2005
Rep: 10

View Profile
Oct 2, 2012 11:29 PM #750398
first of all you have two onRelease events which will cause it to go to the 3rd frame and stop, and then probably go to the first frame and stop.

i'm guessing the on(release) { gotoandstop(1) - is meant to make the button go back to normal if you roll off of it. there is probably some sort of on(rollOff) similar to rollOver that you can use.

and if you want it to play, but it's just stopping at the third frame, then use gotoAndPlay(3) instead.
AlphaMan
2

Posts: 1,039
Joined: Sep 2012
Rep: 10

View Profile
Oct 2, 2012 11:36 PM #750402
Oh. I should update you guys that the roll over and the going back to frame 1 stuff is somehow working fine.
This is the only thing I'm having problem (with new codes):
on (rollOut){
gotoAndStop (1);
}
on (release){
gotoAndStop (3);
}

Those two is on the same button.
GMR
2

Posts: 3,411
Joined: Aug 2012
Rep: 10

View Profile
Oct 2, 2012 11:46 PM #750407
Just PM your .fla and I'll program it. :D
AlphaMan
2

Posts: 1,039
Joined: Sep 2012
Rep: 10

View Profile
Oct 2, 2012 11:51 PM #750409
YAY :D
GMR
2

Posts: 3,411
Joined: Aug 2012
Rep: 10

View Profile
Oct 2, 2012 11:51 PM #750410
Yeah. :) Send it right now!
AlphaMan
2

Posts: 1,039
Joined: Sep 2012
Rep: 10

View Profile
Oct 3, 2012 12:01 AM #750415
Sent
GMR
2

Posts: 3,411
Joined: Aug 2012
Rep: 10

View Profile
Oct 3, 2012 12:02 AM #750416
Cool. Lets see what I can do.
GMR
2

Posts: 3,411
Joined: Aug 2012
Rep: 10

View Profile
Oct 3, 2012 12:18 AM #750421
I fixed your problem, but we need to find someone to downgrade this...I use CS4...
Website Version: 1.0.4
© 2025 Max Games. All rights reserved.