Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

which children in which movieclip

Contributor ,
May 17, 2013 May 17, 2013

I've made an array of movieclip instances, clipArray[0] to clipArray [16]. They are places inside 3 movieclips. Eight are place inside the left clip, 8 inside the right and the center is still empty. Got button instances on all of them. When I click on such an array clip it moves the the center movieclip.

Now I want to determine how much array clips are left in the movieclip in which I just clicked on an array clip. So let's say I've got 8 array clips in movieclip colomn 'leftClips'. In that left column I click on one of the clipArray[] clips so it moves to the center movieclip column. Now I want to read how many clips are still left in the left column 'leftClips' (7!) and more specifically which ones.

So if the clipArray[] I just click on was number 6, I'd like to see that clipArray[0] to clipArray[5] and clipArray[7] are still left in movieclip 'leftClips.

How could I do that?

TOPICS
ActionScript
341
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 17, 2013 May 17, 2013
LATEST

you can loop through a parent movieclip using:

for(var i:int=0;i<leftClips.numChildren;i++){

trace(leftClips.getChildAt(i).name);

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines