Not signed in (Sign In)

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.


    • CommentAuthorashmi
    • CommentTimeOct 26th 2006
     
    Hi,

    I have a swf which contains 10 dynamically loaded JPEGS into 10 different image holders i.e. Empty movie clips

    The images are called into the holders using:

    loadMovie("images/image1.jpg", "holder1");

    Some images dont load up in time for the animation. Is there a way that i can preload these dynamically loaded images with the swf file so they all run normally?
    • CommentAuthorjustnajm
    • CommentTimeNov 17th 2006
     
    First load all the images at once on the start of the movie by stoping the movie on first frame( this frame can be an empty frame ). Check that all the images are loaded then play frame 2.

    First frame code:

    stop(); // stop the movie at frame one

    this.onEnterFrame = function(){ //continue to load movie frame by frame.

    If(this.getBytesLoaded == this.getBytesTotal) {//check wether all images loaded or not is the file complete to play

    gotoAndPlay(2); //play frame 2

    } //end if

    } //end function