Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 1 of 1
  1. #1
    Junior Member Kirsty81's Avatar
    Join Date
    Nov 2008
    Location
    England
    Posts
    1
    Member #
    17750
    Hi Whoever's reading this
    I've been working on a website in Flash, and having real trouble with the preloader. What's annoying is that i've copied a preloader from another website I did (which a friend kindly action-scripted for me, but is no longer available to contact)
    Whilst most of it is over my head, I can't see any obvious things that need to be tweaked to fit my NEW website, which is very similar (3 scenes, similar format etc) It's all untouched from the last one, all i did was paste in the frames into a new fourth scene at the beginning (see attached image) & added an 'end' keyframe at the end of the very last scene.
    Here's the actionscript for the first frame of the preloader...
    // lbytes stores the current bytes that have loaded
    var lbytes = _root.getBytesLoaded();
    // tbytes stores the total bytes of the movie
    var tbytes = _root.getBytesTotal();
    // loaded_bytes stores the current bytes that have loaded in a
    // neat rounded down number for display
    loaded_bytes = Math.ceil(_root.getBytesLoaded()/1000) add " KB" add " OF";
    // total_bytes stores the total bytes of the movie in a
    // neat rounded down number for display
    var total_bytes = Math.floor(_root.getBytesTotal()/1000) add " KB";
    // percentLoaded calculates the percent of the movie that
    // has loaded into the Flash Player
    var percentLoaded = Math.floor((lbytes/tbytes)*100);
    // Apply the percentLoaded value to the X scale of the
    // bar instance within the loader instance
    _root.loader.bar._xscale = percentLoaded;
    // Fill the percent text field within the loader instance
    // with the percentLoaded value follwed by the text "%"
    _root.frame = percentLoaded;
    remaining = Math.round(int(tbytes-lbytes)/(lbytes/time_elapsed)) add " secs";
    // remaining stores the sconds that the movie has left to load
    if (lbytes>=tbytes) {
    gotoAndPlay(3);
    }
    // When content loaded loads next scene

    Please if anyone has any suggestions about this script (or even an alternative version) i'd be so grateful!
    Thank you
    Kirsty x
    Attached Images Attached Images

  2.  


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 07:16 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com