Back to Blog
.swf viewer online6/1/2023 ![]() SoundClip.addEventListener(Event.COMPLETE, soundLoaded) I'm sure its not because of the location of. But when I view it locally or online (), the music doesn't play. mp3 file, when loaded, is supposed to play the music, but the music plays only when I view it from Flash. ![]() SndChannel = ay(pausePosition) įunction btnPressStop(evt:MouseEvent):voidĪs you can see in the script above, music_play and music_stop are instance names for the play and stop buttons. Music_stop.addEventListener(MouseEvent.MOUSE_DOWN, btnPressStop, false, 0, true) įunction btnPressController(evt:MouseEvent):void Music_play.addEventListener(MouseEvent.MOUSE_DOWN, btnPressController, false, 0, true) SoundClip.addEventListener(Event.COMPLETE, onComplete, false, 0, true) Create an event listener that wll update once sound has finished loading SoundClip.load(new URLRequest("music.mp3")) Var sndChannel:SoundChannel = new SoundChannel() ![]() I used the following script (AS3) I found online to play the music in my flash.
0 Comments
Read More
Leave a Reply. |