Page 1 of 1

ActionScript 2.0 Problems

PostPosted: August 17th, 2010, 10:57 am
by entertainment.net
Space Cow Problem Screenshot.png
(64.33 KiB) Downloaded 24 times
Okay, I have this character in my game here, and I want to make it so that you can click him, and he moves out of the cow's way. But when I when I type in the most obvious coding,
Code: Select all
on(release){
   gotoAndPlay(2);
}
instead of moving forward in the timeline, it goes to frame two inside the actual Sonic movie clip. Which doesn't help.

So I tried
Code: Select all
on(release){
   _root.gotoAndPlay(2);
}
but that made it so that when you clicked Sonic, it went back to the beginning of my Flash Movie, the preloader...

I also tried
Code: Select all
on(release){
   this._parent.gotoAndPlay(2);
}
and that just did the same thing as _root.gotoAndPlay(2)...

Is there any other coding I can use to fix this problem?

Re: ActionScript 2.0 Problems

PostPosted: August 17th, 2010, 11:57 am
by Buff_
Make it a button, and then use the first code.

Re: ActionScript 2.0 Problems

PostPosted: August 17th, 2010, 12:00 pm
by entertainment.net
But the character has to be animated...
Do I put the movie clip in the button?


EDIT: Tried that, and it worked! Yahoo!

Now I have to do that to every character... :?

Re: ActionScript 2.0 Problems

PostPosted: August 17th, 2010, 12:02 pm
by Buff_
Yup. Looky here.. while it is still up.



EDIT: It's gone.