busdriver630 0 Report post Posted April 13, 2005 hey.ive been expermenting with flash again lately. and i was wondering if anyone knew the simple actionscript for a play button. i have a stop action on the frame, and i know how to make buttons, so this is my next step in flash.thanks, SPH Share this post Link to post Share on other sites
johnny1405241497 0 Report post Posted June 1, 2005 you just go to actions and choose GoTo then choose the frame you want to send it to Share this post Link to post Share on other sites
rhodesian.dragon 0 Report post Posted June 1, 2005 A better way is to go to the actions choose the Global Functions > Timeline Control > and choose gotoAndPlay The code will look like this: gotoAndPlay(replace this with the frame number); Share this post Link to post Share on other sites
kuyakurt 0 Report post Posted February 21, 2006 Put an actionscript on the button.1. Select the button.2. Press F9 to open the actionscript panel.3. Type in: on(release){gotoAndPlay(framelabel or number);}Okay, there you go. If you have anymore questions feel free to PM me or ask people who really know how to do actionscripts. There is another alternative way.1. Name the button.2. On the current frame type in: ButtonName.onRelease=function(){gotoAndPlay(framelabel or number);}Hope this helped you. Share this post Link to post Share on other sites
iGuest 3 Report post Posted December 21, 2007 **ERROR** Play Buttons )this is to rhodesian.Dragon) Mine keeps saying **ERROR** look: **Error** Scene=Scene 1, layer=Background, frame=1:Line 1: Statement must appear within on handler gotoAndPlay(2); Total ActionScript Errors: 1 Reported Errors: 1 -some1 Share this post Link to post Share on other sites
iGuest 3 Report post Posted August 20, 2009 <%@ Page Language="VB" %><title>Inmate Testimonies</title><script type='text/javascript' src="../Controls/JWWMVPlayer/silverlight.Js"></script><script type='text/javascript' src="../Controls/JWWMVPlayer/wmvplayer.Js"></script><!-- inline script #1 - JW WMV Media Player API --><script type="text/javascript">Function playfile(url) {/*alert('playfile: ' + url);*/Player.SendEvent('LOAD', url);Player.SendEvent('PLAY');}Function play() /* Will also Resume after pause */{Alert('PLAY');Player.SendEvent('PLAY','true');}Function pause() {Alert('PAUSE');Player.SendEvent('PLAY','false');}Function stop() {/*alert('STOP');*/Player.SendEvent('STOP');}</script></head><body><div style="width: 0px; height: 0px"><script type='text/javascript' src="Controls/JWWMVPlayer/silverlight.Js"></script><script type='text/javascript' src="Controls/JWWMVPlayer/wmvplayer.Js"></script><div id="mplayer"></div><script type="text/javascript">Var cnt = document.GetElementById("mplayer");Var src = 'Controls/JWWMVPlayer/wmvplayer.Xaml';Var cfg = { height: '0', width: '0'};Var player = new jeroenwijering.Player(cnt, src, cfg);/*alert('instantiated');*/AddListeners();Function addListeners() {If (player.View) {Player.AddListener('STATE', myFunc);}Else {SetTimeout(addListeners, 100);}} Function myFunc(ost, nst) {Alert('the state went from ' + ost + ' to ' + nst);}</script> </div><div onclick="playfile('media/audio/2132.Mp3');">Play File</div><div onclick="playfile('media/audio/2132.Mp3');">Play File</div><div onclick="playfile('media/audio/2140.Mp3');">Play File2</div><div onclick="stop();">Stop</div><div onclick="pause();">Pause</div><div onclick="play();">Resume</div></body></html> Share this post Link to post Share on other sites
iGuest 3 Report post Posted November 30, 2009 Really?Play ButtonsUse actionscript 2.0 and then right lcikc on the first frame where the button is then type stop(); and then make your button select the button then type this on(release){Play(); } -reply by Kenny Share this post Link to post Share on other sites
iGuest 3 Report post Posted December 14, 2009 Stop movie clipPlay ButtonsI have several movie clips with buttons to start each clip. I need to stop a movie clip if another button is selected so that one movie does not play over another. I tried using stopAll but this code doesn't work. Do you know the correct code? one_btn.AddEventListener( MouseEvent.MOUSE_UP, function(evt:MouseEvent):void { stopAll( ); gotoAndStop(3); } ); -reply by sailchoc Share this post Link to post Share on other sites
iGuest 3 Report post Posted May 30, 2010 Whats wrong is that you are doing AddEventListener...There is no capital in the A, the code should be: one_btn.AddEventListener( MouseEvent.MOUSE_UP, function(evt:MouseEvent):void { stopAll( ); gotoAndStop(3); } );-reply by Marzo Share this post Link to post Share on other sites
iGuest 3 Report post Posted October 28, 2010 So I've tried using all of the codes listed on here, and none have worked. I have my button ready, and I have the stop(); Code down in my Actions. I really want to make a start button for ActionScript 3.0, because everywhere I go people have made it for 2.0... I currently own only Adobe Flash CS4, and I don't like how my images turn out before the preview when I open a 2.0 ActionScript file. '':U So I was hoping someone could help me on this... -reply by Kabu Share this post Link to post Share on other sites