00:00
00:00
HeroPower
Been teaching myself programming since the start of 2014. Making simple games for now but as my knowledge grows so will my projects!

Age 37, Male

Indie Game Dev

Oregon

Joined on 12/13/05

Level:
25
Exp Points:
6,770 / 6,940
Exp Rank:
6,117
Vote Power:
6.69 votes
Art Scouts
3
Rank:
Police Officer
Global Rank:
10,930
Blams:
326
Saves:
533
B/P Bonus:
10%
Whistle:
Normal
Trophies:
1
Medals:
579
Supporter:
2y 2d

Comments

DisplayObjectContainer --> getChildAt

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....

DisplayObjectContainer --> numChildren

I like that your giving me short answers to make me work for understanding it. Something is just not clicking with me.

With my previous example in my previous response: container.numChildren would be 5. Doing container.getChildAt (2 or 3 or 4) would show one of the coins...

I feel like I'm missing something to glue this all together. I know doing numChildren will show me everything in that containers display list which then allows me to use getChildAt to grab one object out of it. But that's it. The only thing I've learned to do with these two things are to change the stacking order in the display list...

....and now after playing around with it more I realize I can declare a new variable and make that equal the getChildAt object and use that for hit detection....but that still is just for that one single coin and not the rest....dude I'm lost...toss me another hint...