A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Can't preload image

Threaded View

  1. #1
    Junior Member
    Join Date
    Oct 2004
    Posts
    12

    Can't preload image

    Hello,
    Right now I'm tryin to preload an image in a scene with a place holder movieclip. I can't get it to preload for the life of me. Does anyone know what I'm doing wrong? anytime I test it, it doesnt work. I have searched the forum and tried all the different examples but can't get it to work. Any help in the matter would be greatly appreciated.

    It always skips the preloader, and then is blank until the image actually finishes loading.

    frame 1

    Code:
    placeholder.loadMovie("ext/images/entrees.jpg");
    
    bytes_loaded = Math.round(placeholder.getBytesLoaded());
    bytes_total = Math.round(placeholder.getBytesTotal()); 
    getPercent = bytes_loaded/bytes_total; 
    loadPercent = Math.round(getPercent*100); 
    loadPercent = loadPercent + "%";
    
    
    if (bytes_loaded == bytes_total) { 
    gotoAndPlay(3); 
    }
    
    frame 2
    
    gotoAndPlay(1);
    edit: when I try and test the variable "bytes_total" I do not get any bytes for it, I'm assuming it's how I am referencing the file.
    Last edited by ManslyAvite; 11-05-2005 at 10:20 PM.

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