A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Preload multiple Swf Help

  1. #1
    Who needs pants? hooligan2001's Avatar
    Join Date
    Apr 2001
    Location
    Somewhere
    Posts
    1,976

    Preload multiple Swf Help

    Hey peeps, working on a project at the moment which i have broken up into several individual swf's. Now i have about 3 swfs that i want to load to movie clip containers on the stage. Now thats not a problem but when i try to implement a preloader to display progress it just seems to show 0% and then 100% when its done rather then progressivly as the file loads. And the same with the _xscale of the loader bar. Here's what i have done.

    www.freshvision.com.au/game/test_load.htm
    and the fla is here
    http://www.freshvision.com.au/game/load_screen.fla

    If anyone can fix this or has a better way to go about this. Please do tell.

    Thanks

  2. #2
    Who needs pants? hooligan2001's Avatar
    Join Date
    Apr 2001
    Location
    Somewhere
    Posts
    1,976
    Anyone?

  3. #3
    Who needs pants? hooligan2001's Avatar
    Join Date
    Apr 2001
    Location
    Somewhere
    Posts
    1,976
    I just treid
    PHP Code:
    onClipEvent(load) {
        
    loadArray = new Array ("character","tile","sound","music");
        
    numFiles loadArray.length;
    //    trace(numFiles);
    //     trace(loadArray);
    }

    onClipEvent(enterFrame) {
        for(
    0numFilesi++) {
            
    contName loadArray[i]+"_cont";
    //        trace(contName);
            
    contName.loadMovie(loadArray[i]+".swf");
            
    total contName.getBytesTotal();
            do {
                
    loaded contName.getBytesLoaded();
                
    percent = (loaded/total)*100;
                
    percent_txt Math.round(percent)+" %";
                
    percent_bar._xscale percent;
            }while(
    percent != 100)
        }

    Thought it might work, but seems to crash my player. It seems the for loop continues to play? Whys that ?

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