|
Prev: adding green screen video
Next: FLV issues
From: alanwallace4 on 18 Apr 2008 16:49 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 18 Apr 2008 17:19 Perfect! Thanks!
From: alexmel7 on 18 Apr 2008 21:00 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 19 Apr 2008 08:21 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 19 Apr 2008 12:50 Thanks again!
|
Pages: 1 Prev: adding green screen video Next: FLV issues |