PDA

View Full Version : Actionscript 3.0 ruining everything



Suggy
December 6th, 2008, 10:01 AM
Hi all, this should be fairly open and shut for any of you as I am a total n00b at actionscript. I'm all about quality graphics / animation and I usually get by with a minimum of actual script, but now the few things I did know have all gone down the drain with actionscript 3.0.

I used to put this on a frame:

gotoAndPlay("win");

And the playhead would go to the frame labelled win.
What do I have to do now to achieve that same effect?

Thanks in advance,
Jon

senocular
December 6th, 2008, 10:33 AM
Its the same

Suggy
December 6th, 2008, 11:18 AM
Hmm... I just made two identical documents, one in AS2 and the other in AS3, and so it was. It must be some other factor in my main project that's stopping it. Time to double check my labels again. Thanks for that.

senocular
December 6th, 2008, 11:29 AM
There are some differences in how they're handled in AS3, but the end result - navigating from one frame to another, is through that same API.

If you can be more specific about what's not working, that could help identify what's going wrong.

Suggy
December 6th, 2008, 01:17 PM
The problem I'm having now is with buttons, which are a big part of everything I do in flash. In AS3, when I try and use an onPress, I get compiler error 1119. Its taking the onPress as a an undefined property. I replaced it with onMouseDown thinking that might help and got the exact same thing. The holes in my knowledge are catching up with me.

joran420
December 6th, 2008, 02:24 PM
button.addEventListener(MouseEvent.CLICK,onClick);
function onClick(e:MouseEvent){
trace("you clicked "+e.currentTarget+" !!!!");
}