views:

117

answers:

0

Hi, I'm using Flash CS4 and the following ActionScript 3 code:

import fl.containers.ScrollPane;
//
var sp:ScrollPane = new ScrollPane();
sp.name="scroller";
//
sp.setSize(320, 240);
sp.move(10, 10);
addChild(sp);
// 
var mcCount:int=10;
// 
var nextY:int=0;
// 
var i:int=0;
//
var holder:MovieClip = new MovieClip();
holder.name="container";
//
addChild(holder);
//
for (i=0; i<mcCount; i++) {
    //
    var q:quad = new quad();
    q.name="u"+i;
    //
    q.y=nextY;
    //
    holder.addChild(q);
    //
    nextY+=q.height+1;
}
//
sp.source=holder;
//
sp.addEventListener(ProgressEvent.PROGRESS, progressHandler);
sp.addEventListener(Event.COMPLETE, completeHandler);
//
trace(sp.content);
//
function progressHandler(event:ProgressEvent):void {
    var bLoaded:int=event.bytesLoaded;
    var bTotal:int=event.bytesTotal;
    var pctLoaded:int=int(event.currentTarget.percentLoaded);
    trace("progress: " + bLoaded + " of " + bTotal + " bytes loaded (" + pctLoaded + "%)");
}
//
function completeHandler(event:Event) {
    trace("complete");
}
//

I run it and look at the debugger ("List Objects" menu): I can't understand why the path to u0, u1, u2, etc. quad instances I create is the following:

_level0.scroller.instance22.container.u7

What is "instance22"? Where does it come from?

Thanks