For example: putting...
- Code: Select All Code
Button1.addEventListener(MouseEvent.CLICK, button1Click);
function button1Click(event:MouseEvent):void{
gotoAndPlay("Scene 1", 1);
}
on the "actionscript" Layer in the first frame
with
- Code: Select All Code
gotoAndPlay("Scene 1", 1);
at the end, to loop the animation.
This works. When I press the button it goes to frame one and continues to loop.
But. Adding in ...
- Code: Select All Code
Button2.addEventListener(MouseEvent.CLICK, button2Click);
function button2Click(event:MouseEvent):void{
gotoAndPlay("Scene 1", 35);
}
to the beginning of the new animated section (also on a new scene entirely [with altered gotoAndPlay(...) to match] and I tried putting the second button's code on various frames)
also with looping script in the last frame.
causes all buttons to be disabled and the playhead to just run. (almost like adding the second bit of code causes ALL action script to be disabled.) Also I'm running CS3, AS3.0
Now that's sort of a long detour to the subject, but I'm just providing an example.
I'm requesting for an AS3.0 button tutorial, any help would be appreciated.
I guess I am also calling out to anyone who knows AS3.0 to bring forth their skills and post whatever they can.
There's those of us who are new that could use whatever little tips or advice anyone provides, and for those more experienced, I'm sure you could learn different techniques as well.
*EDIT: I fixed my problem from above, by just adding
- Code: Select All Code
Button2.addEventListener(MouseEvent.CLICK, button2Click);
So there's a bit of teaching for you.