One question about the code
each time mc icons
as in
Quote:
icons.addEventListener(MouseEvent.CLICK, showImage);
var photo:MovieClip = new MovieClip();
addChild(photo);
function showImage(e:MouseEvent):void {
photo.alpha = 0;
var loader:Loader = new Loader();
loader.load(new URLRequest(icons.getChildAt(0).name + ".jpg"));
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, fadeImage);
photo.addChild(loader);
photo.addEventListener(MouseEvent.CLICK, hideImage);
}
I understand where it works but I am curiose as to how.
It makes to refference to each photo, yet each picture corresponds perfectly with each icon.I see that with icons.getChildAt(0).name+"jpg")); it calls up a picture in order but how does it know which one is first second etc.?
the photos are all named Monroe, Elvis etc.