I've scoured the interwebs for days now looking for a solution or tutorial to my problem with no avail, so I turn here. I'm using Flash CS3 and AS3.
I'm currently working on creating an animated version of a webcomic that I create (it will basically look like intro animations from an old SNES game). I've currently got the PLAY button scripted to begin the comic upon clicking, but I'm having some sound issues. I wanted a background song to play during the Title Screen and stop once the PLAY button is pressed, as other background music would begin (ideally). My script currently looks like:
The problem I'm having now is that the sound is not auto-playing like it should. Any ideas why this might be happening or how I might resolve this?Code:stop(); function set_quality_low(evt:MouseEvent): void { stage.quality = StageQuality.LOW; } Play_btn.addEventListener(MouseEvent.MOUSE_UP, set_quality_low); Play_btn.addEventListener(MouseEvent.MOUSE_UP, function(evt:MouseEvent): void { gotoAndPlay(2); } ); var sound:Sound = new Sound(new URLRequest("/Users/Coby/SMAS/Music/WAV Files/MP3/SilverAgeofPeace.aif")); var sc:SoundChannel = sound.play(); Play_btn.addEventListener(MouseEvent.MOUSE_UP, stopMusic); function stopMusic(evt:Event):void { sc.stop(); }


Reply With Quote


Bookmarks