A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Another setChildIndex problem

  1. #1
    Member
    Join Date
    Oct 2002
    Location
    England
    Posts
    80

    Another setChildIndex problem

    I'm having reel trouble trying to bring a movieclip to the front using setChildIndex.

    I have 3 movieclips that are being loaded into a movieclip that sits on the stage.

    I'm using:
    var targetClip=event.currentTarget;
    This the targeted clip into the var targetClip. I then use this var to tween the movieclip.

    But when I use:
    setChildIndex(targetClip, numChildren-1);
    Using the same var targetClip to bring it to the front it doesn't work.

    example is attached. I've commented out the:
    //setChildIndex(targetClip, numChildren-1);

    download example to have a better look if it helps
    Cheers
    Attached Files Attached Files

  2. #2
    Junior Member
    Join Date
    Jun 2009
    Posts
    18
    I think you're after something more like this:
    Code:
    bookShelf.setChildIndex(targetClip, bookShelf.numChildren-1);

  3. #3
    Member
    Join Date
    Oct 2002
    Location
    England
    Posts
    80
    I am indeed, you're help is much appreciated. Thanks

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