#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Posts
    5
    Rep Power
    0

    Unhappy Loading external music


    Well I am trying to Load a external music SWF file and the file loads great but the music doesn't play. I am using this code
    --------------------
    on (release) {
    _root.contents.loadMovie("data.swf");
    }
    --------------------

    So now I dont know what to do. If you guys have any suggestions on what is the best way to load music the FASTES way to do if possible (Fastes I mean is the Loading time) If you guys know a better way please show me Thank you very much
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Posts
    5
    Rep Power
    0
    some could please help I really need this
  4. #3
  5. No Profile Picture
    flash junkie
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2003
    Location
    CO, USA
    Posts
    172
    Rep Power
    12
    hey man. what do you mean by external music .swf? Did you import the sound and drag it on to the layer? or did you use attachSound to attach the sound from the library, or did you load the sound in using the loadSound method?

    1. if you have a timeline that is just sound, it should play automatically (it will act like a normal sound timeline)

    2. if you used attachSound, you need to tell your sound object to play:

    mySound = new Sound();
    mySound.attachSound("bgmusic");
    mySound.start();

    3. if you used the loadSound, you have two options, one is to load the sound into a sound object, and the other is to set streaming to true. The latter way is probably the fastest method, although you can only control the volume and start/stop of the sound.

    //load sound without streaming
    mySound = new Sound();
    mySound.loadSound("mymp3.mp3",false);
    mySound.onLoad = function(){
    mySound.start();
    }

    //load sound with streaming
    loadSound("mymp3.mp3",true);

    with streaming, it will automatically start playing once adequate info has been loaded.

    cheers,

    bret
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Posts
    5
    Rep Power
    0
    Its not a external mp3 its a external swf file with muisc playing.
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Posts
    1
    Rep Power
    0
    Try it :


    on (release) {
    _root.contents.loadMovie("data.swf",1);
    }


    or

    on (release) {
    _root.contents.loadMovie("data.swf","1");
    }


    may be first is right

IMN logo majestic logo threadwatch logo seochat tools logo