Results 1 to 7 of 7
  1. #1
    Senior Member
    Join Date
    Jan 2006
    Location
    Utah
    Posts
    60

    Flash 8 PreLoader

    I built this site, www.timelessportraits.net/dave/dave.html using Flash 8 Pro, and for some reason, I'm having troubles with the PreLoader. As you can see, it the pre loader will show up when there is about 20% left to download, but what I am wondering is why it wont show up and start counting from 0%. Here is the code that I put in the preloader...

    myLoaded = Math.round(getBytesLoaded());
    myTotal = Math.round(getBytesTotal());
    myPercent = myLoaded/myTotal;
    myBar._width = myPercent*300;
    derek = Math.round(myPercent*100)+"%";
    if (myLoaded == myTotal) {
    gotoAndPlay(5);
    } else {
    gotoAndPlay(1);
    }

    derek is the variable for the percentage that is downloaded. It all works great except for it wont show up right when you go to the URL. If you need any more info, let me know. Thanks

  2. #2
    Administrator Dave's Avatar
    Join Date
    Sep 2004
    Location
    Te Awamutu, New Zealand
    Posts
    3,959
    Blog Entries
    79

    Re: Flash 8 PreLoader

    Where abouts in the movie is the code located? Ideally it should be in the first frame on the bottom layer (assuming you have the movie set to load from bottom to top). Otherwise the movie is already partly loaded by the time the preloader kicks in.
    Dave Owen
    MediaCollege.com

  3. #3
    Senior Member
    Join Date
    Jan 2006
    Location
    Utah
    Posts
    60

    Re: Flash 8 PreLoader

    OK, I have the action script in the second frame on the bottom layer, with my publish settings at bottom to top. Frame 1 is empty across the board.
    All other contect is at frame 5. Also, I have used this same preloader before, and it works great, the only difference is in this one, the loader box is filling in from the center, I don't know why it's doing that also.

    I now know why it's loading from the center, I had my reference point in the center, but that still doesn't solve my other problem..
    Last edited by dkstaker; 5th Apr 2006 at 23:06.

  4. #4
    Senior Member
    Join Date
    Jan 2006
    Location
    Utah
    Posts
    60

    Re: Flash 8 PreLoader

    Here we go, I figured out the problem, and I think it will be good for other people to know. It was an audio file. It was on the first frame, but I couldn't see it anywhere because it was linked for exporting for ActionScript. So before it would go to frame 2, which is where my preloader was, it had to download that audio file. I didn't need it linked, so I just unlinked it, and it worked great!! Thanks Dave for your quick responses. If there are anymore questions, let me know.

  5. #5
    Administrator Dave's Avatar
    Join Date
    Sep 2004
    Location
    Te Awamutu, New Zealand
    Posts
    3,959
    Blog Entries
    79

    Re: Flash 8 PreLoader

    Good catch! That is indeed a useful thing to be aware of.
    Dave Owen
    MediaCollege.com

  6. #6
    Hi, I have a flash site that is 3mbs and I have three pages that all little time to load. Maybe I am just being picky, but I want to have it look good (of course).

    So my question is: How can I build a preloader just for specific pages (not at the beginning/home page)?

    I have tried about four different ways via online tutorials and Lynda.com.

    I have gotten really close, like when I put it in my design page and I test the movie it works and everything, but because I have actionscript on my buttons to go through my designs, (normally you can go through all the designs and it will take you to the first design again) but when you get to the last design, it takes you back to the preloader.

    Here is the script on my forward button:

    on (release) {
    if (this._currentframe == this._totalframes) {
    gotoAndStop(1);
    } else {
    nextFrame();
    }
    }

    Basically, my site at the beginning loads fine, its just until you click on the design page and a few others that it takes time.

    Thanks in advance,
    Ian

  7. #7
    Administrator Dave's Avatar
    Join Date
    Sep 2004
    Location
    Te Awamutu, New Zealand
    Posts
    3,959
    Blog Entries
    79
    To be honest I'm not following you 100%. It's also pretty hard to imagine your situation without being able to see it.

    But here's one suggestion for your main question - have you considered having each page as a separate swf file that gets loaded into the main Flash file, then adding the preloader to each swf separately? This would also mean the user only has to load the pages they want to see.
    Dave Owen
    MediaCollege.com

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
  •  
Subscribe to us on YouTube