A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: [F8]loadClip problem loading image

  1. #1
    Junior Member
    Join Date
    Mar 2007
    Posts
    24

    [F8]loadClip problem loading image

    I have a very annoying problem with the loadClip function and hopefully someone can help me out here. I'm trying to load this image http://s3.amazonaws.com/livehit_pict...-carpenter.jpg using the loadClip function. However, this image being forced to be downloaded, the loadClip function doesn't load the image, nor does it return an error. It just fails silently.

    The weird part is that the loadMovie function does load the image just fine... however, I can't use loadMovie as I need to have progress tracking enabled.

    Can anyone help out? Is there a workaround this?

    Thanks.

  2. #2
    Senior Member EQFlash's Avatar
    Join Date
    Jun 2002
    Location
    where i'm at
    Posts
    2,735
    try this. if you want to use a movie clip you already have on the stage, remove the first line (createEmptyMovieClip) from the script and at the bottom, where it says, mcloader.loadClip(), substitute container for the instance name of your movieclip. loadClip has to have a movieclip to load the image to. hope this helps
    PHP Code:
    var container:MovieClip this.createEmptyMovieClip("container"this.getNextHighestDepth());

    //Create MovieClipLoader
    var mcLoader:MovieClipLoader = new MovieClipLoader();
    ///Add listener Object to listen for the incoming movieclip
    var listener:Object = new Object();
    ///track progress of loading object, i.e. the movieclip
    listener.onLoadProgress = function(target:MovieClipbytesLoaded:NumberbytesTotal:Number):Void  {
        
    trace(target+".onLoadProgress with "+bytesLoaded+" bytes of "+bytesTotal);
    };
    ///tell flash to listen for the incoming movieclip
    mcLoader.addListener(listener);
    //load the image to the movieclip
    mcLoader.loadClip("http://s3.amazonaws.com/livehit_pictures/STAR1161-charisma-carpenter.jpg"container); 

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