For whatever reason, I can’t seem to call [color=darkorange]myMovieClipLoader.(url,target)[/color][color=black] to load a MovieClip from within a method of a custom class. It works fine when I call it in the timeline.[/color]
Is it possible, or are my moviecliploaders going to have to live in the timeline?
like with loadMovie, getting methods like that from MovieClipLoader to work is simply a matter of correct timeline referencing. These objects dont have to be called or be defined in a timeline, they just need to be able to correctly reference what it is they’re operating on, in your case, target. What is target and are you sure its not undefined? … also, ditch the period (.) between myMovieClipLoader and (url,target);
Using your example .fla in the previous post - this works
class MyClass extends MovieClip {
var mc_imageContainer:MovieClip;
var sourceURL:String = "image_url.jpg";
var mcl_loader:MovieClipLoader;
var listener:Object;
function MyClass() {
mcl_loader = new MovieClipLoader();
listener = new Object();
listener.onLoadComplete = function (target_mc) {
trace ("Movie clip = " + target_mc + " has been loaded");
}
mcl_loader.addListener(listener);
mcl_loader.loadClip(sourceURL, mc_imageContainer);
}
}
“also, ditch the period (.) between myMovieClipLoader and (url,target);”
Blech…it was late I don’t have problems with simple syntax errors - you can safely ignore those. Any time I make them, they are easily corrected. I meant myMovieClipLoader.loadClip(“url”, target).