Help understanding the nature of this 1006 and 1009 errors?

Hi,
I am working in Flash Professional CC, testing an old game with two levels and a win and lose screen. The game works until you get to the second level scene.  Once you're there, the 1006 output errors appear.
TypeError: Error #1006: removeChild is not a function.
    at final_project_2_fla::golem_22/onHealth()[final_project_2_fla.golem_22::frame1:6]
removeChild( ) is only used in the golem health function which it is referencing., so I know the problem's probably there. Thing is, I don't know why Flash is telling me I'm using removeChild as a function or why a sixth frame is being reference. Unless that's a code line references?
Here's the code from the enemy I was talking about.
var health:int=4;
this.addEventListener(Event.ENTER_FRAME,onHealth);
function onHealth(evt:Event):void{
    if(health==0){
        this.removeEventListener(Event.ENTER_FRAME,onHealth);
        Object(parent).removeChild(this);
Also, when you beat the game you get this error
TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at final_project_2_fla::MainTimeline/onLoop2()[final_project_2_fla.MainTimeline::frame4:27]
I read up on the 1006 error because it's really common. I know the steps begin with tracing something, but I'm not sure what to begin tracing because it's referencing the function, but I think it's refencing the 27th line of a fourth frame? Which doesn't make sense because I don't have a fourth frame there.
Here's the onLoop2 function, if it will help out
function onLoop2(evt:Event):void {
    charMove();
    if(char.hitTestObject(bgr.page1)){
        bgr.page1.visible=false;
        uipage1.visible=true;
        removeListeners2();
        echannel=ff.play(0,1);
        gotoAndStop(1, "win");
    ///collision with golem 1
    if(char.hitTestObject(bgr.golem)){
        trace(attack);
        if(attack){
            bgr.golem.x+=50;
            bgr.golem.health--;
            attack=false;
        }else{
            if(bgr.golem.arms.currentFrameLabel=="idle"){
                bgr.golem.arms.gotoAndPlay("attack");
            health-=5;
            bgr.x+=10;
        if(health<75){
                hp4.visible=false;
            if(health<50){
                hp3.visible=false;
            if(health<25){
                hp2.visible=false;
            if(health<1){
                hp1.visible=false;
                removeListeners2();
                gotoAndStop(1, "lose");
    Thank you for your time and effort.

When you read errors, the references to find the code are frame:line as you thought it might be.  The 1006 error is occuring at frame 1 line 6.  The 1009 error is occuring at frame 4 line 27.
For the 1006 error, what you could do is trace the the parent object to see what it is.  The problem might be as simple as you trying to cast it as an Object, when you might need to be casting it as a DisplayObjectContainer or some other type that has the removeChild function in its arsenal.
The 1009 error indicates that one of the objects being targeted by your code is out of scope.  This could mean that the object....
- is declared but not instantiated
- doesn't have an instance name (or the instance name is mispelled)
- does not exist in the frame where that code is trying to talk to it
- is animated into place but is not assigned instance names in every keyframe for it
- is one of two or more consecutive keyframes of the same objects with no name assigned in the preceding frame(s).

Similar Messages

  • Need help understanding how to resolve this XMLP Report Definition error

    Getting error on only 1 database but is of course is the one for an important deal. Going to Reporting Tools>XML Publisher>Report Definition and querying for Report Name HRS_INT_LET we get errors.
    File associated with template definition is not found in the database. (235,77)
    File object associated with template defintiion is not found in the database, therefore the report and/or template definition is not valid.  Please check consistency of objects.
    Next error message:
    Error in PeopleCode ScrollSelect processing. (2,213) PSXPRPTDEFN_WRK.FUNCLIB.FieldFormula  Name:LoadTemplateDefn  PCPC:37323  Statement:542
    Called from:PSXPRPTDEFN_WRK.FUNCLIB.FieldFormula  Name:LoadReportDefn  Statement:601
    Called from:PSXPRPTDEFN_WRK.FUNCLIB.FieldFormula  Name:SelectReportDefn  Statement:740
    Called from:PSXPRPTDEFN.GBL.PostBuild  Statement:36
    A SQL error occurred during processing of the PeopleCode ScrollSelect (or ScrollSelectNew, RowScrollSelect, RowScrollSelectNew) built-in function.
    This error may have been described by a preceding message.
    Examine the error messages and the PeopleCode program containing the ScrollSelect call to determine the cause of the error.
    Edited by: user702257 on Feb 3, 2010 8:24 AM

    Hey did anyone reply or have a similar problem.. ??
    but with 3 Error Messages, the first one is:
    1st Error:
    SQL error.stmt#:651 Error Position:2010 Return:904 - ORA-00904: "CUSTMERNAME":invalid identifier
    2nd Error:
    SELECT T1, T2, ETC........
    3rd Error:
    Error in PeopleCode ScrollSelect processing. (2,213) At INV.TRANS.FieldChange trans_qry PCPC:1719 Statement: 67
    A SQL error ocurred during processing of the PeopleCode ScrollSelect (or ScrollSelectNew, RowScrollSelect, RowScrollSelectNow) built-in function.
    This error may have been described by preceding message.
    Examine the error message and the PeopleCode program containing the ScrollSelect call to determine the cause of the error.
    does any one know or had this error in particular?
    Thanks
    George

  • Help - updatd to 7.3 this morning and getting error

    i got the error that 'cannot run because it has detected a problem with your audio configuration' does anyone know what that means and how I fix. I can't get iTunes to open at all anymore.

    Alternately, the following troubleshooting document is also worth a try:
    iTunes 7 for Windows: iTunes has detected an audio configuration problem

  • Opendirectoryd and notifyd are consuming 20% of my cpu. How do I find the source of this problem and kill it? Any help is greatly appreciated.

    Is there a way to identify what is causing opendirectoryd and notifyd to chew up my cpu? I've searched around in console but I'm not entirely sure what to be looking for.

    Dan Bargen wrote:
    That's right, after restarts, "quit process" and "force quit process" in Activity monitor, and further restarts, this ReportCrash process listed under my user account just won't stop. It hogs anywhere from 4-95% of my CPU, normally at the top of this range, and shows no sign of finishing.
    Here's the process hierarchy:
    original process: ReportCrash username
    parent process: launchd (88) username
    parent process: launchd (1) username
    parent process: kernel task (0) root (0)
    This last parent process done by root is using up an average 3% of my CPU by itself.
    I'm not a UNIX guru, and can barely work in a terminal window, so please don't ask me anything to technical. Just please, please send some help my way.
    I've recently had network issues and some other nagging process hogs that run in the background, no matter what I do (see thread: http://discussions.apple.com/thread.jspa?threadID=2123765&tstart=0 ), so could this possibly be an extension of that problem. I don't know if a mac "genius" at the store is smart enough to take this on, so I'll appeal to the more informed people out there.
    This is a wild guess, but I wonder if something on your computer isn't crashing repeatedly.
    I'd launch the Console utility and look in system.log for odd messages around the time(s) you're having those problems.

  • My iPad Air 16 gb wifi  not open and asking for an address and not mine and I am the owner of this device and I can not pave if there is a possibility of me to help me open it with my address as I opened before

    asking for an address and not mine and I am the owner of this device and I can not pave if there is a possibility of me to help me open it with my address as I opened before

    Read the following about, "Activation Lock".
    http://support.apple.com/kb/ht5818

  • I'm trying to understand the difference between Photoshop Elements and Lightroom software.

    Does one have things the other does not?

    Hi,
    Lightroom is to manage photos and produce derivative images without ever modifying an original file. Its processing functionality has a narrow feature-set covering the most common needs of professional photographers whereas Elements is a simpler yet powerful photo manipulation tool. Elements is designed to satisfy the needs of photo enthusiasts who like to manipulate images.
    You can also go through the thread to understand the basic difference between PSE and Lightroom.
    Check if this helps.
    Thanks,
    Swapnil

  • Need some help understanding the way materialized views are applied through

    Hi, I need some help understanding the way materialized views are applied through adpatch.
    In patch 1, we have a mv with build mode immediate. When applying it PTS hang due to pool performance of mv refresh.
    So we provide patch 2, with that mv build mode deferred, hoping it'll go through. But patch 2 hang too on the same mv.
    How does this work? Is that because mv already exists in the database with build immediate, patch 2 will force it to refresh first before changing build mode? How to get over this?
    Thanks,
    Wei

    Hi Hussein,
    Thank you for the response.
    Application release is 11.5.10.
    Patch 1 is MSC11510: 8639586 ASCP ENGINE RUP#38 PATCH FOR 11.5.10 BRANCH
    Patch 2 is MSC11510: 9001833 APCC MSC_PHUB_CUSTOMERS_MV WORKER IS STUCK ON "DB FILE SEQUENTIAL READ" 12 HOURS
    The MV is APPS.MSC_PHUB_CUSTOMERS_MV
    This happens at customer environment but not reproducable in our internal environment, as our testing data is much smaller.
    Taking closer look in the logs, I saw actually when applying both patch 1 and patch 2, MV doesn't exist in the database. So seems my previous assumption is wrong. Still, strange that patch 2 contains only one file which is the MV.xdf, it took 7 hours and finally got killed.
    -- patch 1 log
    Materialized View Name is MSC_PHUB_CUSTOMERS_MV
    Materialized View does not exist in the target database
    Executing create Statement
    Create Statement is
    CREATE MATERIALIZED VIEW "APPS"."MSC_PHUB_CUSTOMERS_MV"
    ORGANIZATION HEAP PCTFREE 10 PCTUSED 40 INITRANS 10 MAXTRANS 255 LOGGING
    STORAGE(INITIAL 4096 NEXT 131072 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 4 FREELIST GROUPS 4 BUFFER_POOL DEFAULT)
    TABLESPACE "APPS_TS_SUMMARY"
    BUILD IMMEDIATE
    USING INDEX
    REFRESH FORCE ON DEMAND
    WITH ROWID USING DEFAULT LOCAL ROLLBACK SEGMENT
    DISABLE QUERY REWRITE
    AS select distinct
    from
    dual
    AD Worker error:
    The above program failed. See the error messages listed
    above, if any, or see the log and output files for the program.
    Time when worker failed: Tue Feb 02 2010 10:01:46
    Manager says to quit.
    -- patch 2 log
    Materialized View Name is MSC_PHUB_CUSTOMERS_MV
    Materialized View does not exist in the target database
    Executing create Statement
    Create Statement is
    CREATE MATERIALIZED VIEW "APPS"."MSC_PHUB_CUSTOMERS_MV"
    ORGANIZATION HEAP PCTFREE 10 PCTUSED 40 INITRANS 10 MAXTRANS 255 LOGGING
    STORAGE(INITIAL 4096 NEXT 131072 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 4 FREELIST GROUPS 4 BUFFER_POOL DEFAULT)
    TABLESPACE "APPS_TS_SUMMARY"
    BUILD DEFERRED
    USING INDEX
    REFRESH COMPLETE ON DEMAND
    WITH ROWID USING DEFAULT LOCAL ROLLBACK SEGMENT
    DISABLE QUERY REWRITE
    AS select distinct
    from dual
    Start time for statement above is Tue Feb 02 10:05:06 GMT 2010
    Exception occured ORA-00028: your session has been killed
    ORA-00028: your session has been killed
    ORA-06512: at "APPS.AD_MV", line 116
    ORA-06512: at "APPS.AD_MV", line 258
    ORA-06512: at line 1
    java.sql.SQLException: ORA-00028: your session has been killed
    ORA-00028: your session has been killed
    ORA-06512: at "APPS.AD_MV", line 116
    ORA-06512: at "APPS.AD_MV", line 258
    ORA-06512: at line 1
    Exception occured :No more data to read from socket
    AD Run Java Command is complete.
    Copyright (c) 2002 Oracle Corporation
    Redwood Shores, California, USA
    AD Java
    Version 11.5.0
    NOTE: You may not use this utility for custom development
    unless you have written permission from Oracle Corporation.
    AD Worker error:
    The above program failed. See the error messages listed
    above, if any, or see the log and output files for the program.
    Time when worker failed: Tue Feb 02 2010 19:51:27
    Start time for statement above is Tue Feb 02 12:44:52 GMT 2010
    End time for statement above is Tue Feb 02 19:51:29 GMT 2010
    Thanks,
    Wei

  • The nature of this?

    Microsoft, I sincerely hate your current business model. The nature of this corporation disgusts me. You are truly a disgusting monster, just like every other corporation. When Microsoft decides to fire all employees and declare bankruptcy the world will
    be better off. End the existence of this thing. It does not need to be. How could you let this happen? Why would you let this happen?

    When you read errors, the references to find the code are frame:line as you thought it might be.  The 1006 error is occuring at frame 1 line 6.  The 1009 error is occuring at frame 4 line 27.
    For the 1006 error, what you could do is trace the the parent object to see what it is.  The problem might be as simple as you trying to cast it as an Object, when you might need to be casting it as a DisplayObjectContainer or some other type that has the removeChild function in its arsenal.
    The 1009 error indicates that one of the objects being targeted by your code is out of scope.  This could mean that the object....
    - is declared but not instantiated
    - doesn't have an instance name (or the instance name is mispelled)
    - does not exist in the frame where that code is trying to talk to it
    - is animated into place but is not assigned instance names in every keyframe for it
    - is one of two or more consecutive keyframes of the same objects with no name assigned in the preceding frame(s).

  • I got my Iphone 3gs unlocked, but Navigation and Compass are not working. Please help if anybody had faced this problem and got it resolved.

    I got my Iphone 3gs unlocked, but Navigation and Compass are not working. Please help if anybody had faced this problem and got it resolved.

    Only the carrier that the iPhone was locked to can unlock. There you go, hacking void any support from this forum.

  • My iPod has not been working for a month now and i was hoping that you could help me.The part where you charge and sync the iPod is not connecting.There is defiantly not the lead as we use it for the iPhone and that works please could you help!

    my iPod has not been working for a month now and i was hoping that you could help me.The part where you charge and sync the iPod is not connecting.There is defiantly not the lead as we use it for the iPhone and that works please could you help!
    yours sincerly
    jackfromsurrey

    What I am saying is ..........
    The iPhone HAS to be active making calls on the UK carrier network for the carrier to identify as "theirs" and therefore eligible for the Carrier to unlock
    The way to achieve this is to use a PAYG sim making and receiving calls to establish a customer relationship  with the Carrier and then follow the Carrier's process to unlock
    With a PAYG it usually means adding a specified (by the carrier ) amount  usually £15 /£20 depending on the carrier
    This is how O2 function and according to Gemma  this is how Vodafone work

  • I want to relocate my iTunes library on a NAS drive and stream to apple tv2 and DLNA tbs around the house is this possible and if so which is the best NAS drive to buy???

    I want to relocate my iTunes library on a NAS drive and stream to apple tv2 and DLNA tbs around the house is this possible and if so which is the best NAS drive to buy???

    ged2001 wrote:
    I want to relocate my iTunes library on a NAS drive and stream to apple tv2 and DLNA TV's around the house is this possible and if so which is the best NAS drive to buy???
    i don't have any experience with DLNA TV's but i recently moved my iTunes library to a NAS. streaming content to airport express remote speakers and TV2 works great. however, i have all my gear hardwired to my time capsule (except the airport express) so i'm not sure how well streaming e.g. HD movies to TV over wifi works.
    i have a Synology DiskStation 411j and am very happy with it.

  • I got the iPhone 5s this morning and I kept my number and as soon as it charged I got all my messages, but when I connected it to my iCloud and backed it up, when it was finished all the messages I received were gone. How do I get them back?

    I got the iPhone 5s this morning and I kept my number and as soon as it charged I got all my messages, but when I connected it to my iCloud and backed it up, when it was finished all the messages I received were gone. How do I get them back?

    Hi sofia124, 
    Welcome to the Apple Support Communities!
    It sounds like you may have either set the iPhone up as a new iPhone or restored from a backup that didn’t have your messages on it. If you do have either an iCloud or iTunes backup that you believe has your messages saved, you can restore from that backup to recover your information. Please use the attached article as a reference for restoring from a backup. 
    Back up and restore your iOS device with iCloud or iTunes
    Have a great day, 
    Joe

  • I got the new ipad this weekend and had problem with apple ID - thus resulting in 13 charges to my credit and debit card with itunes and nothing loading onto the ipad - does anyone have an idea as to how I can get this credited back to my accounts?

    I bought the new ipad this weekend and had £15 credit.  For some reason it charged 13 items to be credit and debit card and did not load the item onto the ipad- does anyone know how I can get this credited?

    More update on y situation. Now on both the IPAD and IPAD2 I can not got to view my purchase History, it says it can not connect to the ITUNES store, but yet I can still d/l apps and can view my account etc etc etc.

  • Why can't i connect to my iphone after updating to 7.1.1? i don't even get the screen that lets me login into my apple account??? plz help my phone was stolen and through help of the police i recovered it and now i can't access my phone

    why can't i connect to my iphone after updating to 7.1.1? i don't even get the screen that lets me login into my apple account??? plz help my phone was stolen and through help of the police i recovered it and now i can't access my phone

    You must have had find my iPhone on, or it was locked by your phone carrier.
    Call your our cell carrier first.
    then log on to a computer to iCloud to erase your iPhone.  
    NOW... You will be able to setup with a backup.

  • I need help restoring the ability to view Youtube and all videos of my 4 year old MacBook after receiviving a meaage the the Adobe ineeds to be updated?  Thanks.ng

    I need help restoring the ability to view Youtube and all videos of my 4 year old MacBook after receiving a message the the Adobe ineeds to be updated?  Thanks.

    Did you upgrade whatever product from Adobe was out of date yet?

Maybe you are looking for

  • Mappings ,value mapping

    Can u pl send me javamapping,abapmapping exercises.and step by step procedure. Thanks Srini

  • Transferri​ng Data from RT Processor to FPGA on sbrio9636

    Hey, Im Currently trying to generate a PWM signal and control the Duty Cycle. Ive created the PWM signal in my FPGA which i write to a digital pin. However i want to control the duty cycle of the PWM signal from the RT Processor. I would like to crea

  • How do I get music and movies from iPod to my computer?

    Hi How can I put all of my music and movies that are on my iPod onto my computer? They were all on my computer before but became erased. Thanks!

  • Running 4 screens as one with Mac Pro Late 2013

    Hello there, got a Mac Pro late 2013 edition driving 4 60" 1080P screens in a 2x2 configuration.  Trying to make those work as one 4k display.  Was able to get it working to allow us to display a page across all 4 displays.  But have not been able to

  • Windows network between 7 and 8?

    I have been trying for a couple of hours to set up a home network between a computer running 7 and one running 8. I looked online to see what came up when I searched= "Windows cannot set up a home network on this computer". I found several responses