A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: SWF pause [or loop] until an external JPG is fully loaded... ?

  1. #1
    Registered User
    Join Date
    Jun 2013
    Posts
    1

    Question SWF pause [or loop] until an external JPG is fully loaded... ?

    Hey ya'll, the best way to explain what I am looking for is to imagine it as like a powerpoint [its not but that's what I'm stuck on... anywho]... I have a ton of external JPGs that I'll need to load in one by one as needed into an empty clip [no problem there], what I'm stuck on is that I want the movie to pause [or loop] until the JPG is completely loaded. Once the image is loaded, then the movie resumes playing... for the life of me, I can't seem to figure it out. The play head keeps going then the JPG loads pops in eventually.

    Make sense?

    Thoughts? Suggestions?

    Any help is appreciated! Thanks!

  2. #2
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,780
    Hi,

    You should look into MovieClipLoader()

    example of how it works
    PHP Code:
    PictureLoader = new MovieClipLoader();
    PictureListen = new Object();
    PictureLoader.addListener(PictureListen);

    PictureLoader.onLoadStart = function()
    {
        
    // image starts loading
        // stop movie
    };
    PictureLoader.onLoadProgress = function()
    {
        
    // image is loading
        // movie paused
    };
    PictureLoader.onLoadComplete = function()
    {
        
    // image is complete
        // movie paused
    };
    PictureLoader.onLoadInit = function()
    {
        
    // do commands
        // play movie
    };

    PictureLoader.loadClip("imag1.jpg",_root.loadArea); 

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