A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: [RESOLVED] More missing children...

  1. #1
    Senior Member
    Join Date
    Jun 2002

    resolved [RESOLVED] More missing children...

    So I'm adding more children to the stage and trying to get them on top of some movieclips I'm creating dynamically and sticking to existing clips.

    So I'm able to create the clips just fine and reposition them as well. But when it comes to attaching the mc from my library, they don't appear.

    If I remove the "mc" from the front of addChild they show up, just located at 0,0.

    Thanks for the help.

    Actionscript Code:
    var cardBack = new (getDefinitionByName("cardBack") as Class);
    //the commented line above works fine to add the images...

    //but I would like them on their own clip...
    var mc:MovieClip = new MovieClip();
    mc.name = "mc"+randomPlaceSelection;
    mc.x = this["piece"+locationArray[randomPlaceSelection]].x;
    mc.y = this["piece"+locationArray[randomPlaceSelection]].y;

    cardBacks[randomPlaceSelection] = mc;
    trace(cardBacks.length+ " " + mc.x+ " " + mc.y+ " " );
    //traces as you'd expect with correct x and y coordinates of the clips, just no clips attached.

  2. #2
    Join Date
    Dec 2002
    Need to add the mc to the display list...

  3. #3
    Senior Member
    Join Date
    Jun 2002


Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width

HTML5 Development Center