Creative Commons License

Extra Applications

as1/MovieClip.loadGraph
 
2570no demo link[ code ]2004-11-16 08:36:52
Implements onLoad event when load an external image or an SWF file.

EXAMPLE

_root.createEmptyMovieClip( "myMC", 1 );
myMC.onLoad = function() {
trace("-----------------------------------");
trace( myMC._width + " x " + myMC._height );
trace("-----------------------------------");
}
myMC. loadGraph("image.jpg");

N.B. don't use this reference inside onLoad event, that's not a prototype, just an on-the-fly function declaration.