A Flash Developer Resource Site

Page 1 of 4 1234 LastLast
Results 1 to 20 of 71

Thread: Preloading Problem

  1. #1
    Junior Member
    Join Date
    Jun 2004
    Posts
    14

    Preloading Problem

    hey. I've done a couple of preloaders before, But for some reason, this one isnt working for me. Does anybody know why?

    This is what Im doing:

    First Frame
    loadedbytes = _root.getBytesLoaded();
    totalbytes = _root.getBytesTotal();
    if (loadedbytes >= totalbytes)
    {
    gotoAndPlay(3);
    }
    else
    {
    amount_loaded = int((loadedbytes/totalbytes)*100);
    loaderbar._width = amount_loaded * 3;
    }
    Second Frame
    gotoAndPlay(1);


    The content in 3rd frame is nothing accept actionscript. The actionscript attaches movieclips from the library. I want to preload all the images/mc's in the library, before moving to the 3rd frame.

    Sorry, if it isnt clear. Thanks for any help.

    Darkmonkey

  2. #2
    Member
    Join Date
    Jul 2004
    Location
    Hell
    Posts
    66
    I tried it out, and it works fine for me. Did you forget to put the instance name "loaderbar" on the movieclip of the movie clip? or did you forget to select the "Top Down" loading order option on the export swf screen? Thats all I can think of...

    Here is an example I made using your actions, I added a big song at the end, so that it would take a while to load.

    http://bloodshed. s y t e s . n e t/bsd/yo.html (remove all of the spaces in the url)

    I attached the .fla file, (without the song in it). It is in Flash MX format.

    Hope that helps,

    - Later

  3. #3
    Junior Member
    Join Date
    Jun 2004
    Posts
    14
    Your link didnt work, But I have "bottom up" selected so that must be it. I've never came across that before, Cheers

  4. #4
    Member
    Join Date
    Jul 2004
    Location
    san jose,ca
    Posts
    38
    I think it has something to do with your 3rd frame with actionscript attached to it. I am having the same kinda proble, so far no luck.
    Thoguht you might wanna take a look my thread.
    Hopfully, we'll solve this problem.

    http://www.flashkit.com/board/showth...postid=2973807

  5. #5
    Junior Member
    Join Date
    Jun 2004
    Posts
    14
    Yeah, I still have no luck. It seems to skip to the 3rd frame, and wait for the movie clip to load

  6. #6
    Senior Member
    Join Date
    Sep 2003
    Posts
    107
    I have read that there is a bug in Flash in a few threads on this subject. I also have a few preloaders on a page I am working on. All of them are the same, code wise (the frames are just copied to different MC's), and some of the preloaders work fine, some only show the load bar and my spinny graphic at the end of the load sequence for 1/11 of a second, and some work fine except my spinning logo doesn't spin.

    It is so weird because they are litterally just copied frames between files.

  7. #7
    Member
    Join Date
    Jul 2004
    Location
    Hell
    Posts
    66
    My link does work, u have to remove the spaces inbetween each letter, the reason I put spaces in is because, for some reason this site bleeps it out other wise, look i'll try right now

    http://bloodshed.**********/bsd/yo.html

    see?

    The preloader works for me, the third frame is fine. Try using the .fla file I attached.

  8. #8
    Junior Member
    Join Date
    Jun 2004
    Posts
    14
    Yeah, Yours is working fine. Not sure what the difference is. I cant seem to find your .fla
    Last edited by TheDarkmonkey; 07-07-2004 at 04:25 PM.

  9. #9
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    If you're all using components, and/or attached movie clips and/or sounds (both with linkage set to "export on the first frame"), and/or setting up new fonts in the Library, then that's your problem right there. All downloading elements on the first frame, will prevent your preloader from showing up, until they have all downloaded.
    One workaround is to create a new preloader only movie, that will preload your present main movie, cleared of any of it's own preloader.

    http://odin.prohosting.com/~oldnew/f...ng/preload.htm

    http://odin.prohosting.com/~oldnew/f...ng/preload.zip

    The above will preload your main movie and the preloader will be displayed from the start.

  10. #10
    Junior Member
    Join Date
    Jun 2004
    Posts
    14
    Ah, thanks. I'll try that

  11. #11
    Member
    Join Date
    Jul 2004
    Location
    Hell
    Posts
    66
    Originally posted by stacyfla
    I think it has something to do with your 3rd frame with actionscript attached to it. I am having the same kinda proble, so far no luck.
    Thoguht you might wanna take a look my thread.
    Hopfully, we'll solve this problem.

    http://www.flashkit.com/board/showth...postid=2973807
    Read my replay to your post, that is what ur prob is, don't know if thats the same prob u have darkmonkey.

    http://www.flashkit.com/board/showth...postid=2973807

  12. #12
    Member
    Join Date
    Jul 2004
    Location
    Hell
    Posts
    66
    Originally posted by TheDarkmonkey
    Yeah, Yours is working fine. Not sure what the difference is. I cant seem to find your .fla
    Opps, gues I didn't post the .fla. Here it is though.
    Attached Files Attached Files

  13. #13
    Junior Member
    Join Date
    Jun 2004
    Posts
    14
    Thanks, But oldnewbies method worked great, Cheers

  14. #14
    Member
    Join Date
    Jul 2004
    Location
    Hell
    Posts
    66
    Originally posted by TheDarkmonkey
    Thanks, But oldnewbies method worked great, Cheers
    u don;t have to go through that hassle if u just put ur swf file in a .html file. Like i put in the other guys post.

  15. #15
    Member
    Join Date
    Jul 2004
    Location
    san jose,ca
    Posts
    38
    Originally posted by Hells Fury
    Read my replay to your post, that is what ur prob is, don't know if thats the same prob u have darkmonkey.

    http://www.flashkit.com/board/showth...postid=2973807
    oops, I thought it was the same problem..hehe...my bad
    I'm trying your method, thanks

  16. #16
    Member
    Join Date
    Jul 2004
    Location
    Hell
    Posts
    66
    Originally posted by stacyfla
    oops, I thought it was the same problem..hehe...my bad
    I'm trying your method, thanks
    actually, I think drakmonkey had the same problem, he is using oldnoobs method, which is fine, just makes the whole thing more complicated then it actually has to be. And may screw up some of your actionscripting in the movie.

  17. #17
    Member
    Join Date
    Jul 2004
    Location
    san jose,ca
    Posts
    38

    still not working.....

    Hells Fury,
    I tried it and still not working though, and I don't really understand oldnewbie's method.

    Oldnewbie,
    Does it mean I should link my button from my website to the preloader, then link the preloader to a html file which contains my main movie swf,instead of the second scene? (this main movie is a popup window from my website)
    If so, I don't know how to change the code.......can you tell me?

    here are my codes now:

    FOR PRELOADER:
    *first frame:

    total = _root.getBytesTotal();

    *second frame:

    percent = int((_root.getBytesLoaded()/total)*100);
    _root.infotxt = "[ "+percent+" % ]";
    // textfeld update
    if (percent<=50) {
    _root.mask1.maske._rotation = -(360/100)*percent;
    } else {
    _root.mask1.maske._rotation = -180;
    _root.mask2.maske._rotation = -(360/100)*(percent-50);
    }

    *third frame:

    if (percent>=100) {
    gotoAndPlay("main", 1);
    } else {
    gotoAndPlay(2);
    }

  18. #18
    Member
    Join Date
    Jul 2004
    Location
    Hell
    Posts
    66
    Stacyfla, in internet explorer do this,

    1.Click Tools > Internet Options

    2. Click Delete Files

    3. Select Delete all offline content

    4. Press ok

    5. Go to your .html file on your site.

    You will see the loader now, cuz I see it. All you neded to do is delete the .swf file out of ur temp files, that way it reloads it.

  19. #19
    Member
    Join Date
    Jul 2004
    Location
    san jose,ca
    Posts
    38
    ok, now I tried this:
    I made the preloader a seperate swf file and have my website button link to this gallerypreloader.swf, and then made the 3rd frame of preloader link to the gallery.html.
    (code:

    if (percent>=100) {
    getURL("http:www.geocities.com/student_designer/gallery.html", "_self");
    } else {
    gotoAndPlay(2);
    }


    )

    but it still happened really fast , I am not sure if it's working.....

    here is my website, please try the button for me...
    http://www.geocities.com/student_des...ark_order.html

    skip intro, then click the gallery link, then click on the red triangle thing. this will open the gallery prelloader.



    thank you very much~~

  20. #20
    Member
    Join Date
    Jul 2004
    Location
    san jose,ca
    Posts
    38

    I just changed the file though

    Originally posted by Hells Fury
    Stacyfla, in internet explorer do this,

    1.Click Tools > Internet Options

    2. Click Delete Files

    3. Select Delete all offline content

    4. Press ok

    5. Go to your .html file on your site.

    You will see the loader now, cuz I see it. All you neded to do is delete the .swf file out of ur temp files, that way it reloads it.
    yeah, you can kinda see the preloader, but it didn't show up for the first 89% though, that's the problem.
    by the way, I just change the file, so the gallery html file is not including preloader now.

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