A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Check loadMovie .jpg complete

  1. #1
    Senior Member
    Join Date
    Aug 2001
    Posts
    128

    Check loadMovie .jpg complete

    Hi there,

    I have used the function

    loadMovie("pictureA.jpg",loadimage);

    to load a .jpg in my movie - how can I check when it has finished loading (before proceeding to do something else)?

    Thanks!
    [swf width="300" height="40" background="#000000"]http://www.zizunetwork.com/zizunetworkcouk.swf[/swf]

  2. #2
    I am not an expert
    Join Date
    Aug 2005
    Posts
    175
    Hi, following code will help you in triggering the action the moment the image gets loaded


    var image_mcl:MovieClipLoader = new MovieClipLoader();
    var mclListener:Object = new Object();
    mclListener.onLoadInit = function(target_mc:MovieClip) {
    target_mc._width = target_mc._width - (target_mc._width-100);
    target_mc._height = target_mc._height - (target_mc._height - 100);
    };
    image_mcl.addListener(mclListener);
    image_mcl.loadClip("pictureA.jpg", loadimage);

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