Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > ActionScript Forums Group > ActionScript 3.0

Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
Old 02-23-2012, 03:07 PM   #1
Registered User
Join Date: Feb 2012
Posts: 7
Default How can I find the class of an extended MovieClip when probing the stage?

All my custom classes that extend MovieClip simply trace as "MovieClip" when using stage.getChildIndex(i); I'm trying to search the stage to see what objects have been placed and then add them to the correct array. E.g. if I place 5 "Enemies" on the screen, I want to then add them to an array by searching the stage for the "Enemies" class, without naming each one and adding it manually in the code.

for(var i:int = 0; i < stage.numChildren-1; i++)
Outputs this multiple times:

Last edited by zeritor; 02-23-2012 at 05:51 PM.
zeritor is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 04:53 AM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.