Preloading a swf with event sounds.

I have a swf that uses event sounds for speech in
it's assets with Export for ActionScript lnkage on. My movie
preloads but the preloader movie doesn't appear until the sounds
load. Upon loading the swf, I get a background color for about 10
seconds, then my preloader movie appears and plays for what's left
and finishes up fine. I know it's the sound cause when I remove the
sound, it plays nicely. I need the event sounds cause I must try to
synch with a demo on a timeline. It also works like a charm if I
put the sound on a keyframe in the movie timeline and don't use
Export for ActionScript linkage. How can I get my preloader
movieclip to start playing right away and account for all the
assets loading? Anyone heard of this happening? I'll attach the
preloader code.

The sound event isn't called until an embedded movie clip
runs. This clip way is past the first frame. And the preloader
calls for a movie at the depth of 100.
I'm experiencing this lag whenever I have a sound in the
library that has the "export for actionscript" call. Even when I
don't use the sound at all. This doesn't happen when I have the
export call on images or other movie clips in the library.
I'm sure I need more training. I have a complicated movie and
I've never had to run a preloader for sound or components. I thank
you for your efforts, but this is not going to work without more
training, I can tell. I better get someone in town to look at this.
We'll consider this closed. I appreciate your help. :)

Similar Messages

  • Preload a .SWF with Javasript?

    Does it have any effect on the playback of a .swf?
    What if I simply use a script like this?
    <script type="text/javascript">
    if (document.images) {
        img1 = new Image();
        img1.src = "presentation.swf";
    </script>
    I've noticed that my .swf performs better after playing it once - I assume this is due to the fact that's it's been downloaded and cached by the browser...?
    http://www.thomashanserdesign.com#flash
    For a short Flash piece like this, I'm not going to bother with a Flash "preloader." I just thought using a Javascript would load the .swf in its entirety and help improve the performance.  (It tends to slow down near the end of the video, before the logo appears at the end.)
    Comments?

    The second try is simply the cache as you've noticed. You're much better off keeping the video external, using a mobile friendly format like MP4 and utilizing the NetStream buffer system. If you really want it to work well and be polished, you can't avoid things like this.
    Embedding the video not only makes it device unfriendly but it uses inferior codecs so your video quality will take the penalty of quality or file size.
    You should do some feature detection for native HTML5 <video> support and use the built in player, otherwise fall back to the SWF. You can detect that support with the Modernizr library and there's a ton of free video players out there that will do all of this for you automatically.
    Bandwidth definitely comes into play here. My meter showed me on a 100mbit line I loaded your SWF in about ~0.3 seconds. BTW the product looks good, how many ANSI lumens is it?

  • Preload main swf with another swf

    Hey everyone,
    I have two swf files, one is a preloader and the second is
    the main file. I want to preload the main file using my preload
    swf. It works, however the main swf starts to play after about 11%
    of it is preloaded, how can i stop this? I want to preload the
    entire main swf and then have it play. Here is the code i'm using
    in my preloader swf. Or if anyone can tell me another way, anything
    that will work at this point! I'm fairly new to this so any help is
    much appreciated. I need this asap so anyone that could help,
    please do! Thanks in advance!!

    insert a blank frame before your current 1st frame in your
    main swf and attach a stop() to that frame.
    in your preloader use:

  • Flash animation with stream sound not playing in mac

    Dear all,
    I have made a 5 min animation with stream sound. Its playing perfectly in PC. But in mac, its not playing. Stream sound starts from frame 60. So mac plays the swf plays till 60 frame, after that it pauses. I tried importing different sound format (wav, aif, mp3) and tried with all sound export setting but the problem remain same; its playing only till 60. When i removed the sound, it played till end. Even with event sound, it plays till end. But with stream sound, the problem. The problem is only in mac; in pc its perfect.
    I am using VMware Mac OS x leopard in window xp for testing purpose. I tested it in laptop with mac; but the problem is same. What could be the solution?
    Thanks in advance. Waiting for solution.
    Bhushan Pradhan
    spherenepal.com

    Dear all, I solved the problem myself. The problem was with the sound driver of mac. After installing sound driver, the problem is gone. Bhushan

  • New event with no sound from iPhone

    When I set a new event with an alert from iPhone, on iCal of my iMac (synched via Mobile Me) I always got as alert a "message with no sound". How can I get an alert with sound (on my iMac) when I set a new event from the iPhone?

    First of all check the volume buttons....if they are fine
    Try and do the basic operations...
    - reboot - reset
    - if it is still not working then once try restoring it through itunes....it should solve most of the problems...
    - if it still exists then it must be a hardware issue...if u r under the warranty period then apple will replace it for sure....
    hope this helps you...
    if u need anything else then please reply...happy to help....

  • (MX04) Pausing a loaded swf with sound objects within it

    Hi,
    I'm working on a PowerPoint-esque presentation where a user
    watches and listens to a loaded swf in the main movie, clicks the
    next button (which unloads the swf, advances to the next frame and
    loads the next swf), and watches the next one. Lather, rinse,
    repeat. Some of the sections are rather long, and I'd like to give
    the user the ability to pause and play by button click.
    I know how to stop and start the container MC, but that
    doesn't stop the sound object (and the embedded MCs). I also know
    how to pause and start a sound object using the object's instance
    name. Is there a way to pause everything from the main timeline,
    and keep the AS general enough so that any sound object pauses when
    clicked?
    Any help is most appreciated! MX04 and AS2.0.
    Thanks!

    Kglad,
    I tried your code and ran into some problems with stopping
    the mc's, as the embedded mc's within the loaded swf need to stop
    as well. I found the attached code to stop the mc's, but now am
    having trouble with the sound objects.
    Here's the issue, I used this:
    this.soundPosition = currentMovie.loop1.position/1000;
    this.currentMovie.loop1.stop();
    ... for the sound object stop commands and listed a new one
    for each loop I was using. On the play button I started them back
    up again. This all works, but when I start them up again they all
    play, not just the one that is currently paused. Do you mind giving
    me some guidance with the for (obj in mc) loop? My loop experience
    is nil. What I want to do is have the code cycle through all of the
    loops to see which one is playing, then store that information in a
    variable, then pause and play the variable. Does that sound right?
    Thanks again for the help!
    -Sandy

  • Not event 6 month i already got a problem with the sound and i cannot watch youtube or any video using my Ipad

    Not event 6 month i already got a problem with the sound and i cannot watch youtube or any video using my Ipad. Please help

    Reset iPad
    Hold down the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears
    Note: Data will not be affected.

  • Preloader causes SWF to download twice

    Hi there,
    I'm wondering if anyone else has run in to this issue, where
    a movie with no 'export for runtime sharing' assets will be
    downloaded twice when accessed via a preloader script (see
    preloader code below). In this case, the SWF file 'main.swf' is
    downloaded twice - the second time straight after the preloader has
    finished with it. This is not usually detectable as most browsers
    cache the movie and it is instantly taken from cache, however on
    browsers that have the cache turned off this can be a very slow and
    frustrating experience.

    Hi kglad,
    At first that seemed like a silly comment, but it forced me
    to double-check everything. After the original block of code above,
    the movie continues to play an animation on the main timeline,
    always returning to the 2nd frame when done (the frame after the
    code above). In the full code for the onLoadInit event I had a
    _root.gotoAndStop(1); (see below) which called the movieclip
    main.swf to load again... I have changed this to
    _root.gotoAndStop(2); and it now works as intended.
    Thanks for the starter! :)
    -Shannon

  • Controling a loaded swf with another loaded swf

    I have a blank stage with only AS that loads an swf
    addChildAt(0) and a second one addChildAt(1). This works. When the
    user interacts with (1) it calls another addChild (not indexed) and
    possibly that one loads another, depending on the choices made by
    the user. How can I get any of these to control that very first
    child that was loaded at (0)? I have run out of ideas.
    Some of the code:
    (on the main swf, nothing on the stage, only code that loads
    the next two)
    addChildAt(pHolder, 0);
    pLoader.load(pURLReq);
    pLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,
    pLoaded);
    and for the second:
    addChildAt(mHolder, 1);
    mLoader.load(mURLReq);
    mLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,
    mLoaded);
    On the child of childAt(1), I have:
    function replaceSWF(e:MouseEvent):void
    pLoader = new Loader();
    pLoader.load(new URLRequest("p.swf"));
    pLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,
    placeNewClip);
    function placeNewClip(e:Event):void
    removeChildAt(0);
    addChildAt(e.target.content, 0);
    If I use this exact same code from that very first swf, the
    one that loads the first two external swfs, it works, but once I
    put it on one of hte other loadeds and sub loaded swfs, I can't get
    it to work. In the current state (0) it just makes everything on
    the stage disappear, so I figured then using the index of (1) would
    do it, but that or any other number results in absoluly nothing.
    Help! I am really out of ideas here.
    (the stacking looks like this) ---
    sub second loaded SWF <==== needs to tell first loaded SWF
    to unload then load a new swf at same index
    second loaded SWF <==== loads the next one above
    first loaded SWF <=== needs to be removed and another swf
    loaded at the same index
    mainSWF (loads two others) <=== code placed here works for
    first loaded SWF

    Kglad,
    I tried your code and ran into some problems with stopping
    the mc's, as the embedded mc's within the loaded swf need to stop
    as well. I found the attached code to stop the mc's, but now am
    having trouble with the sound objects.
    Here's the issue, I used this:
    this.soundPosition = currentMovie.loop1.position/1000;
    this.currentMovie.loop1.stop();
    ... for the sound object stop commands and listed a new one
    for each loop I was using. On the play button I started them back
    up again. This all works, but when I start them up again they all
    play, not just the one that is currently paused. Do you mind giving
    me some guidance with the for (obj in mc) loop? My loop experience
    is nil. What I want to do is have the code cycle through all of the
    loops to see which one is playing, then store that information in a
    variable, then pause and play the variable. Does that sound right?
    Thanks again for the help!
    -Sandy

  • Need help with adding sound

    I want to add a short soundclip that plays when my nav bar
    loads. I edited down a song in Garageband to 3 seconds, then I
    exported it to iTunes. I assume I have to convert it to mp3 to put
    it into my Flash file, so my first question is this... how many
    kbps should I save the mp3 at? Normally I have mp3's in iTunes that
    are 128 or 192, but would this make my swf filesize too big? Can
    anyone suggest a setting?
    Then, once I convert my mp3 in iTunes, how would I bring it
    into my flash file and trigger it so it plays when the nav bar
    loads? Thanks!

    I don't know much about actionscript so please bear with me.
    When you say create the sound object, what exactly does that mean?
    Where do I put that code? I'd like the sound to trigger after the
    preloader loads everything and while the animation plays (logo
    flies in, nav bar swoops in from the right, pretty basic). Does
    this mean I should put the trigger on frame 3 since the preloader
    is taking up the first 2 frames? And does the sound object code go
    somewhere different or do I add it above the trigger code on frame
    3?
    Also, the way I'm setting up my Flash animation is that I'm
    going to put the same swf on the top of every one of my html
    tables, so every time the user clicks a button in the nav, the nav
    bar animation will reload and show the proper page (I'm not doing
    my whole site in Flash, just the nav and bringing into
    Dreamweaver). It might get a little annoying if the sound plays
    each time the user clicks a button, so is there any way to set it
    up with Actionscript that the sound only plays when the user
    initially goes to the index page? Or will I have to make a separate
    swf without the sound and put that on the top of all the other
    pages beside the homepage?
    With the mp3, I encoded it at 128 and it sounds really good,
    I was just wondering if it's overkill just for a 3 second byte.
    Does anyone else have any experience with this? I'm really not sure
    of what is an appropriate file size, is there a number where I
    shouldn't go over? It's a nav bar animation so I'd like it to load
    pretty fast. Right now the file is around 85 KB without the sound,
    I have no idea whether this is high or low...
    Thanks for your help!

  • How to Preloading a swf file in one application

    hello friends,
    How to preload a swf file in one application??
    i have two panel in one panel i given login screen and In second panel there is one module i have to show this panel which is visible="false" when user logged in but i have to preload this module in second panel when the user is doing logi. and when user logged in that time i have to show the second panel hiding the first panel.
    so how to do this i m not getting can anyone help me??
    Thanking you,
    Gajanan

    i have created a jar file.Now i want to reuse this
    jar file in another java program.Could anyone please
    guide me with the steps of how to reuse a jar fileput your jar file in class path and import the class which u want to reuse in your code so that u can access all the methods in that class in ur code.

  • Unloading a loaded external SWF with a close button on the external SWF to unload

    I have found some discussion on this topic but I am still having trouble getting it to work and was hoping to get some help here.
    Here I have a file: http://www.dril-quip.com/test/main.swf
    I have: main.swf (a menu) and I have module.swf (content)
    If you navigate to Subsea Wellhead Systems/SS-15 BigBore II and click on that I have it load an external swf which covers most of the parent.
    So far so good. My problem is unloading the loaded 'Child' swf with the button provided on the loaded 'Child' swf.
    below is the code I used to load the file but I cant, for the life of me, find a way to unload it.
    var bigboreLoader:Loader = new Loader();
    btnbb2.addEventListener(MouseEvent.MOUSE_UP, bigborecontent);
    function bigborecontent(event:MouseEvent):void{
    var bigboreRequest:URLRequest = new URLRequest("moduletemplate.swf");
    bigboreLoader.load(bigboreRequest);
    stage.addChild(bigboreLoader);
    I am certain it requires the Child to communicate with the parent somehow but I am at a loss. If I could get a bit of advice or a link to something deal with this, it would be a big help. I just need to have my links load my modules and the remove them when the close buttong is hit on the loaded swf. I promise I have done searches and I admit I have found asnwers but still they are not working. I found the code below:
    Main FLA:
    function removeF() {
    removeChild(bigboreLoader);
    var bigboreLoader:Loader = new Loader();
    btnbb2.addEventListener(MouseEvent.MOUSE_UP, bigborecontent);
    function bigborecontent(event:MouseEvent):void{
    var bigboreRequest:URLRequest = new URLRequest("moduletemplate.swf");
    bigboreLoader.load(bigboreRequest);
    stage.addChild(bigboreLoader);
    EXTERNAL FLA:
    btnClose2.addEventListener(MouseEvent.CLICK, bigborecontent);
    function bigborecontent(myevent:MouseEvent):void {
    MovieClip(parent.parent).removeF();
    I think I have a misunderstanding of the code. Thanks for any help you might be able to provide.

    This was the original code I got:
    Main FLA: (on AS layer inside DropDownButton Movie Object)
    function removeF() {
    removeChild(myLoader);
    var myLoader:Loader=new Loader ();
    page1_mc.addEventListener(MouseEvent.CLICK, page1content);
    function page1content(myevent:MouseEvent):void {
    var myURL:URLRequest=new URLRequest("page1.swf");
    myLoader.load(myURL);
    addChild(myLoader);
    EXTERNAL FLA: (on main time line of this file)
    close_mc.addEventListener(MouseEvent.CLICK, closeMC);
    function closeMC(myevent:MouseEvent):void {
    MovieClip(parent.parent).removeF();
    Main.FLA
    myLoader=bigboreLoader (my new loader)
    page1_mc=btnbb2 (the button who event will call external swf)
    page1content = bigborecontent (name given to SWF being loaded???)
    myURL=bigboreRequest (my new URLrequest for bigbore)
    page1.swf=moduletemplate.swf (actual address of what I am loading)
    External.FLA
    close_mc=button that will close external swf
    closeMC=movie clip to close?

  • Loaded external swfs with transitions

    I need help getting my loaded swf files to play the "out" transition before the next movie loads. I have a main swf with 5 buttons (movie clips) that load external swf onto the stage.
    package
        import flash.display.MovieClip;
        import flash.display.SimpleButton;
        import flash.display.Loader;
        import flash.net.URLRequest;
        import flash.events.MouseEvent;
        import flash.events.*;
        public class V2 extends MovieClip
            private var sections_array:Array;
            private var section_buttons_array:Array;
            private var loader:Loader;
            private var sectionHolder  : MovieClip;
            private var swf:String;
            private var currentSection:int=0;
            private var nextSection:int;
            private var id:int=0;
            private var homeLoc = "./swfs/home.swf";
            public function V2()
                init();
            private function init():void
                stop();
                stage.frameRate=31;
                preloader_mc.visible=false;
                preloader_mc.fill_mc.width=0;
                sectionHolder = new MovieClip();
                sectionHolder.x = 37;
                sectionHolder.y = 42;
                addChild( sectionHolder );
                sections_array = new Array('./swfs/section1.swf',
                './swfs/section2.swf',
                './swfs/section3.swf',
                './swfs/section4.swf',
                './swfs/section5.swf');
                section_buttons_array = new Array(btn1,btn2,btn3,btn4,btn5);
                addMenuListener();
                addMenuEvents();
                loadHome();
            private function addMenuListener():void
                for(var i:int=0;i < section_buttons_array.length;i++)
                    section_buttons_array[i].id=i;
                    section_buttons_array[i].addEventListener(MouseEvent.MOUSE_DOWN,loadSectionHand ler);
            private function loadHome():void
                swf=homeLoc;//sections_array[0];
                var request:URLRequest=new URLRequest(swf);
                loader=new Loader();
                initListeners(loader.contentLoaderInfo);
                loader.load(request);
                id=0;
            private function changeSection(m:MouseEvent):void
                id=m.currentTarget.id+1;
                loader.unload();
                sectionHolder.removeChild(loader);
                removeListeners(loader.contentLoaderInfo);
                loadSection(m.target.parent.id+1);
            private function loadSectionHandler(evt:MouseEvent)
                id = evt.currentTarget.id;
                loadSection(id);
            private function loadSection(n:int):void
                swf=sections_array[id];
                var request:URLRequest=new URLRequest(swf);
                initListeners(loader.contentLoaderInfo);
                loader.load(request);
            private function initListeners(dispatcher:IEventDispatcher):void
                dispatcher.addEventListener(Event.OPEN,start);
                dispatcher.addEventListener(ProgressEvent.PROGRESS,atLoading);
                dispatcher.addEventListener(Event.COMPLETE,completed);
            private function removeListeners(dispatcher:IEventDispatcher):void
                dispatcher.removeEventListener(Event.OPEN,start);
                dispatcher.removeEventListener(ProgressEvent.PROGRESS,atLoading);
                dispatcher.removeEventListener(Event.COMPLETE,completed);
            private function start(event:Event):void
                preloader_mc.visible=true;
            private function atLoading(event:ProgressEvent):void
                var n:uint=(event.bytesLoaded/event.bytesTotal)*100;
                preloader_mc.fill_mc.width=n;
               private function completed(event:Event):void
                sectionHolder.addChild(loader); 
                preloader_mc.visible=false;
            private function stopAll():void
                for(var i:int=0;i < section_buttons_array.length;i++)
                    section_buttons_array[i].stop();
                    sections_array[i].stop();
            private function addMenuEvents():void
                for(var i:int=0;i < section_buttons_array.length;i++)
                    section_buttons_array[i].mouseChildren=false;
                    section_buttons_array[i].buttonMode=true;
                    section_buttons_array[i].id=i;
                    section_buttons_array[i].isPressed=false;
                    section_buttons_array[i].addEventListener(MouseEvent.MOUSE_OVER,setOver);
                    section_buttons_array[i].addEventListener(MouseEvent.MOUSE_OUT,setOut);
                    section_buttons_array[i].addEventListener(MouseEvent.MOUSE_DOWN,setDown);
                    section_buttons_array[i].addEventListener(MouseEvent.MOUSE_UP,setUp);
            private function setOver(evt:MouseEvent):void
                if(evt.target.isPressed==false)
                    evt.target.gotoAndStop(2);
            private function setOut(evt:MouseEvent):void
                if(evt.target.isPressed==false)
                    evt.target.gotoAndStop(1);
            private function setDown(evt:MouseEvent):void
                nextSection=evt.target.id;
                checkState(evt.target.id);
                evt.target.gotoAndStop(3);
                loadSection(1);
                currentSection=evt.target.id;
            private function setUp(evt:MouseEvent):void
                if(evt.target.isPressed==false)
                    evt.target.gotoAndStop(1);
            private function checkState(n:int):void
                for(var i:int=0;i < section_buttons_array.length;i++)
                    if(i==n)
                        section_buttons_array[i].isPressed=true;
                    else
                        section_buttons_array[i].isPressed=false;
                        section_buttons_array[i].gotoAndStop(1);
            private function removeSWF(e:Event):void
                loader.unload();
                removeEventListener("removeMe", removeSWF);
                var request:URLRequest = new URLRequest(swf);
                loader.load(request);
            private function onClick(e:MouseEvent):void
            targetID = e.currentTarget.id;
            addEventListener("removeMe", removeSWF);
            MovieClip(loader.content).play();
            private function removeSWF(e:Event):void
            loader.unload();
            removeEventListener("removeMe", removeSWF);
    The loaded swf has a stop() an intro animation and on the last frame have.
    dispatchEvent(new Event("removeMe", true));

    your isse begins here ..
    loadSection()
    you use the same loader to not only load files but you are tyring to use it to target the movieClip you also want to play.
    The issue is loader.  The loader can only reference one load at a time.. otherwise you screw up your listeners and the ability to unload files properly.
    You should load all files in Your current system as its own variable so that while one loads you can still control a movie.
    So what type of end transitions do your files have?
    What exactly with this seems like youre getting an issue.. looking at it looks alright aside from the fact that some methods are not used at all by your class

  • Flash with background sound (I got error #2037)

    Hallo.
    I am a beginner at AS3 programming. I like to make a flash with background sound (*.mp3 files from *.xml list). Everything works fine, but when I press "onClick" button I got output error.
    Error: Error #2037: Functions called in incorrect sequence, or earlier call was unsuccessful.
        at flash.media::Sound/_load()
        at flash.media::Sound/load()
        at proov_fla::MainTimeline/F_MP3_laadimine()
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at flash.net::URLLoader/onComplete()
    My Script:
    var MP3_PLAYLIST:String = "playlist1.xml";
    var LAADI_MUUSIKA:URLRequest;
    var MUUSIKA:Sound = new Sound();
    var MUUSIKA_KANAL:SoundChannel = new SoundChannel();
    var HETKE_MUUSIKA:Sound = MUUSIKA;
    var POSITSIOON:Number;
    var HETKE_INDEX:Number = 0;
    var KAS_MUUSIKA_MÄNGIB:Boolean = true;
    var XML_FAIL:XML;
    var MUUSIKA_NIMEKIRI:XMLList;
    var MP3_LAADIJA:URLLoader = new URLLoader();
    MP3_LAADIJA.addEventListener(Event.COMPLETE, F_MP3_laadimine);
    MP3_LAADIJA.load(new URLRequest(MP3_PLAYLIST));
    onClick.addEventListener(MouseEvent.CLICK, järgminelugu);
    function järgminelugu(e:MouseEvent):void
        MP3_PLAYLIST = "playlist2.xml";
        MP3_LAADIJA.load(new URLRequest(MP3_PLAYLIST));
    function F_MP3_laadimine(e:Event):void
        XML_FAIL = new XML(e.target.data);
        MUUSIKA_NIMEKIRI = XML_FAIL.track;
        LAADI_MUUSIKA = new URLRequest(MUUSIKA_NIMEKIRI[0].path);
        MUUSIKA.load(LAADI_MUUSIKA);
        MUUSIKA_KANAL = MUUSIKA.play();
    My full purpose will look like this http://uusrand.pri.ee/galerii/proov/

    Hallo.
    Can anybody help me to add an actionscript line(s) into attach file "newXML.fla".
    In this file I have a script to play mp3 files from xml list (this works).
    I also add button to load new mp3 fileslist from new xml file. But I don't know how.
    My Script:
    var MP3playlist:String = "http://uusrand.pri.ee/mp3/playlist.xml";
    var MP3file:URLRequest;
    var MP3SoundURL:Sound = new Sound();
    var MP3sound_channel:SoundChannel = new SoundChannel();
    var xml:XML;
    var playlist_index:XMLList;
    var xml_loader:URLLoader = new URLLoader();
    var MP3index:Number = 0;
    xml_loader.addEventListener(Event.COMPLETE, originalXMLfile);
    xml_loader.load(new URLRequest(MP3playlist));
    onClick.addEventListener(MouseEvent.CLICK, nextXMLfile);
    function nextXMLfile(e:MouseEvent):void
        if (MP3playlist == "http://uusrand.pri.ee/mp3/playlist_loodus.xml") {
            MP3playlist = "http://uusrand.pri.ee/mp3/playlist.xml";
        } else {
            MP3playlist = "http://uusrand.pri.ee/mp3/playlist_loodus.xml";
    function originalXMLfile(e:Event):void
        xml = new XML(xml_loader.data);
        playlist_index = xml.track;
        MP3file = new URLRequest(playlist_index[0].path);
        MP3SoundURL.load(MP3file);
        MP3sound_channel = MP3SoundURL.play();
        MP3sound_channel.addEventListener(Event.SOUND_COMPLETE, nextSong);
    function nextSong(e:Event):void
        if (MP3index < (playlist_index.length() - 1)){
            MP3index++;
        } else {
            MP3index = 0;
        var NextSongRequest:URLRequest = new URLRequest(playlist_index[MP3index].path);
        var NextSongURL:Sound = new Sound(NextSongRequest);
        MP3sound_channel.stop();
        MP3sound_channel = NextSongURL.play();
        MP3sound_channel.addEventListener(Event.SOUND_COMPLETE, nextSong);

  • Commnunication swf to swf with Listeners

    Hi,
    am currently testing different approach to see what would be
    the best way to load 1 swf inside another swf (with loadClip
    method). The way I would prefer would be with EventDispatcher and
    EventListeners. But is it event possible? What would be the scope
    of listeners with multiples swf. Even if I create.delegate my new
    clip, will he catches the event of the loaded swf.
    Thank you in advance

    Once you load one swf into another you should have access to
    the functions, variables, listeners within that movie.

Maybe you are looking for

  • How do I transfer photos to a new PC w/o losing tag info?

    I am currently using PE6 in an old XP PC and want to use the same PE6 software in my new Windows 7 PC.  The sheer number of photos (>12K) make it nearly impossible to reorganize and retag everything from scratch!!  If a newer PE version would help me

  • Class to connect, manage and disconnect a DDBB

    Hi I had posted this Topic in Java Programming forum, buit I have seen here is the correct. I have a doubt about how to do this class: I have a java class witch I use from jps pages to make differents querys throw Data Base. In this class, I have a c

  • Example font subset with non-unicode output

    Hi, I am searching for an example to use a TTF Font as font subset in PDF but without UTF16 encoding. Is this even possible? Something similar to 7 0 obj <</Type /Font /Subtype /Type0 /BaseFont /AAAAAD+Arial/Encoding /Identity-H /DescendantFonts [9 0

  • Help with gotoAndPlay (as2.0)

    Hi all, Im trying to make a navbar in flash for my new site, and am having some problems. Last time I used flash was about 4-5 years ago, so bare with me, my actionscript might be rusty. Im trying to have a stop command at frame 1, and then when I ro

  • Access to BEX Query

    Hi, A user has been asking for access for running one of the query in BEX designer. How do you grant access to a user for running a particular query in designer. Can some please guide me. Thanks.