Error #1009 coding problems

Hi, ive been writing code its long about 500 lines and im getting these errors

TypeError: Error #1009: cannot access a property or method of a null object reference.

zombie / loop)

TypeError: Error #2007: hitTestObject parameter must be null.

at flash.display::DisplayObject/_hitTest()

at flash.display::DisplayObject/hitTestObject()

zombie / loop)

When I debug:

TypeError: Error #1009: cannot access a property or method of a null object reference.

zombie / loop () [C:\Users\Tom\Desktop\Packets\Zombie.as:43]

My class of Zombie Code is:

[AS]

package

{

import flash.events.Event;

import flash.display.MovieClip;

import flash.display.Sprite;

Zombie/public class extends MovieClip

{

private var ZombHP:Number = 10;

object: main private var;

public void Zombie()

{

addEventListener (Event.ADDED_TO_STAGE, onadd);

}

onadd(e:Event) private function

{

core = MovieClip (root);

addEventListener (Event.ENTER_FRAME, loop);

}

loop(e:Event) private function

{

if (ZombHP == 0)

{

/ / Zombie death scene;

this.gotoAndStop (3);

/ / See if dead Zombie scene ends

if (this. ZombDeath.currentFrame is framesLoaded)

{

/ / Remove the Zombie scene

removeChild (this);

}

}

/ / if Zombie key character

if (this.hitTestPoint (core.char.x, core.char.y))

{

//Health breaks down

kernel. HPBar.nextFrame ();

}

/ / hitTests with weapons

if (this.hitTestObject (core.char.Char_weapons. Handgun.HShoot.HGBulletRange))

{

ZombHP-= 1;

}

if (this.hitTestObject (core.char.Char_weapons. AK. Ak_Shoot.BulletRangeAK))

{

ZombHP-= 1;

}

if (this.hitTestObject (kernel. Char_weapons. Uzi.Uzi_Shoot.UziBulletRange))

{

ZombHP-= 3;

}

if (this.hitTestObject (kernel. Char_weapons. Shotgun.SG_Shoot.SGBulletRange))

{

ZombHP-= 5;

}

if (this.hitTestObject (kernel. Char_weapons. Minigun.MG_Shoot.MGBulletRange))

{

ZombHP-= 2;

}

if (this.hitTestObject (core.char.Char_weapons. Raygun.Rg_shoot. RGBulletRange))

{

ZombHP-= 10;

}

}

}

}

[AS]

Please reply as soon as.

whatever it is null means that there is no Flash.  He has not defined or defined after you try and reference it.

There are a number of ways that this can happen if you use the code on the timeline.  the only way to avoid that it should create an object on an image and assign an instance name in the properties panel.  Then ONLY you can add more keyframes in the timeline of this object.  If you remove the object of a keyframe and then replace, it will not be the same object, no matter what you add in the properties panel, or anywhere else.

Tags: Adobe Animate

Similar Questions

  • Navigation - Section problem - ERROR: 1009

    Hello.

    I have a problem with my browsing on my Flash site. I do not know how to ask this question, because I do not know where the problem lies, but I'll try anyway.

    I have a flash site where my navigation is accumulation by a loop with textfields, with 3 (Click, RollOver and RollOut) EventListeners. Navigation uses SWFAddress to pass 6 images into a MovieClip (SubNavBar).

    This MovieClip is the container of 5 submenus to my navigation buttons. In this MovieClip, I have 6 frames, where the 1st is empty (just with stop() ;) and the 2nd with a very similar code, code navigation, just without the SWFAddress.) Thus, it can change between 5 frames in a new MovieClip those again. -It works very well.

    But then I copied the code to the frame 2 frame 3 and changed the 'names', then it is not disturbing with the code of the Framework 2. This also works fine when I test it. -Now I have the subnavigation to 1 button and the 2 button.

    When I test it, and I first press the button 1 and button 2 second (frame 2 first, followed by the 3 chassis) there is no problem. If I first press the button 2 and button 1 second (frame 3 first, then the image 2), then the 2 button does not work and I get the error:

    TypeError: Error #1009: cannot access a property or method of a null object reference.
    at test_fla::SubNavBar_1/frame3()
    at flash.display::MovieClip/gotoAndStop()
    at test_fla::MainTimeline/animateIn()
    function / h t t p://adobe.com/AS3/2006/builtin::apply()
    at com.greensock.core::TweenCore/complete()
    at com.greensock::TweenLite/renderTime()
    at com.greensock.core::SimpleTimeline/renderTime()
    at com.greensock::TweenLite$/updateAll()


    1 button still works well, and if I press the button 2 afterwords it works again.

    I hope that is understandable? s:

    Jonas Philippon

    Click file/publish settings/flash and check "permit debugging".  Repeat the test.  the number of problematic line will be in the error message.

    If you don't know how to fix the error with this additional info, copy and paste this line of code here.

  • Error #1009 Help!

    Dear all,

    I hope you can help me with what is probably something very simple but seems to touch most of the people! However, I spent all day researching it and try all sorts of codes to solve the error!

    I am trying to build a new website using Flash CS5 and I'm very new to any script business (as3).  After finishing the main content of the site, I created an external preloader, so it can load the main SWF file. However, when I debug or test the scene I get this error:

    TypeError: Error #1009: Cannot access a property or method of a null object reference.
       at Index_fla::MainTimeline/frame1()[Index_fla.MainTimeline::frame1:11]

    After many hours, I find the publication settings, publication of debugging that actually tells me what mount / the origin of the problem! If I go to my main file (called Index.Fla) and look at picture 1, line 11, it says:

    var buttonsArray:Array = [works_btn,about_btn,contact_btn];

    ... that sounds right, seem to consider when the preloader is finished the file flash main (work/comments/contact) navigation buttons does not quite right. They still work take back you to the right pages (or frames) but the mouse, mouse click, functions do not work.

    Now, I'm not really sure how to deal with this, because all the buttons (which are video clips) are located on the frame one and carry the name of the instance to the right and MORE when I debug the Index.Fla file, everything works normally.

    Should I assume that there is something wrong with my preloader file?

    Below is the script for the preloader and frame a fo the index file. I hope you can help me! Thank you!

    PRELOADER:

    var l:Loader = new Loader();

    l.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loop);
    l.contentLoaderInfo.addEventListener(Event.COMPLETE, done);
    l.load(new URLRequest("Index.swf"));

    function loop(e:ProgressEvent):void
    {
       var perc:Number = e.bytesLoaded / e.bytesTotal;
       percent.text = Math.ceil(perc*100).toString() + "% Complete";
    }

    function done(e:Event):void
    {
       removeChildAt(0);
       removeChild(preloader)
       percent = null;
       addChild(l);

       l.contentLoaderInfo.removeEventListener( ProgressEvent.PROGRESS, loop);
       l.contentLoaderInfo.removeEventListener(Event.COMPLETE, done);

    }

    INDEX (MAIN - FRAME ONE FILE)


    stop();

    works_btn.addEventListener(MouseEvent.CLICK, navigationClicked);
    about_btn.addEventListener(MouseEvent.CLICK, navigationClicked);
    contact_btn.addEventListener(MouseEvent.CLICK, navigationClicked);

    stage.frameRate = 30;
    var buttonsArray:Array = [works_btn,about_btn,contact_btn];

       function setButtons():void
       { for (var i:int=0; i<buttonsArray.length; i++)
          {   buttonsArray[i].id = i;  
             buttonsArray[i].buttonMode = true;  
             buttonsArray[i].mouseChildren = false;  
             buttonsArray[i].mouseEnabled = true;  
             buttonsArray[i].addEventListener(MouseEvent.ROLL_OVER,playOver);  
             buttonsArray[i].addEventListener(MouseEvent.ROLL_OUT,playOut);  
             buttonsArray[i].addEventListener(MouseEvent.CLICK,doClick);  
          }
    }

    function playOver(event:MouseEvent):void
       {   event.currentTarget.gotoAndPlay("over");
       }
    function playOut(event:MouseEvent):void
       {   event.currentTarget.gotoAndPlay("out");
       }

    function doClick(event:MouseEvent):void{
      
       var currentBtn:int = event.currentTarget.id;  

       setSelectedBtn(currentBtn);
    }

    function setSelectedBtn(id:int):void{  
       for (var i:int=0; i< buttonsArray.length; i++) {  
          if (id == i) {  
             buttonsArray[i].gotoAndStop("down");  
             buttonsArray[i].buttonMode = false;  
             buttonsArray[i].mouseEnabled = false; 
             buttonsArray[i].removeEventListener(MouseEvent.ROLL_OVER,playOver);  
             buttonsArray[i].removeEventListener(MouseEvent.ROLL_OUT,playOut); 
             buttonsArray[i].removeEventListener(MouseEvent.CLICK,doClick);
             } else {  
                if(buttonsArray[i].currentLabel =="down"){
                   buttonsArray[i].gotoAndPlay("out");  
                   }  
                   buttonsArray[i].buttonMode = true;  
                   buttonsArray[i].mouseEnabled = true;  
                   buttonsArray[i].addEventListener(MouseEvent.ROLL_OVER,playOver);  
                   buttonsArray[i].addEventListener(MouseEvent.ROLL_OUT,playOut);  
                   buttonsArray[i].addEventListener(MouseEvent.CLICK,doClick);
                   }  
             }
          }
    setButtons();

    function navigationClicked(Event:MouseEvent):void
    {
       var frmLabel:String = '';

        switch (Event.target)
       {
          case works_btn :
                frmLabel = "Portfolio_frm";
                break;
            case about_btn :
                frmLabel = "About_frm";
                break;
            case contact_btn :
                frmLabel = "Contact_frm";
                break;
       }
         
       if (currentFrame != frmGoto)
       {
         
          var frmPortfolio:Number = this.getFrame("Portfolio_frm");
               
          gotoAndPlay(frmGoto);
       }
    }


    function getFrame(frameName:String):Number
    {
        var frame:Number = 1;

           for (var i = 0; i < currentLabels.length; i++)
        {
            if (currentLabels[i].name == frameName)
            {
                frame = currentLabels[i].frame;
                break;
            }
        }

        return frame;
    }

    Ahh! I'm sorry. I did it again (error code of purpose), and I think that the problem was:

    stage.frameRate = 30;

    I took it out and the notification of the error #1009 is gone! Don't know how or why he's done right! It is perhaps unnecessary coding?

    Thanks for your help if Kglad. Very appreciated

  • Error #1009: Cannot access a property or method

    This is the context of the problem, in which I'll try to include as much information as possible while keeping the brief explanation.

    I'm doing a portfolio (architectural design + concept art) site.  Flash / programming are not my aim and it is my first time to learn the software.  Due to the nature of the content and my (lack) capability in AS3, I want the coding to be really simple and always let the site well.  Currently, the way the site is structured:

    (1) the menu basic buttons to navigate to the sections of the site (opens a new page).

    (2) for example, by clicking < graphics > takes you to a new page and a submenu that comes alive in (interpolation of simple movement for buttons cascading downwards).  This animation is a clip placed on the main timeline.

    (3) on the screen is also a slideshow for all images in the < graphic >.  Instead of several small slideshows, I combined the all-in-one alone, in order to avoid complications with add / remove from the scene.  There are prev / buttons next keep images within their section sup (ie 1-> 2 - > 3-> 1).  The submenu buttons are supposed to link to the beginning of each subsection, somewhat like chapters on a DVD.  (The slideshow is a Sub, nested inside the menu movieclip movieclip).

    Main menu buttons work.

    Under menu animation works.

    Slide show work.

    Cannot get the submenu buttons to access the chapters of slide show.

    I created and solved about half a dozen errors, and every time I fix something, it causes just another point to break.  I went in circles for days and don't know which was more is upward.  Thus, while the slideshow works irrespective of the rest of the content and I think that I the parent correct referencing, the problem I am facing is therefore:

    TypeError: Error #1009: cannot access a property or method of a null object reference.
    at 03graphics_fla::MainTimeline/frame1()

    I went through a few other discussions, and I think I know what the problem is.  Since the submenu is animated, buttons do not appear on frame 1 of the nested scenario, while the ActionScript on frame 1 of the main timeline - so there is no code but when I click on the button.

    This is indeed the problem?  If so, how can I fix?

    In addition, the structure makes sense on organizing my site?  Is there an easier way / cleaner code?

    (This thing is completely rigged ghetto, I just need to work - it's like my own small Millenium Falcon...)

    See you soon,.

    Andy

    Yes, I gave your story from the beginning, not too long after the "brief".  A 1009 error means that the code does not see the object, target.  If it's a question of which claiming misnamed objects, you correct denominations.  If it's a matter of chronology location, either by moving the objects to where is the code or the code where the objects are.  If you move the objects to the location of the code, then you may want or need to manage the visibility of objects as they appear only when you need to.

  • Deactivation and give to allow listeners ' TypeError: Error #1009: cannot access a property... ". »

    I'm pretty green with coding Flash, but I'm trying to disable the buttons for my MCs button when they are on the page they link to.

    I have all my listeners in functions such as:


    function enableButton1()
    {
    Btn1_hit.addEventListener (MouseEvent.MOUSE_OVER, Button1Over);
    Btn1_hit.addEventListener (MouseEvent.MOUSE_OUT, Button1Out);
    Btn1_hit.addEventListener (MouseEvent.MOUSE_DOWN, Button1Click);
    Btn1_hit.addEventListener (MouseEvent.MOUSE_UP, Button1Up);
    }
    function enableButton2()

    ... etc...

    I've also set up my removeEventListeners the same way:

    function disableButton1()
    {
    Btn1_hit. RemoveEventListener (MouseEvent.MOUSE_OVER, Button1Over);
    Btn1_hit. RemoveEventListener (MouseEvent.MOUSE_OUT, Button1Out);
    Btn1_hit. RemoveEventListener (MouseEvent.MOUSE_DOWN, Button1Click);
    Btn1_hit. RemoveEventListener (MouseEvent.MOUSE_UP, Button1Up);
    }
    function disableButton2()

    ... etc...

    Now, I tried three ways to transform their market.

    Using an EventListener:

    addEventListener (Event.ENTER_FRAME, buttonsSwitcher);


    function buttonsSwitcher(e:Event):void
    {
    If (this.currentFrameLabel is "Home")
    {
    enableButton1();
    enableButton2();
    enableButton3();
    enableButton4();
    }
    Else if (this.currentFrameLabel == 'Portfolio')
    {
    disableButton1(); <-turns off portfolio button when the Frame portfolio.
    enableButton2();
    enableButton3();
    enableButton4();
    trace (this.currentFrameLabel);
    }

    Or I could do it on MouseUp, which is what I prefer:


    function Button1Up(e:MouseEvent):void
    {
    ButtonsCont.Btn1.gotoAndStop ("1Out");
    ButtonsCont.Btn1.addEventListener (Event.ENTER_FRAME, StopClick1);
    }


    function StopClick1(e:Event):void
    {
    If (ButtonsCont.Square1.currentFrame == ButtonsCont.Square1.totalFrames - 1) //Waits for MC at the end before you continue.
    {
    disableButton1();
    <-turns off the Portfolio button click the portfolio button.
    enableButton2();
    enableButton3();
    enableButton4();
    this.gotoAndPlay ("startPortfolio");
    }
    }

    Or I could simply add calls to function for the frameworks.

    On the frame marked the Portfolio:

    disableButton1(); <-turns off button portfolio when the portfolio framework.
    enableButton2();
    enableButton3();

    enableButton4();

    Everything still works fine until I have move from one page to another.  In other words, when he tries to reactivate Button1, I get an error no matter what method I try:

    TypeError: Error #1009: cannot access a property or method of a null object reference.
    at main_Scene1_fla::MainTimeline/disableButton1()
    at main_Scene1_fla::MainTimeline/StopClick1()

    Everything in my fla file is internal.  Nothing is loaded externally.  It is therefore not an error with load() functions.  What I am doing wrong?

    Apparently just there for you but do not flash.

    If drag an object in a keyframe and give it a name of instance and then drag that object even (or other) library to another keyframe and it give the same instance name, they are not considered the same instance by flash.

    There are other, more subtle ways to cause this problem.

    But if you delete all your keyframes, in layer of the object after the first that contains your object, you will have no problem.  then, if you add keyframes to the object layer, you will have no problems.  almost any other way you add this object to other keyframes causes this problem.

  • TypeError: Error #1009: cannot access a property or method of a null object reference?

    Mr President.
    I updated firefox and always this type of problem
    every time I tried to open the flash game site iam getting this question. sometimes IE browser cannot open it too much.
    "".... TypeError: Error #1009: cannot access a property or method of a null object reference.
    to ASGames / fun_Menu)
    to ASGames / frame2)
    at flash.display::MovieClip/gotoAndStop()
    to WeddingTianaDressup_fla::Timeline_102 / playGames ()... » »

    but the same site can be opened in other browsers in the same pc... but the same site a user goes to another computer on the browser firefox itself. How do not know where is the problem... ?
    so please, some can help hu?

    Dear Sir.
    Thanks for your answer...! I did what you said but it doesn't work. new iam having the same problem...!

  • Flash Player ' TypeError: Error #1009: cannot access a property or method of a null object reference. to town_fla::Button_237 / frame1 () '.

    Hey, I opened a page that runs Flash this always whenever rises ' TypeError: Error #1009: cannot access a property or method of a null object reference.     to town_fla::Button_237 / frame1 () '. The dialog box gives me two options either urgent continue or reject all. Normally I just press "Ignore all" and continue, but I was wondering if there was a solution to this problem. Either way, my computer runs Windows Vista Edition home premium.
    Thanks for the help.

    Hello

    To provide the proper resolution, that I would need more information on your side.

    1. is the computer connected to the domain?

    2. what web browser do you use?

    3. when exactly the problem started?

    I suggest you uninstall and reinstall the latest version of Adobe flash player. Check if it helps.

    Step 1:
    Uninstall Adobe flash player follow the steps in the link following link:

    http://kb2.Adobe.com/CPS/141/tn_14157.html

    Step 2:
    Download and install the latest version of adobe flash player from the following link:

    http://get.Adobe.com/flashplayer/

    Hope this information helps. If you need additional help or information on Windows, I'll be happy to help you.

  • Windows Modules Installer error: 1009

    Hello

    I use Windows 7. I made this mistake in a significant way of Error 1935. I encountered this problem with many cases, including install MSXML 4.0 SP2 etc.
    And I used the method of size of the registry unlimited (value 0xffffff) etc. All do not work in my PC.

    After I checked the CBS, I realized that it's something wrong in the modules of windows install (trustedinstaller.exe), when I tried to start the services, I got the following error:

    Windows could not start the service of installation of modules windows on the Local computer.

    Error 1009: The configuration registry database is damaged.

    We still need to fix without reinstalling windows (see: http://social.technet.microsoft.com/Forums/en/itprovistaapps/thread/17b35f3e-82c3-4491-b94e-6a01c3abf854)? I have a lot of already installed SW.

    Here is an excerpt of the CBS.log newspaper

    2011-12-06 17:10:33, info CBS TrustedInstaller start initialization.
    2011-12-06 17:10:33, v6.1.7601.17592 Info CBS responsible Servicing Stack with Core: C:\WINDOWS\winsxs\x86_microsoft-windows-servicingstack_31bf3856ad364e35_6.1.7601.17592_none_0b0e4b4025cf4049\cbscore.dll
    2011-12-06 17:10:33, CBS News could not load the hive of COMPONENTS of "C:\WINDOWS\System32\config\COMPONENTS" in the registry key 'HKLM\COMPONENTS '. [HRESULT = 0X800703F1 - ERROR_BADDB]
    2011-12-06 17:10:33, CBS News could not load the DLL WCP. [HRESULT = 0X800703F1 - ERROR_BADDB]
    2011-12-06 17:10:33, info CBS failed to initialize the base DLL: [HRESULT 0x800703f1 - ERROR_BADDB =] C:\WINDOWS\winsxs\x86_microsoft-windows-servicingstack_31bf3856ad364e35_6.1.7601.17592_none_0b0e4b4025cf4049\cbscore.dll
    2011-12-06 17:10:33, CBS News could not initialize the basis of CBS. [HRESULT = 0X800703F1 - ERROR_BADDB]
    2011-12-06 17:10:33, initialization information CBS ending TrustedInstaller.
    2011-12-06 17:10:33, CBS News could not initialize the Trusted Installer. [HRESULT = 0X800703F1 - ERROR_BADDB]
    2011-12-06 17:10:33, finalization of information CBS from TrustedInstaller.
    2011-12-06 17:10:33, trusted Installer Info CBS core has not been initialized.
    2011-12-06 17:10:33, finalization of information CBS ending TrustedInstaller.

    Thanks in advance.

    Hi Larry,

    Follow these steps:

    Method 1:

    Scan a checker (SFC) system files on your computer.

    SFC tool scans system files and replaces incorrect versions of system files by using the correct versions.

    For instructions, see How to use the tool File Checker system to resolve missing or corrupted on Windows Vista or Windows 7 system files

    Method 2: Perform a repair of Windows 7 installation.

    For instructions, see this article:

    How to perform an upgrade on the spot on Windows Vista, Windows 7, Windows Server 2008 & Windows Server 2008 R2

    See also: installation and reinstallation of Windows 7

  • ActionScript3 Error #1009: Cannot access a property or method of a null object reference

    Having a problem with the creation of a website in CC animate with ActionScript3.

    Any help would be appreciated.

    Basically, I'm trying to get 'home', 'services' 'contact' buttons work when you click "about".

    import flash.events.MouseEvent;

    Stop();

    header_mc.home_btn.addEventListener (MouseEvent.CLICK, gohome);

    gohome function (event: MouseEvent): void {}

    gotoAndStop (1);

    }

    header_mc.about_btn.addEventListener (MouseEvent.CLICK, goabout);

    function goabout (event: MouseEvent): void {}

    gotoAndStop (2);

    }

    header_mc.services_btn.addEventListener (MouseEvent.CLICK, goservices);

    goservices function (event: MouseEvent): void {}

    gotoAndStop (3);

    }

    header_mc.contact_btn.addEventListener (MouseEvent.CLICK, gocontact);

    function gocontact (event: MouseEvent): void {}

    gotoAndStop (4);

    }

    Ran the test after allowing debugging and myself

    TypeError: Error #1009: cannot access a property or method of a null object reference.

    at WORKINGwebsite_fla::MainTimeline/frame1() [WORKINGwebsite_fla. MainTimeline::frame1:3]

    Chassis 1 line 3.

    1009 error indicates that one of the objects targeted by your code are out of reach.  This may mean that the object...

    -is declared but not instantiated

    n ' is not have an instance name (or the name of the instance is misspelled)

    n ' is not in the frame where this code tries to talk to her

    -is animated in place, but is not assigned the name of the instances of each keyframe for her

    -is one of the two or more consecutive keyframes of the same objects without a name assigned in the image previous (s).

  • Error #1009: Cannot access a property or method of a null object reference.

    I need a little help. I do a game, and everything works fine except for the fact that I have 2 errors, which bothers me not that I always use the button, but the other will not let me use the button.

    Error:

    TypeError: Error #1009: cannot access a property or method of a null object reference.

    at Untitled_2_fla::MainTimeline/frame2() [Untitled_2_fla. MainTimeline::frame2:207]

    at flash.display::MovieClip/gotoAndStop()

    at Untitled_2_fla::MainTimeline/PlayBtn() [Untitled_2_fla. MainTimeline::frame1:13]

    Magyx Placement RedAtk.addEventListener (MouseEvent.CLICK, RedAttack); function RedAttack(Event:MouseEvent):void {gotoAndStop (19)}

    This is Frane2:207, I see nothing wrong with that, because all my other are the same

    nextBlueAtk.addEventListener (MouseEvent.CLICK, NWA); function NWA(Event:MouseEvent):void {gotoAndStop (23)} nextGreyAtk.addEventListener (MouseEvent.CLICK, NGA); function NGA(Event:MouseEvent):void {gotoAndStop (27)} nextGreenAtk.addEventListener (MouseEvent.CLICK, ISABELLE); function NGRA(Event:MouseEvent):void {gotoAndStop (31)}

    I get no error for them.

    And frame1:13?

    function PlayBtn(event:MouseEvent):void {gotoAndStop (2)}

    Please help someone, I want to keep working on this game!

    When Flash tells you that there is a null object reference, this means that an object that you are referring to a function is not available at this time here in the film. It is usually a problem with the object being not not in a particular setting. Make sure that the object, the key is actually in the frame where the function reference.

  • Error #1009 when loading SWF with Document class

    Hello

    I have two sovereigns, racingPreloader.swf and racingTrack1.swf funds, the other has a class of documents 'hands. RaceMain ".

    racingPreloader.swf is a preloader for racingTrack1.swf, but it does not work. Instead, I get the result:

    TypeError: Error #1009: cannot access a property or method of a null object reference.

    sector: RaceMain()

    I tried to enable debugging on both files and test it with Shift + Ctrl + Enter, but the result is substantially the same; It does not give me a specific line where is the problem.

    Try to launch and connect to player using URL H:\Swifter\racingPreloader.swf

    [SWF] H:\Swifter\racingPreloader.swf - 16102 bytes after decompression

    [SWF] H:\Swifter\racingTrack1.swf - 41869 bytes after decompression

    TypeError: Error #1009: cannot access a property or method of a null object reference.

    sector: RaceMain()

    Cannot view the source code at this location


    This is very similar to what happened to this topic, but I couldn't solve my problem after not finding a solution in it.


    Here's the code to frame 1 of the racingPreloader.swf:


    var loader: Loader = new Loader();

    Loader.Load (new URLRequest ("racingTrack1.swf"));

    loader.contentLoaderInfo.addEventListener (Event.COMPLETE, openSWF);

    function openSWF(e:Event) {}

    addChild (loader)

    }

    And this is a part of the code to the sector. RacingMain class. I have omitted most of the code because I believe that these lines are the source of the problem:

    the packet network {}

    import flash.display.MovieClip;

    //... More import clausses

    SerializableAttribute public class RaceMain extends MovieClip {}

    public void RaceMain() {}

    if(stage==null)

    this.addEventListener (Event.ADDED_TO_STAGE, main);

    on the other

    hand (null);

    }

    private void main(e:Event):void {}

    start the game

    }

    }

    }


    Thank you.

    I just figured out that I was loading an old version of racingTrack1.swf with an unfixed food version. RaceMain class of document. I changed to the version with this fix and finally managed to do work.

  • Error #1009 - buttons on new executives

    Hello

    * I'm a little new to ActionScript 3 you must forgive my probably inaccurate descriptions, but here we deplacements.*

    I am developing a flash website and (surprise, surprise) I am using the buttons... but I get errors. I get error #1009 and think that I found the problem I am facing:

    The first group of 3 buttons (let's call group them A1 for clarity) is the Framework 1. Each of these buttons leads to its own subpage of 2 buttons (groups A2 - C2) that each leads to its own page (and, therefore, framework.)

    Here is a graph that illustrates my layout of the site, it also illustrates my love for graphics.

    graph.png

    I use your common code for the buttons, but I get the error #1009. I think it's because the buttons I've included in the code are in different time periods, despite the code being written in the same place.

    What should I do to fix this?

    Thank you

    Joshua

    You cannot reference a button using actionscript until it exists, or you will get this error 1009.

    for example, if the code for all of these buttons is on frame 1 of your main timeline, you add all these buttons to the stage in frame 1.

    because you want all these buttons visible on frame 1 to the start of your swf file you can use the visible property to control what the user sees (and does not).

  • Help please! I using Muse (the free trial version) very well since last week, but the last few times I tried to use it, it comes back with ' TypeError: Error #1009 pouvez anyonve tried to use it, it comes back with ' error can all

    Help please! I using Muse (the free trial version) very well since last week, but the last few times I tried to use it, it comes back with ' TypeError: Error #1009 pouvez anyonve tried to use it, it comes back with ' error can someone help me figure out what the problem... I have a few days I really help neee what the problem is... I have a deadline in a few days so I really need! Thank you

    Screen Shot 2015-05-11 at 20.32.34.png

    Restart your Mac. The OSX Drag Manager got in a bad state. The only way to reset it is to restart your computer.

  • Help, please! TypeError: Error #1009: cannot access a property or method of a null object reference.  Help, please!

    Can anyone help! Here's the code from to escape the game of the room that I am creating.  Basically the user will be drag and drop items to reveal the user will collect hidden items.  I got the elements of drag-and - drop but I have a problem with the service that I write to recognize what are the elements and how much has been collected.  I just get the error

    TypeError: Error #1009: cannot access a property or method of a null object reference.

    at TheMathsRooms_fla::MainTimeline/ObjectFound()

    When I click on one of the elements, the user must be able to collect.  I checked the chronology and pint, the script is used all THE elements are on the scene.  Any ideas?

    function objectFound

    function ObjectFound(event:MouseEvent):void {}

    var room1_inventoryName:String = "room1_inventory" + event.target.name;

    var room1_inventoryItem:DisplayObject = getChildByName (room1_inventoryName);

    Event.Target.alpha is room1_inventoryItem.alpha = 100;.

    founditems ++;

    Event.Target.alpha = 0

    }

    Here I put the items in stock to be invisible until they are

    room1_inventoryone_mc.Alpha = 0

    room1_inventorytwo_mc.Alpha = 0

    room1_inventorythree_mc.Alpha = 0

    room1_inventoryfour_mc.Alpha = 0

    room1_inventoryfive_mc.Alpha = 0

    room1_inventorysix_mc.Alpha = 0

    A variable is created to count the number of items the player has found.  At the beginning of the game, it is set to 0

    var founditems:Number = 0;

    Here, I'm telling Flash to keep track of what the user has found by listening to what were clicked on and then by running the objectFound function.

    room1_hiddenone_mc.addEventListener (MouseEvent.MOUSE_DOWN, ObjectFound);

    room1_hiddentwo_mc.addEventListener (MouseEvent.MOUSE_DOWN, ObjectFound);

    room1_hiddenthree_mc.addEventListener (MouseEvent.MOUSE_DOWN, ObjectFound);

    room1_hiddenfour_mc.addEventListener (MouseEvent.MOUSE_DOWN, ObjectFound);

    room1_hiddenfive_mc.addEventListener (MouseEvent.MOUSE_DOWN, ObjectFound);

    room1_hiddensix_mc.addEventListener (MouseEvent.MOUSE_DOWN, ObjectFound);

    Here's the function to allow the items to drag and drop

    function StartDragging (e:MouseEvent) {}

    e.currentTarget.startDrag ();

    }

    function StopDragging (e:MouseEvent) {}

    e.currentTarget.stopDrag ();

    }

    This shows that items can now be dragged and lowered some will reveal hidden items

    Bluechair.buttonMode = true;

    Bluechair.addEventListener (MouseEvent.MOUSE_DOWN, StartDragging);

    Bluechair.addEventListener (MouseEvent.MOUSE_UP, StopDragging);

    Pencilcase.buttonMode = true;

    Pencilcase.addEventListener (MouseEvent.MOUSE_DOWN, StartDragging);

    Pencilcase.addEventListener (MouseEvent.MOUSE_UP, StopDragging);

    Painting.buttonMode = true;

    Painting.addEventListener (MouseEvent.MOUSE_DOWN, StartDragging);

    Painting.addEventListener (MouseEvent.MOUSE_UP, StopDragging);

    Rubbish.buttonMode = true;

    Rubbish.addEventListener (MouseEvent.MOUSE_DOWN, StartDragging);

    Rubbish.addEventListener (MouseEvent.MOUSE_UP, StopDragging);

    Painting2.buttonMode = true;

    Painting2.addEventListener (MouseEvent.MOUSE_DOWN, StartDragging);

    Painting2.addEventListener (MouseEvent.MOUSE_UP, StopDragging);

    Trunk.buttonMode = true;

    Trunk.addEventListener (MouseEvent.MOUSE_DOWN, StartDragging);

    Trunk.addEventListener (MouseEvent.MOUSE_UP, StopDragging);

    Pillow.buttonMode = true;

    Pillow.addEventListener (MouseEvent.MOUSE_DOWN, StartDragging);

    Pillow.addEventListener (MouseEvent.MOUSE_UP, StopDragging);

    Click file > publishing settings > swf and check the box "enable debugging".  test.

    the number of problematic line will be in the error message that allows you to quickly identify the problematic reference which is probably room1_inventoryItem.  use the function trace to confirm:

    function ObjectFound(event:MouseEvent):void {}

    var room1_inventoryName:String = "room1_inventory" + event.target.name;

    trace (room1_inventoryName);

  • Error #1009: What eventlistener is other than frame 1

    So what I'm trying to do, is to build a simple page where from the first page with buttons. You click a button and it triggers a simple STOP function like this:


    Stop();

    l2v2_btn.addEventListener (MouseEvent.CLICK, l2v2);

    function l2v2(event:MouseEvent):void

    {

    gotoAndStop (2);

    }

    From there I want each page to have a bunch of buttons, each button represents a sound that plays when you hit. Wonder, works, easy, swell.

    The problem is when I try to attach a function to these buttons. I want that each press of the button to add a child, or remove a child. Now... when I've just do everything on frame 1 - no problem, but when I leave the frame 1 (main menu for any other image (at this stage, part 2) I get this, a mistake that I am so sick of I may vomit.)

    TypeError: Error #1009: cannot access a property or method of a null object reference.

    to * _fla::MainTimeline/frame2()

    at flash.display::MovieClip/gotoAndStop()

    to * _fla::MainTimeline/l2v2()

    actions on frame 1 are above

    code on frame 2 ate here:


    var nd: and = new And();

    var big: big = new Big().

    class var = 'none ';

    and_btn.addEventListener (MouseEvent.CLICK, fAnd);

    big_btn.addEventListener (MouseEvent.CLICK, fBig);

    function fBig(event:MouseEvent):void

    {

    If (current == "none")

    {

    addChild (nd);

    current = nd.name;

    }

    ElseIf (current! = "none")

    {

    removeChild (getChildByName (current));

    addChild (nd);

    ND.x = 818;

    ND.y = 438;

    current = nd.name;

    }

    }

    function fAnd(event:MouseEvent):void

    {

    If (current == "none")

    {

    addChild (big);

    current = big.name;

    }

    ElseIf (current! = "none")

    {

    removeChild (getChildByName (current));

    addChild (big);

    current = big.name;

    }

    }

    Basically, I want just a home page, I click on one takes button me to another page with buttons, each button plays an audio vocabulary and adds a sprite (Word vocab onstage) when

    It works when I'm on frame one, the permutation on the sprites, but when I try to go to another frame with the same it getting the above error. I know it is a simple problem, could someone help please? It makes me crazy


    In fact, it seemed to solve my problem:

    this.addEventListener (Event.ENTER_FRAME, onEnterFrame, false);

    Call this auditor function continuously until all the buttons are taken into account

    function onEnterFrame(e:Event):void

    {

    If (and_btn! = null & big_btn! = null)

    {

    and_btn.addEventListener (MouseEvent.CLICK, fAnd);

    big_btn.addEventListener (MouseEvent.CLICK, fBig);

    clean the enter frame listener so that this function is no longer is called

    this.removeEventListener (Event.ENTER_FRAME, onEnterFrame, false);

    }

    }

    Of course now I don't know how to add sprites on the stage on an other than 0,0 starting position.

Maybe you are looking for

  • the "next screen" buttons are invisible, making it impossible to navigate beyond the first page of what either. Help please!

    One no matter what website I connect to, if I need to navigate to another page after the first there is usually some sort of bo or the button at the bottom of the page to click to go to the next screen. The button/box has disappeared from all the web

  • Satellite A300 - SPDIF disabled after installing XP

    Hello again. After I downgrade my A300 from Vista to XP everythings works fine.Just one problem. My SPDIF no longer works. No red lights, no possibility of he chose in the acoustic Panel...I have installed the Toshiba page sounddrivers. Someone couns

  • Coded frequencies-16 generator control switch

    I feel really lame to ask this, but I can't understand how to connect a code switch to select 16 different frequencies in the generator module. I keep trying to figure out how with a switch output and a generator of output that I can control the gene

  • helps the recovery disk!

    I went to the part of create recovery disk and started the first disk, then put it in the second when I was. But he has not done said could not verify disc or something like that. so I tried again with a different disc and he did the first disk again

  • all in one on windows 8.1

    So, I just bought a new laptop with Windows 8.1.  The original while a cd does not support win 8.1 and ends.  I downloaded the software and the driver install for my j4680 wireless.  It unpacks and starts to run.  But nothing happens.  I look in the