ImmortalDragon Posted November 6, 2007 Share Posted November 6, 2007 I have a .swf file and a button. I put the button in a keyframe and I need the .swf to play when the user clicks the button. I do not want the .swf to loop nor the scene to loop. I have no experience with actionscript (I assume you have to use actionscript to do this), how do I do this? Link to comment Share on other sites More sharing options...
Da'uud Posted November 6, 2007 Share Posted November 6, 2007 you can look online for some tutorials, my skills are rusty but you can try: button_btn.onRelease = function() { test_mc.loadMovie(“movie.swf”); } this is assuming your button is called "button_btn" and you have a blank movie clip named "test_mc" and your swf is called "movie.swf hope this helps Link to comment Share on other sites More sharing options...
Da'uud Posted November 6, 2007 Share Posted November 6, 2007 also if you dont want it to loop i think there must be a stop frame inserted at the end of the original swf, i could be wrong tho Link to comment Share on other sites More sharing options...
Bang Posted November 6, 2007 Share Posted November 6, 2007 Assuming the movie is inert until someone presses the button.. and assuming that you have the movie held at frame 1 waiting for the button to be pressed.. make a layer, and in the first frame put a keyframe. Highlight that keyframe and bring up the action script window and write stop() Highlight the button symbol, open the action script window, put in the following script on (release) {gotoAndPlay(2);} gotoandplay will move the movie to the frame number you put between the () .. I put in 2 for demo.. you put in whatever frame your content begins on. If you don't want the movie to loop, go to the final frame, put a keyframe on an empty layer, highlight it, open action script and write stop() Or, let it loop back and it will stop at frame 1 again after loading the button up. Simple as that. ~Bang Link to comment Share on other sites More sharing options...
CHUBAKAH Posted November 6, 2007 Share Posted November 6, 2007 What Bang said. Link to comment Share on other sites More sharing options...
Sweet Sassy Molassy Posted November 6, 2007 Share Posted November 6, 2007 What Chubakah said. Link to comment Share on other sites More sharing options...
Slacky McSlackAss Posted November 6, 2007 Share Posted November 6, 2007 What SSM sai.....nah SSM knows nothing. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.