0
votes

So I'm trying to get sound on my flex application. Then tried to load an swf movie with only audio in it. But when it loads on init(), it loops non-stop. Here's a sample code:

        [Embed(source="assets/alert03.swf")]
        private var alert01Swf:Class;
        private var alert01Loader:MovieClip;

        private function init():void {
            alert01Loader = MovieClip(new alert01Swf());
            alert01Loader.stop();
            alert01Loader.gotoAndStop(0, null);
            //this.addChild(alert01Loader);
        }

It just goes beserk! And I can't stop it. I tried using OGG but it was just to slow in loading. Mp3 is no good because it just isn't free. Any suggestions on using audio in Flex would also be great!

1

1 Answers

0
votes

stop() and gotoAndStop functions control the frame navigation - do you have appropriate functions defined in those frames?

Define stopAudio/playAudio functions in the alert03.swf's document class and call them from the main SWF.