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

Can you do this: myMC.getChildAt(3).addChild(imgLoader);

New Here ,
Mar 23, 2011 Mar 23, 2011

Copy link to clipboard

Copied

     Flash is throwing errors when I try it. "Scene 1, Layer 'Layer 3', Frame 1, Line 177    1061: Call to a possibly undefined method addChild through a reference with static type flash.display:DisplayObject."

    How could I do this without knowing the name of the child, only the number?

          Thsi is what I tried: myMC.getChildAt(3).addChild(imgLoader);

TOPICS
ActionScript

Views

449

Translate

Translate

Report

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

correct answers 1 Correct answer

Community Expert , Mar 23, 2011 Mar 23, 2011

cast that child as a displayobjectcontainer:


DisplayObjectContainer(myMC.getChildAt(3)).addChild(imgLoader);

Votes

Translate

Translate
Community Expert ,
Mar 23, 2011 Mar 23, 2011

Copy link to clipboard

Copied

LATEST

cast that child as a displayobjectcontainer:


DisplayObjectContainer(myMC.getChildAt(3)).addChild(imgLoader);

Votes

Translate

Translate

Report

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