The forums have permanently moved to This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.

Results 1 to 3 of 3

Thread: removeChild from different frame?!?!

  1. #1

    removeChild from different frame?!?!

    hello again friends... happy easter!

    I am having a rough time dealing with this problem:

    I have a set of buttons on the main timeline that gotoandplays movieclips that reside in different frames.
    These movieclips are on the stage by using addChild statements.
    As I click a button and it takes me to that specific frame, I am having hard time removing these movieclips using conditionals when I click on one of the buttons...

    I know it is hard to explain, but it probably is a simple problem a noob like me can't solve...

    I tried to replicate my problem in the attached source file... so it may be easier for someone to understand my specific question.
    *Again, I have to use addChild statements for these movieclips on each frame... I know this would be no issue if it were just timeline object based...

    Please help! It would be greatly appreciated... and happy easter!
    Attached Files Attached Files

  2. #2
    Normally you would just link the creation/change of your text to either a event (eg a mouse click event) or a frame change and not both.

    If you want to have both
    a)frame change and
    b)change a dynamic peice of text;
    then I reccomend you think of them as two seperate things.
    Dont mesh them together like in your example.

    That said you could do what you have done if you place your dynamic text mcs into a holder:

    eg myHolder:Sprite = new sprite;


    Then when you want to remove it you can either

    myHolder.removeChildAt(0) // add this before adding more children to the holder

    or re-create myHolder

    myHolder:Sprite = new sprite;

    It is really hard to tell what you are trying to do because, to make it appear to work, all you have to do is strip the code out of your frames and it appears to work fine.

    If you are as you say a 'noob' then I reccomend using traditional standard practices rather than making up exotic ways of doing things. As such I highly reccomend just looking at some basic turorials on AS3. That said I applaud your adventurous spirit! Best of luck.

  3. #3

    Hello, Thanks for your reply!

    Man, I had so many things actions going on inside my actual fla file that I guess looking back, I made this thing more complicated than I had to.... so that must definitely define myself as a noob.

    But all things are fixed... just by simplifying things. thanks for taking your time to answer!
    Have a great day!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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

Home About Meet the Moderators Advertise

 Link to Us


Copyright 1999 - 2012