Hey, I’ve got an image slider that I’m trying to convert to external classes (OOP and everything). I’ve got four bars on stage (bar1, bar2, etc.) and I’m shifting them left and right from a “Shifter” class through library linkage. I can get the individuals to shift, but I want more than one to shift (click the right-most one and all open, click the left-most one and only it opens). Like an accordion, basically. I’m new to OOP, and I can’t access the individual instances. So far, I can trace the instances using:
for (var i:int=0; i < numChildren; i++) { trace(getChildAt(i).name)}
(and get: instance1, instance2, etc.)
How do I record the instance into my external class? Something like:
(very rough example)
var bar1:Object = getChildAt(i);
var bar2:Object = getChildAt(i + 1);
etc, etc
I’ve tried pushing them into an array. No luck. Plus I still code pretty slopily (if it isn’t obvious). Any help is much appreciated!:proud: