Why does the collision not get removed?

Hi I am trying to remove a lock when the player collects an object. I am using removeChild(Lock); which does indeed remove the lock however, the collision for the lock which would send the player to the lose screen is still there despite the object being removed. Does anyone know why this is and how I would go about removing the collision.
This is the basic collision I use
   this.addEventListener( Event.ENTER_FRAME, handleCollision)
   function handleCollision( e:Event ):void{
and here it is being used with my lock
if(Flary.hitTestObject( Lock )){
      if(lvlStart == true){
   lvlTimer.reset(); 
   gotoAndStop(3);
   lvlStart = false;

THen you should check to see if Lock is a child as part of the conditional so that it doesn't pass if it has been removed as a child....
if(this.contains(Lock) && Flary.hitTestObject( Lock )){

Similar Messages

  • When and how does the message context get removed from the message when we use pass thru send port

    Friends,
    i have a doubt regarding message context.
    Assume i have used XMLRecieve pipeline in the receive side to receive the message so that the message context is created. I.e properties are promoted/written.
    now if we use pass thru transmit pipe line at send side, how and when does the message context get removed from the message?? Since pass thru does not have any stages/components, how does the message context removed and sent out a pure message to destination???
     i mean what exactly happens here to remove the context??
    Ravindar

    Thanks for the reply.
    "The Context is created by the Adapter, regardless of any Pipeline or Pipeline Component.  It has nothing to do with PassThrough vs. XmlReceive, although XmlReceive will write Promoted Properties to the existing Context,
    as can any other Component."
    yeah yeah, adapter does create some properties in context. You are right, i am aware of it. I just missed to explain it clearly. what i meant is addition of context properties will not happen if pass thru used. Thanks its clear.
    "No.  The Context already exists on the Message when it comes from the MessageBox and
    is equally available to any Component in any Stage.  The Context that hits the Pipeline is whatever was last Persisted, either by a Receive Port or Orchestration.  It is not created by the XmlAssembler (XmlTransmit)"
    You are right , the context already exists on the message while it leaves the receive port, and once it persists
    to message box the context and message context gets stored in messages in relative tables.
    Now as you said the components get the message from the last persistence, assume i have a send port(with passthru)
    subscriber and a orchestration subsrciber for this message.
    Orchestration gets the message with context right!!
    if the send sendport(with passthru) also gets message along with context, then where is this context removed/demoted
    while sending it out?.  i guess as per SAAkhlaq said,
    here sendport(with passthru) should get a pure message without context as passthru used. 
    or is it that ultimately send adapter removes the context completely?
    or is it something like biztalk run time load the context from database into cache and both orchestration and send port gets pure message, and if needed they use context from cache???
    sorry i may be troubling you, but i am confused. i hope i am not creating any nuisance with this
    post.
    Ravindar

  • If I press "Erase all contents and settings" does the iCloud account get removed from the iPhone?

    If I press "Erase all contents and settings" does the iCloud account get removed from the iPhone?
    I also do not know the password to the iCloud account and when I go to the "Forgotten Password" link, it says that account is not found.

    Yes, but you will not be able to erase it without the password if Find My iPhone is turned on.  If you need to reset your iCloud password, read here: http://support.apple.com/kb/PH2617.  Of course, you can't reset the password unless it is your iCloud ID.

  • Why does the charger not charge my battery?  I just bought and installed a new battery from Apple (direct) today

    Why does the charger not charge my battery?  I just bought and installed a new battery from Apple (direct) today

    yes, the charger was working before. 
    so far i have:
    1.  updated my software
    2.  updated to battery 1.2
    3.  took off the "duck" plug and used the macbook pro cord that was provided
    4.  checked and cleaned the pins on the magsafe
    5. checked and cleaned the magsafe port
    any ideas?  i appreciate your response!

  • Why does the trash not fully empty?

    Why does the trash not fully empty?

    try this:
    in the finder, choose empty trash from the finder menu while holding the option key.
    if that doesn't work, see this article on how to resolve Trash Problems.

  • Why Does the iPhone not send/receive MMS?

    Why Does the iPhone not send/receive MMS? this in the works?

    "Why Does the iPhone not send/receive MMS?"
    Apple chose not to offer this as a feature of iphone. E-mail can accomplish the same thing.
    "is in the works?"
    This has been asked and answered countless times. The forum search bar is on the right side of this page.
    Apple has announced that MMS will be included in the 3.0 software due out this summer. Before you ask, all that has been announced is in this link:
    http://www.apple.com/iphone/preview-iphone-os/
    Apples developer conference begins tomorrow.

  • Why does the page not move smothe when i scroll?

    Why does the page not move smothe when i scroll?
    Sometimes it even move slower then i Scroll?
    I use a Mac and i have tried to reinstall the program.

    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Appearance/Themes).
    * Don't make any changes on the Safe mode start window.
    In Firefox 4 [http://kb.mozillazine.org/Safe_mode Safe mode] disables extensions and disables hardware acceleration.
    * Tools > Options > Advanced > General > Browsing: "Use hardware acceleration when available"
    See:
    * [[Troubleshooting extensions and themes]]

  • Why does the alarm not work when the iphone 4 is turned off

    why does the alarm not work when the iphone 4 for is  turned  off works fine when on most other phones work when off

    The only phone I've ever had that would turn on and sound the alarm is a Blackberry. So, I'd hardly say "most phones" have this function.

  • Why does the mail not work when i updated my 5s to iOs 8?

    why does the mail not work when i updated my 5s to iOs 8?

    Thank you for the reply. But can you tell me what this configuration is about and how I should do this?

  • Why does the swiping not work to scroll down the screen

    why does the swiping not work to scroll down the screen or swipe from side to side

    Thank you for the reply. But can you tell me what this configuration is about and how I should do this?

  • Why does the IPhone 4 get really hot, when you are making a phone call??

    I can't seem to find the answer to this riddle . why does the iPhone 4 get really hot when you are making phone calls or when using face Time ??

    It doesn't.
    There must be an issue with your iphone.
    Have you tried reset?  Restore?
    Have you made an appointment at the genius bar to have them look at it?

  • Why does the iPad not support flash player? I would like to watch programming from att uverse but cannot because of this restriction

    Why does the iPad not support flash player? I would like to watch programming from att uverse but cannot because of this restriction

    Because NOTHING that is iOS supports Flash. Never has never will.
    The only possible option is to try the Skyfire browser from the App store. It is an internet browser that converts flash to HTML 5 so that you can attempt to view it on iOS devices.
    I have never tried it so I can tell you if it is any good, but it has gotten decent reviews.

  • How come the sight was down so long? and why does the system not send emails anymore with responses?

    how come the sight was down so long? and why does the system not send emails anymore with responses?

    The system is back up and fully functional. How long has it been since you stopped receiving notifications? Can you share your form with us so we can have a look into what might be going wrong?
    Andrew

  • Why does the iTunes not show "Photos"

    Why does the new iTunes not show "Photos" after it is synced, and why does iCloud not show Photos also?

    Ralph9430 offers a good suggestion.  But you may need to do this before taking his advice:
    Check in iPhoto's Preferences (which you can open from the iPhoto menu).  Look in General, and make sure "Connecting Camera Opens" is set to "Image Capture").
    If it is set to "iPhoto", you won't be able to get to Image Capture easily.

  • Why does the callender not have a four weekly?

    Why does the apple calendar not have a four weekly. This would be a great help.

    This is on the I pad. I don't have a mac, only a pc.

Maybe you are looking for

  • Org.xml.sax.SAXException: Deserializing parameter

    Hi, I am trying to consume a webservice using axis. I am using Spring to call the webservice. When i am doing this i am able to get a response XML, but unfortunately there was an error stating deserializing of the object is failed. Here are my logger

  • Default operation on CUCM V9.1.2 after migration ESXi5.1

    Hello Following migration of CUCM and Unity Connection V8.5 to V9.1.2 we meet a very important problem of slowdown on the CUCM Publisher Web interface. The servers used UCS C210 M1 are with ESXi 5.1 The slowdown makes it virtually unusable administra

  • Download MDM 5.5 or 7.1 SIM file.....

    Hi All, Can any one help me out to download MDM 5.5 or 7.1 SIM file.....also its step by step configuration. Thanks

  • Imposible instalar Acrobat 7

    Lo dicho. Tengo el Adobe Acrobat 7, en ingés por supuesto, y cuando intento instalarlo me da un error, concretamente "internal error 2755. 110", y me dice que no encuentra el dispositivo para la instalación(msi ?). En fin lo he intentado de todos los

  • Uploading website without MobileME

    I have a little dilemma and I hope someone can clarify it for me. I have been with MobileME for a few years now because I needed to upload my webpage created in iWeb. My subscription expires in a couple of days and Im thinking to not using it (Mobile