Two days spent trying to learn Arrays and Loops....
I kinda grasp the loops...well...I've only learned the "for" loop. Still have to look into the other types.
And I kinda grasp the Arrays and all it's properties.
But when I go to make use of it in a game test project it all goes to hell. Trying to access coins on the stage (pre-existing in a MC container that was added to the stage). Think old school Mario. If, for example, the level had 100 coins it would be like 300 lines of code to call a function for each instance name of the coin. I know their must be a way to target each coin MC individually using Arrays and Loops. I just don't know how to do it if they are already on stage because they were inside an container MC I added to the stage ( I don't want to addChild every damn coin individually to the container).
Blah...blah....bitch....bitch....
I'll try again tomorrow. It's late and I have a long ass class tomorrow.
Odds are I'll see you peeps in the forums soon.
kkots
DisplayObjectContainer --> getChildAt
HeroPower
Wouldn't that only grab one instance of the coin? If I add my level container to the stage and its display list was (for example) background, player, coin, coin, coin: wouldn't container.getChildAt(3) just grab a single coin? Maybe I'm missing a step on what to do after this....