A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Preload for site?

  1. #1
    Junior Member
    Join Date
    May 2005
    Location
    Denmark
    Posts
    20

    Preload for site?

    Hi

    Iam working on a website in flash mx, and I want to make a preload for the start.

    I have try to do it by my own but I failed..

    I want a simple preload in procent 1 to 100%

    Is here someone there can help me and write how to do it?

    Iam a newbie so please make it easy..


    Please help.

    //Molotov

  2. #2
    An Average User warpdesign's Avatar
    Join Date
    Apr 2002
    Location
    Southern California
    Posts
    331
    Hi.

    Here is a preloader for you that displays the percent. You need to make a dynamic text box on the first frame of your movie and give it an instance name of 'loader'. Then in the frame enter this actionscript:
    code:

    stop();
    this.onEnterFrame = function(){
    loaded = _root.getBytesLoaded(); //get how much has loaded
    total = _root.getBytesTotal(); //get how much needs to load total
    percent = (loaded/total)*100; //figure out percent that has loaded
    round = Math.round(percent); //round it off
    loader.text = round+"%"; //change the display of the percent loaded
    if (loaded >= total){ //if it is done go on to the next frame
    _root.gotoAndStop(2);
    }
    }


    That's it.
    Attached Files Attached Files
    You know what they say:
    Teach a man to fish and you feed him for a lifetime.
    Unless he doesn't like sushi—then you also have to teach him to cook.

  3. #3
    Junior Member
    Join Date
    May 2005
    Location
    Denmark
    Posts
    20

    preloader?

    Thanks for the script.

    I don't know how to put it in to my website..

    Please help me..

    I have attach my fla file in this message can you please put it together?
    http://www.molotovmedia.com/default.fla

    //Molotov

  4. #4
    Member
    Join Date
    Jan 2006
    Location
    South Africa
    Posts
    47
    I also have to make a bar preloader, I have looked at some tutorials, they show you how to make the actual preloader but not how to attach it to the timeline, you know which layers, etc, how many frames. So yeah, I would appreciate the help you can give molotov23 too. Another question, I know what your timeline must look like when the preloader is added kinda, but I saw one that was just for a movie clip that looped, would it look they same for a bar preloader?

  5. #5
    Junior Member
    Join Date
    May 2005
    Location
    Denmark
    Posts
    20
    okay..

    Can you please descripe to me in a little ¨guide¨ how to put the preloader in my project?

    How does it work? Iam not sure about how it works? Is there One or Two SWF file when I export the project? And how does they link together?

    Please help


    //Molotov

  6. #6
    Member
    Join Date
    Jan 2006
    Location
    South Africa
    Posts
    47
    no, there will only be one .swf because the preloader is not a seperate file. The preloader is attached to the very beginning of the timeline. What version of flash do you use then I will post you a example.

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