A Flash Developer Resource Site

Results 1 to 10 of 10

Thread: movie won't preload.

  1. #1
    I'm a software engineer!
    Join Date
    Dec 2004
    Location
    Ashburn, Virginia
    Posts
    33

    movie won't preload.

    Hi, i have my movie here: http://www.jsment.com there is a preloader in there but as you can see, when you go to the site, it does not preload. you can see it downloading in ur browser but the preload screen does not come up. what am i missing? here is how my movie is set up:

    first frame contains a movieclip which is the loader. within this clip is one frame: using actionscript and the onEnterFrame event, I dynamically resize a shape within the frame. this is all, when the loading movie notices that the getBytesLoaded > getBytesTotal it says _root.gotoAndPlay(2).

    I do not see the loading screen at all (you may see it for a split second after the entire swf has downloaded.

    What's the deal? do I need to attach the fla?

    Thanks,
    Josh

  2. #2
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Attach sounds in that player?

    At least post your preloader code.

  3. #3
    I'm a software engineer!
    Join Date
    Dec 2004
    Location
    Ashburn, Virginia
    Posts
    33
    here is the code within my loading movie (there is only one frame):

    stop();

    onEnterFrame = function()
    {
    movChunk._width = (_root.getBytesLoaded() / _root.getBytesTotal()) * 200;

    if(_root.bytesLoaded() >= _root.bytesTotal())
    _root.gotoAndPlay(2);
    }

    and here is the code on the second frame of the root movie:

    var iCurrentTrack = 1;
    var oBGM = new Sound(this);

    playTrack(iCurrentTrack);

    function playTrack(iTrack)
    {
    if(iTrack >= 1 && iTrack <=2)
    {
    iCurrentTrack = iTrack;

    oBGM.stop();
    oBGM.attachSound("audio_BGM_" + iTrack);
    oBGM.setVolume(50);
    oBGM.start(0,0);
    }
    }


    oh and in the publish settings, what is the difference between the bottom up and top down load orders?

    ive uploaded the fla's to my server:

    http://www.jsment.com/Source/main.fla

    is the one with the loading script that isnt working.

    thanks,
    josh

  4. #4
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    A 45MBs download? And on a slow server! Hope it's not to find out that the .fla is a MX2004 .fla!

  5. #5
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Yeah it is!

    Unexpected file format! Can't open your .fla.
    You'd have a better chance of getting an answer if your .fla was in a MX only format...And certainely better if zipped up!

    You would have to save a copy of your MX2004 .fla, (using Save as...) and changing the Document type to MX only in the Save as... window.

    And your attached sound would at least be one element that would prevent your preloader from displaying anything before it had all downloaded on the first frame.

  6. #6
    I'm a software engineer!
    Join Date
    Dec 2004
    Location
    Ashburn, Virginia
    Posts
    33
    sorry about that, here is the RARRED project in MX format (i have packaged it as a self-extracting archive incase you dont have an unRARing app):

    http://www.jsment.com/Source_MX.rar.exe

    *** won't be there till 2:10 PM ***

    And yes, I am sure that the attachSound is what is causing the loading page not to load. How can i change this so the page does show while the sounds are being loaded into memory?

    Thanks,
    Josh

  7. #7
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Ok! Got it, but quite busy now on my regular day job, I should be returning to, even if it's Sunday... Will look into it later, or sometime tonight!

  8. #8
    I'm a software engineer!
    Join Date
    Dec 2004
    Location
    Ashburn, Virginia
    Posts
    33
    *bump* this is for a final project so i REALLY need some insite!! please!!!

  9. #9
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Sorry, but I haven't had time and I'm waisted. Hitting the sack in a few minutes... Somebody else will have to look into it, or I may later tomorrow...

  10. #10
    I'm a software engineer!
    Join Date
    Dec 2004
    Location
    Ashburn, Virginia
    Posts
    33
    got it, i am loading each BG music loop into a sound object on the first frame. it works now. thanks
    -josh

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center