How do I remove a child from the stage using a button click?

I have a movieclip that requires Play, Pause, Forward and Back buttons. The movieclip has actionscript at various frames to load movieclips from the library and repeat them.
I have tried using a timeline scrubber but it does not trigger the actionscript when scrubbing, only when the movie plays normally.
My possible solution is to create Fwd and Back buttons that can go to specific frames where key animations will begin.
I need to develop actionscript that will remove Children when the user clicks Back.
This is how I am loading several movieclips along the timeline from my library:
var shpA1:arSHPp1;
function attachAR1 () {
  shpA1 = new arSHPp1 ();
  shpA1.x = -30;
  shpA1.y = 18;
  addChild (shpA1);
//the interval is used to repeat the animation to represent continuous flow on a diagram
var myInterval1:uint = setInterval (attachAR1, 500);
This what I have tried so far (not working at all - no errors or trace):
function remChild1(event:MouseEvent) :void {
    if(shpA1.stage)
        trace("arSHPp1 is in display list");
        shpA1.parent.removeChild(shpA1);
        shpA1 = null
    else
        trace("arSHPp1 isn't in display list");

I did try that but it would not remove the child.
i appreciate your help though.
I am also trying to determine if a child is on the stage and if it is, remove it. I have created a button that will jump back on the timeline and the mc's that were loaded after this point in time.
This looks like it should work. It doesn't give me any errors but the mc remains on the stage.
var remMC;
if (getChildByName("mc2") != null) {
  removeChild(mc2);

Similar Messages

  • How can i remove secure files from the trash? I tried click away the secure notification in info, but still i cann't remove them. Is there a buttoncombination to use?

    How can i remove secure files from the trash? I tried click away the secure notification in info, but still i cann't remove them. Is there a buttoncombination to use?

    If you are unable to empty the trash, try holding the Option key while selecting Empty Trash.
    Otherwise, some steps in the following link may help you.
    http://support.apple.com/kb/ht1526

  • How do you remove a symbol from the stage in Edge animate?

    Hello-
    I'm wondering how to remove a symbol from the stage in Edge Animate so you can jump to another place in the timeline.  In Flash, the symbol was only on the stage for the amount of frames you indicated.  Not sure how it works here.
    For example, I have 2 buttons on my first screen with some text that animates in.  I want the button click to take the user to another section in the timeline or (basically another scene, like in Flash)  that contains different content.  If I change the visibility the buttons are still there and will ( I assume) create problems when other elements are placed on top. 
    Or is the only way with code.  If that is the case what would that code be?
    I would appreciate any help.
    Thank you!

    What I usually do, is, once you have everything set up in the scene you are done with. highlight it all
    right click
    group elements in DIV
    Now all those items act as 1 group and then you give it a properties name, much like a symbol.
    THEN you can refer to that scene name and move it anywhere or hide it and slide in another scene that has the content for that next scene.
    basically you take all the elements that make up 1 scene, gruop it up, name it, and then in the code for the button say something like:
    on click:
    scenename.play(framenumber);
    that will then animate that scene according to any animation you gave it, such as moving to the left, off stage. while moving scene 2 that you create into the stage.
    or just have something like this hide it
    sym.$("scenename").hide();
    sym.$("scene2name").show();
    but if you do that, make sure in your CompositionReady code you hide all scenes EXCEPT the 1st one, so the user doesnt see them all instanatly anyway.

  • HT5622 We have two iphones with the same Apple ID. Since I installed iOS this morning I have started receiving all my sons texts and when I send him a text it is delivered to both of us. How can I remove my phone from the joint Apple ID and remove myself

    My son and I both have iphones with the same Apple ID. Since I installed iOS this morning I have started receiving all my sons texts and when I send him a text it is delivered to both of us. How can I remove my phone from the joint Apple ID and remove myself from finding out what he is up to during Freshers week!

    You have to use a different Apple ID for your son.
    Read this note:
    iOS 5 & iCloud Tips: Sharing an Apple ID With Your Family
    still valid for ios 7

  • How do I remove an app from the menubar

    I deleted an app form my lanchpad when it was requesting a password as resident on the menubar and when I try to quit it at the menubar it does not close.  How do I remove this app from the menubar?

    Command-click it and drag it out. If that doesn't work, find and run an uninstaller for that application.
    (86726)

  • How do I remove an app from the update list that is under someone else's apple id?

    How do I remove an app from the update list that is under someone else's apple id? So this way the update always fails because it asks for someone else's password. I don't have the app on my mac, it only appears in the update list. It's just annoying, because the update keeps appearing, and the reminder keeps reminding me that I should install a new update.

    You installed a hacked app, originally from the Mac App Store. It contains the receipt for a different app, downloaded using an account that you don't control. You need to identify and remove the hacked app.
    Important: The app you need to remove is not necessarily the one named in the App Store alert. For example, the App Store may prompt you to update "Angry Birds" or "Twitter," but the hacked app may be something else entirely. Don't make any assumptions about which app you're looking for. To find it, you must carry out a systematic search with Spotlight.
    1. Triple-click anywhere in the line of text below on this page to select it:
    kMDItemAppStoreHasReceipt=1
    Copy the selected text to the Clipboard by pressing the key combination command-C.
    2. In the Finder, press command-F to open a search window, or select
    File ▹ Find
    from the menu bar. In the search window, select
    Search: This Mac
    from the row of tokens below the toolbar. Below that is a popup menu of search criteria, initially showing Kind. From that menu, select
    Other...
    A sheet will drop down. In that sheet, select
    Raw Query
    as the criterion, then click OK or press return.
    Now there will be a text box to the right of the menu of search criteria. That's where you enter the raw search query. Click in that box and paste the text you copied earlier by pressing command-V.
    4. The search window will now show all the App Store products that are installed. Compare those search results with the list of your purchases from the App Store. To see the complete list, you may need to unhide hidden purchases. If any apps were download from the App Store using other Apple ID accounts that you control, sign in to the store under each of those ID's and check the purchases.
    At least one of the apps in the Spotlight search results is not among your purchases in the App Store. Move each such item to the Trash, after quitting it if it's running. You may be prompted for your administrator password. Empty the Trash.
    Quit and relaunch the App Store. Test.
    If you find these instructions confusing, ask for an alternative method.

  • How can i remove favourite people from the top of my iPhone !

    how can i remove favourite people from the top of my iPhone !

    Hey donyh1,
    Thanks for the question. You can hide the recent contacts in the multitasking screen by navigating to your Contacts settings:
    Contacts settings - iPhone
    http://help.apple.com/iphone/8/#/iph96b20610
    Thanks,
    Matt M.

  • I bought my friend's used laptop. She doesn't know how to get her itunes account off the laptop, so I'm not able to do anything. How do I remove her account from the laptop?

    I bought my friends Toshiba laptop. Her itunes account is on there, hooked up to a credit card. She doesn't remember her ID. I think I had it emailed to her by typing in her email address and first and last name. Now that she probably HAS her Apple ID and Password, how do we remove her account from the laptop so I can use MY itunes?

    Delete the ENTIRE iTunes folder from her user directory.
    Frankly, you should be restoring the laptop as new, either using the restore CD provided by Toshiba or by reinstalling Windows with a Windows CD to remove ALL of her personal information.

  • How do I remove unwanted updates from the App Store?

    How do I remove unwanted updates from the App Store? So you understand better what I'm referring to:
    I have the App Store icon in the Dock. When there's an update a red number appears on said icon. Well, I went to check on the updates and it's for 4 different applications I either no longer have or use. One of them is an update for Lion OS users. I'm still on Snow Leopard, so it doesn't even apply to me.
    So there they sit... I'm not going to download the updates... so how do I get rid of them?

    Hi Andy ..
    no longer have or use
    If there are updates available for apps you have deleted, try this.
    Go to ~/Library/Caches/com.apple.appstore
    Move the Cache.db and Updates files from the com.apple.appstore folder to the Trash.
    Empty the Trash, restart your Mac.
    For any apps you still have installed but do not use, the updates will still be available from the Updates top of the App Store window and show on the red badge on the App Store icon in the Dock.
    edited by:  cs

  • How do I remove an object from the foreground of a photo eg a fence?

    How do I remove an object from the foreground of a photo eg a fence?

    What version of Photoshop?
    If CC then try here
    Learn Photoshop CC | Adobe TV

  • How do I remove a shortcut from the Home Screen of...

    How do I remove a shortcut from the Home Screen of a Nokia 700? I'm a bit clumpsy with the touch screen and I keep adding shortcuts for everyrhing. It's easy enough (too easy) to add them, but how can I remove/delete them? There doesn't seem to be any option to deleting them and it's not mentioned in the manual. 
    Solved!
    Go to Solution.

    jimmyireland wrote:
    You tap the icon hold for a second or two the x icon appears then you tap it then it goes
    Now I got it. Thanks for the help.
    I really need to practice this touch screen malarky, I'm not very good at it.

  • How do I remove a device from the list?

    I had an old Bluetooth device that I no longer own. Its name still appears in my Bluetooth list. How do I remove it? The Troubleshooting manual says:
    8. How do I remove a device from the device list?
    Using the Bluetooth preferences, select the device you want to remove to highlight it, then click the minus sign. It is recommended that you remove a device from this list while the device is connected.
    This does not work. There is no minus sign anywhere. I tried clicking the minus sign on my keyboard, but that is not it. Any suggestions?

    Its name still appears in my Bluetooth list.
    What Bluetooth list? You've completely neglected to tell us what mobile device or computer running what operating system you are referring to.
    I'll make a guess that you're using a Mac. If I'm right, the minus sign is here:

  • How do I remove a photo from the trash that I brought forward from Time Machine?

    How do I remove a photo from the trash that I brought forward using Time Machine?

    Have you tried to normal way. Highlight the photo in the Trash/Right Click: Put Back.  Or just drag it back into Events.

  • How do I remove an icon from the dock of an iMac 10.9.5.?  Dragging doesn't work although I have tried a number of different places.  I recall right clicking used to give me a remove option.

    How do I remove an icon from the dock of an iMac Maverick, 10.9.5?  I've tried dragging different places: desktop, finder list etc.  No luck.

    Drag up towards the centre of the screen & hold for a second or so. The icon will have the 'smoke cloud' appear, let go & it will be removed.
    There should also be a 'Remove from Dock' option in the popup menu. It is in the 'Options' section . ctrl+click will 'right click' if right clicking is disabled.
    If this is not possible the Dock is locked (this may happen on a 'Managed Mac' normally setup by a company or school etc). See your tech support in this case.

  • How do I remove an iBook from the "Purchased" window of the iBooks store?  I have already deleted it from the "Library" but it still shows up as a purchased book.

    How do I remove an iBook from the "Purchased" window of the iBooks store?  I have already deleted it from the "Library" but it still shows up as a purchased book.

    You can't currently delete items from your Purchased page, all you can do is hide (and unhide) them : http://support.apple.com/kb/HT4919

Maybe you are looking for