A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: preloader problem...

  1. #1
    Professional Air Guitarist Frag's Avatar
    Join Date
    Dec 2002
    Location
    Brain, Body, Clothes, Computer Chair, Room, House, Neighborhood, City, State, Country, Continent, World, Galaxy, Universe, and on?
    Posts
    811

    preloader problem...

    All I have for a preloader is a dynamic text box with the variable name "loadd". The first frame of the first scene has the actions:

    Code:
     _root.loadd = Math.round((_root.getBytesLoaded()/_root.getBytesTotal())*100) + "%";
    and the second frame...

    Code:
     _root.loadd = Math.round((_root.getBytesLoaded()/_root.getBytesTotal())*100) + "%";
    if (_root.getBytesLoaded() == _root.getBytesTotal()) {
    	_root.play();
    } else {
    	_root.gotoAndPlay(1);
    }
    Good so far? The problem is when I watched it in my browser three fourths of the movie loaded before the preloader showed up.

    Here is the url.

    Thanks in advance!

  2. #2
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Nah!

    Frame1:

    if (_root.getBytesLoaded() >= _root.getBytesTotal()) {
    _root.gotoAndPlay(4);
    } // nothing else on this frame!

    Frame2:

    if (_root.getBytesLoaded() >= _root.getBytesTotal()) {
    _root.gotoAndPlay(4);
    }
    _root.loadd = Math.round((_root.getBytesLoaded()/_root.getBytesTotal())*100) + "%";

    Frame3:

    gotoAndPlay(2);

    Your textfield should be on it's own layer and only over frames 2 & 3. Frame 1 should be clear of any displays, and is only there to skip right to the movie, if it's already in the user's cache.

  3. #3
    Registered User nunomira's Avatar
    Join Date
    May 2002
    Location
    portugal
    Posts
    7,003
    read catbert303's answer here

  4. #4
    Professional Air Guitarist Frag's Avatar
    Join Date
    Dec 2002
    Location
    Brain, Body, Clothes, Computer Chair, Room, House, Neighborhood, City, State, Country, Continent, World, Galaxy, Universe, and on?
    Posts
    811
    its not working oldnewbie.... and I don't understand catbert's answer. If I do catbert's way will my movie be named preloader.swf? I want it to stay as shooting.swf

    any other suggestions?

  5. #5
    Registered User nunomira's Avatar
    Join Date
    May 2002
    Location
    portugal
    Posts
    7,003
    no
    names don't really matter... you can change them
    here is the fla of what he told

    just make the stage the same size your movie is
    and like he told:
    "in your main movie you just need a stop(); action on frame 1"
    (maybe you can use a blank frame as the first frame of your movie... if anything appears before it loads completely just try it first as it is)
    Attached Files Attached Files

  6. #6
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Yeah! Hadn't noticed you had sound on that movie, that your probably exporting on frame 1, and that's what will cause the preloaders to not display properly. You can probably use catbert303's preloader or you could use mine which is very similar but only 1 frame.

    http://www.flashkit.com/board/showth...hreadid=375161

    If you can't download the packgake from the first post, it's also attached to this forum in the middle of page 2 of the same thread:

    http://www.flashkit.com/board/showth...5&pagenumber=2

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