Professional Web Applications Themes

preloaders, why do people make 32000 tutorials on how to make them but NONE on how to USE! - Macromedia Flash

I think I seen thousands of tutorials on how to make a preloader, but what then? Im sitting there with my little load bar and some scripts .. but so what? The tutorials always ends with: " .. and there you go, thats how you make a preloader .. " Well, HOW do I get to USE it? I have three layers and then it just ends with a STOP. The typical thing with all these fantastic lessons on how to make a preloader is that they always have this line at the end: .. "by the way, don't mind ...

  1. #1

    Default preloaders, why do people make 32000 tutorials on how to make them but NONE on how to USE!

    I think I seen thousands of tutorials on how to make a preloader, but what
    then? Im sitting there with my little load bar and some scripts .. but so
    what? The tutorials always ends with: " .. and there you go, thats how you
    make a preloader .. "

    Well, HOW do I get to USE it? I have three layers and then it just ends with
    a STOP. The typical thing with all these fantastic lessons on how to make a
    preloader is that they always have this line at the end: .. "by the way,
    don't mind the stop at the end in my example, its just because I dont have a
    movie .."

    Well, I have!! So, HOW do you put it to use??? Here is the latest very
    typical example:

    [url]http://www.kirupa.com/developer/mx/percentagepreloader.htm[/url]



    Close to giving up ..





    Bjørn J. Torsen Guest

  2. #2

    Default Re: preloaders, why do people make 32000 tutorials on how to make them but NONE on how to USE!

    On Sat, 04 Dec 2004 05:53:33 GMT, "Bjørn J. Torsen" <bjtosonline.no> wrote:

    >Well, HOW do I get to USE it? I have three layers and then it just ends with
    >a STOP. The typical thing with all these fantastic lessons on how to make a
    >preloader is that they always have this line at the end: .. "by the way,
    >don't mind the stop at the end in my example, its just because I dont have a
    >movie .."
    >
    >Well, I have!! So, HOW do you put it to use??? Here is the latest very
    >typical example:
    >
    >[url]http://www.kirupa.com/developer/mx/percentagepreloader.htm[/url]
    You take and replace the stop with a goto frame _movie. Just think of the pre
    loader as it's own movie.
    TheWB and an old web site that had hundreds of games had pre loaders that were
    actual games. simple games, pick a number, swat the fly, smack this before it
    turns blue etc.. Just an animated distraction in a do-while loop while the main
    swf loaded.
    This one you cite tells you exactly how to use the pre-loader.
    > Ex :{ Frame 2 Actions }
    > Ex :
    > Ex :this.gotoAndPlay(1);
    > Ex :
    > Ex :Well this is pretty self explanitory, but I will explain anyway. Ok, if all the bytes are not loaded in your movie in frame one, it will automatically move on to frame two, since we can't let it pass frame two yet because the movie isn't loaded we will have to send it back to frame one. This will keep looping around over and over until both the bytes_loaded and the bytes_total variables are equal in numbers. Then the if statement declared at the end of the actions in frame one will send the movie directly to frame three and your movie will start from there.
    > Ex :
    The above is at the very bottom of the example you gave.
    having a 2 frame pre-loader isn't a necessity. just the actions in the 1st and
    last frame of the pre loader.
    1st frame start the pre loader
    last frame see if conditions {bytes_loaded and the bytes_total} variables are
    equal in numbers. If not back to frame one. You're just introducing a machine
    delay, by making it repeat frame 1 thru the last frame of the loader until the
    entire movie, or a set percentage is met. It may repeat that process several
    thousand times depending mostly on speed of your connection. T1 or T2 load
    instantly, no repeats. crappy 28.8, 200,000 repeats.


    In the above, frame 3 would be where your movie is inserted.

    --
    more pix [url]http://members.toast.net/cbminfo/index.html[/url]
    Husky Guest

  3. #3

    Default Re: preloaders, why do people make 32000 tutorials on how to make them but NONE on how to USE!

    I think that is because most people who find those files have already tried
    to make one, and the code is confusing; the method is pretty
    straightforward. You want your file to wait until it is totally loaded
    before it starts playing, or else loop.

    //looping script
    if( _root.getBytesLoaded() < _root.getBytesTotal() ){
    prevFrame();
    }else{
    play();
    }
    //loading text
    _root.myPercent = int(100*(_root.getBytesLoaded/_root.getBytesTotal) + "%
    loaded");
    //graphic loading bar
    _root.myLoadingBar._xscale =
    int(100*(_root.getBytesLoaded/_root.getBytesTotal));

    STEP ONE: DO THE LOOP
    Frame 1:
    play();

    Frame 2:
    if( _root.getBytesLoaded() < _root.getBytesTotal() ){
    prevFrame();
    }else{
    play();
    }

    This says: if the number of bytes loaded is less than the total file size,
    go back to frame 1. Otherwise, play the movie.

    STEP TWO: TELL THE USER WHAT THE HELL IS GOING ON
    To display the percent as text, put a right-justifed dynamic text box called
    'myPercent' (or whatever, I guess you could call it 'Bob') and put this line
    of code in Frame 2:

    _root.myPercent = int(100*(_root.getBytesLoaded/_root.getBytesTotal) + "%
    loaded");

    That will display the percent of movie loaded, as an integer. The text is
    right-justified so that when the number changes, the rest of the text
    doesn't bounce around like an old Corrola without shocks.

    STEP THREE: SHOW THEM GRAPHICALLY, BECAUSE YOU CAN.
    (Really not necessary, but at least it's better than those fake preloaders
    that loop over and over and don't show what's really happening.)

    The easiest way to do this is to draw a bar the same length as the text, and
    turn it into a symbol (F8). Name the instance 'myLoadingBar'. Then, in Frame
    2, put this code:

    _root.myLoadingBar._xscale =
    int(100*(_root.getBytesLoaded/_root.getBytesTotal));

    Now the bar will grow from 0% to 100% as the movie loads.

    ALL DONE!
    If you want to see it work, because for some reason you don't have a real
    movie (?) make a movie with three frames. Put actions on the first layer,
    with the above code in Frames one and two, and in the third frame put:

    stop();

    On layer two, in the first two frames, put the text box and the loading bar.
    These should be present in both frames, so when it loops they are on the
    screen. Then, in frame three, under the stop action, hit F7 (make a blank
    keyframe) and put a photo.

    Now, layer 1 should have three frames with actions (play(), the percent
    looping script, and stop()) and layer two should have two frames with the
    loading text and bar, and one frame with a photo. When you test the movie,
    you can set the simulated load time to imitate a 56kb modem, and it will
    chow you the percent loading. Whee!

    And seriously, switch to decaf. This is supposed to be fun. The reason the
    other preloader tutorials stopped after the first two frames is because
    that's all you need; just put it at the beginning of any movie.

    Jeremy

    "Bjørn J. Torsen" <bjtosonline.no> wrote in message
    news:xhcsd.58074$K7.32247news-server.bigpond.net.au...
    >I think I seen thousands of tutorials on how to make a preloader, but what
    > then? Im sitting there with my little load bar and some scripts .. but so
    > what? The tutorials always ends with: " .. and there you go, thats how you
    > make a preloader .. "
    >
    > Well, HOW do I get to USE it? I have three layers and then it just ends
    > with
    > a STOP. The typical thing with all these fantastic lessons on how to make
    > a
    > preloader is that they always have this line at the end: .. "by the way,
    > don't mind the stop at the end in my example, its just because I dont have
    > a
    > movie .."
    >
    > Well, I have!! So, HOW do you put it to use??? Here is the latest very
    > typical example:
    >
    > [url]http://www.kirupa.com/developer/mx/percentagepreloader.htm[/url]
    >
    >
    >
    > Close to giving up ..
    >
    >
    >
    >
    >

    Jeremy Guest

  4. #4

    Default Re: preloaders, why do people make 32000 tutorials on how to make them but NONE on how to USE!


    "Jeremy" <dontbother.com> wrote in message
    news:2Etsd.40016$Ch2.18128bignews5.bellsouth.net. ..


    This is supposed to be fun. The reason the
    > other preloader tutorials stopped after the first two frames is because
    > that's all you need; just put it at the beginning of any movie.
    >
    > Jeremy

    Well, it is at this stage the fun ends in my case cause I have tried to
    figure out HOW to open the other movies I have with no loaders so that I
    could put the preloader I made in the tutorial to use, but it never works!
    That's what I meant about no tutorials on HOW to use the preloaders.

    When I open a second file (movie) I then have 2 files open next to eachother
    in MX2004, both files have 1 scene each. Then I copy every layer from the
    movie and paste as first layer in the preloader file, then I try see if it
    goes to the first frame in scene to by altering the script, insted of 1 I
    write 2.
    Example: this.gotoAndPlay(1); I then rewrite to this.gotoAndPlay(2);


    I have also tried to copy the three layers from my preloader file and paste
    then INFRONT of my movie and alter the last framescript in my loader so that
    it goes the first frame in my movie. I do this by labeling the first frame
    in my movie, it never works. I have tried a large amount of technices to try
    to find this (1) but where it is? The first frame in whatever movie that are
    open?? Ive had problems like this before when MX2004 doesnt wanna swallow
    any .gotoAndPlay stuff at all!

    Frustrating ..



    Bjørn J. Torsen Guest

Similar Threads

  1. i really wana make flash which prog do i download? andhow do i make it?
    By bob dole rules!!!!! in forum Macromedia Flash Flashcom
    Replies: 2
    Last Post: January 14th, 07:26 PM
  2. Replies: 1
    Last Post: January 27th, 05:13 AM
  3. GNU make & make.pl are dead: long live Perl makepp
    By Daniel Pfeiffer in forum PERL Miscellaneous
    Replies: 1
    Last Post: September 9th, 07:31 AM
  4. Closed minded people make me angry
    By Bot-tastic in forum Photography
    Replies: 3
    Last Post: July 19th, 10:49 AM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139