From: alanwallace4 on
Hi,
_root is the main timeline.
So if you have your button (lets say button1) the code would be

button1.onRelease = function() {
_root.gotoAndStop(20);
}

this would stop the main timeline at frame 20.
This is for actionscript 2 (flash 8).

for cs3 (actionscript 3) it would be this

button1.addEventListener(MouseEvent.CLICK,clickHandler);
function clickHandler(event:MouseEvent):void{
_root.gotoAndStop(20);
}

Hope this helps
Alan

From: alexmel7 on
Perfect! Thanks!
From: alexmel7 on
What if I want to use a button in one movie clip to perform a function in another movie clip. Instead of using "_root" what would I use?
From: alanwallace4 on
Hi,
Then you would target the movie clip.
So you would give the mc an instance name (like myClip_mc )
then just add this into your code ....

button1.onRelease = function() {
_root.myClip_mc.gotoAndStop(20);
}


for cs3 (actionscript 3) it would be this

button1.addEventListener(MouseEvent.CLICK,clickHandler);
function clickHandler(event:MouseEvent):void{
_root.myClip_mc.gotoAndStop(20);
}

From: alexmel7 on
Thanks again!
 | 
Pages: 1
Prev: adding green screen video
Next: FLV issues