• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 52. Loader > Code Fix!

Code Fix!

Open up a new movie, drag in a Loader component, and call it img_loader.

img_loader.load("cube.jpg");

loaderListener = new Object();
loaderListener.complete = function(eventObject)
{
       // this is fired even when it's something unloadable,
       // like a GIF
       trace(img_loader.content);
       trace(img_loader.contentPath);
}
img_loader.addEventListener("complete", loaderListener);


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint