AS3 instance name for customized class instance

Hi,

I’m trying to do this xml gallery, I created this dot class, it’s like the thumbnails, if you click on different dots you get different pictures showing. so here’s how i approached

I created dots according to my xml, and I added those dots to the dotContainer


private function callDots(num:Number):void
        {                
            for (var i = 0; i < subImagesTotal[num]; i++)
            {
                var d:Dot = new Dot();
                dArray* = d;
                d.gotoAndStop(2);
                d.x = i*23;
                d.y = 0;
                
                d.name = i;
                dotContainer.addChild(dArray*);
            }
        }

and I created the dotContainer


public function createContainer():void{
            dotContainer = new MovieClip();
            dotContainer.x = 245;
            dotContainer.y = 548;
            addChild(dotContainer);
       
            container_mc.buttonMode = true;
            dotContainer.buttonMode = true;
            dotContainer.addEventListener(MouseEvent.CLICK, callFullSub);
        }

The problem happens here, I’ve given name to each dot in the callDots function, and if I trace
them there, it will return a number, however, if I call them in callFullSub


private function callFullSub(e:MouseEvent):void{
            var full_loader:Loader = new Loader();
            var temp:XMLList = subImages[sub];
            var full_url = temp[e.target.name].@IMG;
            
            full_loader.load(new URLRequest(full_url));
            full_loader.contentLoaderInfo.addEventListener(Event.INIT, fullLoaded);
        }

it wont give me numbers, instead, it gives me “instance66” “instance69”
or something like that, does this has anything to do with the fact that “dot”
is a customized class instance? Thanks in advance. :slight_smile:

christine