TypeError: Error #1009: when communicating to a button in a MovieClip

I get the following error:

[SWF] ProjectZ_iOS.swf - 12154544 bytes after decompression

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

at ProjectZ_iOS_fla::MainTimeline/goButtons() [ProjectZ_iOS_fla. MainTimel ine::frame71:54]

By trial and error, I have reduced this problem down (line 54) of an 'if' statement (and all the other instructions) that communicate to a button in a movie clip (PopUp_GetMore.bnt_MoreRemixesGoHome). When the user clicks this button I want to delete the movieclip on the stage and turn the visibility of the other buttons to true. I get this error for every query that communicates to a button in the movieclip. I have several conditions in the service, but for example I am love, only include the declaration for a button below:

Variables

var PopUp_GetMore:MainMoreRemixes_mc = new MainMoreRemixes_mc();

//******************************Stage buttons**************************************

stage.addEventListener (MouseEvent.MOUSE_DOWN, goButtons);

function goButtons(event:MouseEvent):void

{

Add the movieclip on the stage

if(Event.Target == bnt_GetMore)

{

addChild (PopUp_GetMore);

PopUp_GetMore.x = stage.stageWidth/2;

PopUp_GetMore.y = stage.stageHeight/2;

bnt_Behind.visible = false;

bnt_GetMore.visible = false;

bnt_Facts.visible = false;

bnt_AuthorIllustrator.visible = false;

}

Deletes the clip of the scene

If (event.target is PopUp_GetMore.bnt_MoreRemixesGoHome)

{

removeChild (PopUp_GetMore);

bnt_Behind.Visible = true;

bnt_GetMore.Visible = true;

bnt_Facts.Visible = true;

bnt_AuthorIllustrator.Visible = true;

}

}

What I am doing wrong? If the declarations as communcate with the buttons inside the movieclip appear in another function?

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).

If you go to your section to publish the Flash settings and select permit debugging option, your error message should have a suite of line number the number of the frame that will help you to isolate the object that is involved.

And just in case it might be a misspelling... If it is a button would not name more likely include "btn" rather than "bnt".

Tags: Adobe Animate

Similar Questions

  • TypeError: Error #1009:

    Here is my error:

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

    at GuitarAnimation_2_fla::MainTimeline/frame176()

    at flash.display::MovieClip/gotoAndStop()

    at GuitarAnimation_2_fla::MainTimeline/Chome()

    My animation film is to teach the user what each channel name and the sound is and how to play 3 different simple chords on a guitar. Each section of the rope has a under section Learn placement of finger and also to hear/see the agreement currently playing.

    I have action 3 layers and one for the main Navigation buttons, one for the buttons on the page of guitar strings, and one for the navigation on each sub buttons learn the rope page. I pasted the code I get an error on. I ran the debugger and it said problems with line 7, in which I marked in red below. This code, here's the whole error I get when I run the debugger.

    under navigation

    import flash.events.MouseEvent;

    Stop();

    c_placebtn.addEventListener (MouseEvent.CLICK, c_place);

    hear_cbtn.addEventListener (MouseEvent.CLICK, c_hear);

    d_placebtn.addEventListener (MouseEvent.CLICK, d_place);

    hear_dbtn.addEventListener (MouseEvent.CLICK, d_hear);

    g_placebtn.addEventListener (MouseEvent.CLICK, g_place);

    hear_gbtn.addEventListener (MouseEvent.CLICK, g_hear);

    function c_place(event:MouseEvent):void {}

    gotoAndStop ("cfingers")

    c_placebtn.Alpha = 0;

    hear_cbtn. Alpha = 100;

    }

    function c_hear(event:MouseEvent):void {}

    gotoAndStop ("c_hear_chord")

    c_placebtn. Alpha = 100;

    hear_cbtn.Alpha = 0;

    }

    function d_place(event:MouseEvent):void {}

    gotoAndStop ("dfingers")

    d_placebtn.Alpha = 0;

    hear_dbtn. Alpha = 100;

    }

    function d_hear(event:MouseEvent):void {}

    gotoAndStop ("d_hear_chord")

    d_placebtn. Alpha = 100;

    hear_dbtn.Alpha = 0;

    }

    function g_place(event:MouseEvent):void {}

    gotoAndStop ("gfingers")

    g_placebtn.Alpha = 0;

    hear_gbtn. Alpha = 100;

    }

    function g_hear(event:MouseEvent):void {}

    gotoAndStop ("g_hear_chord")

    g_placebtn. Alpha = 100;

    hear_gbtn.Alpha = 0;

    }

    Complete debugger error

    Try to launch and connect to player using the URL C:\Users\owner\Documents\AIOP-Schoolwork\Interactive Authoring\Class Project\Guitar Animation_2.swf

    [SWF] C:\Users\owner\Documents\AIOP-Schoolwork\Interactive Authoring\Class Project\Guitar Animation_2.swf - 153383 bytes after decompression

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

    at GuitarAnimation_2_fla::MainTimeline/frame176() [GuitarAnimation_2_fla. MainTimeline::frame1 76:7]

    at flash.display::MovieClip/gotoAndStop()

    at GuitarAnimation_2_fla::MainTimeline/Chome() [GuitarAnimation_2_fla. MainTimeline::frame1:17]

    If the information you have provided is accurate, d_placebtn does not exist when this line of code is run.

  • TypeError: Error #1009 but my purpose is here.

    Hi all

    On frame 1 on my main stage, I have a clip (IndexMC)

    Inside of that movieclip, I have a button (Index_Safety)

    Frame 1, I have a few AS3:

    IndexMC.Index_Safety.addEventListener (MouseEvent.CLICK, INDEX_Safety);

    function INDEX_Safety (e:MouseEvent): void

    {

    Play();

    INDEX_SAFETY = true;

    Sound_Stopper ();

    }

    When I run it, I get this error:

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

    at Newflashlayout_fla::MainTimeline/frame1() [Newflashlayout_fla. MainTimeline::frame1:14]

    Normally, when I get this error, it is because it cannot find the object that I've referenced. However, I am SEO IndexMC.Index_Safety on frame 1 and the movieclip (IndexMC) with the button (Index_Safety) is on frame 1.

    Newflashlayout_fla. MainTimeline::frame1:14 is:

    IndexMC.Index_Safety.addEventListener (MouseEvent.CLICK, INDEX_Safety);

    You are welcome and if you all put please mark the thread responded, so we can filter without response. Good luck!

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

    You have a problem with a 'game' that I'm doing (just a little, to test its functioning). The idea is that you start as a man in a maze and then use the arrows to direct him. Recently, we started with interactivity with flash professional CS5.5.

    The error I get when testing is:

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

    at MannstyrtavpiltasteneTEST_fla::maintimeline/collisionmal() [MannstyrtavpiltasteneTEST_fla. MainTimeline::frame1:260]

    But this project is copied to another where we used buttons to direct an object, and I copied some code out of a youtube video that so I'm naïve now...

    I had three images in this game:

    The first is the game, where you start in the maze and make your way to the goal.

    The second is the plot of 'losing', that appear when the man is colliding with the walls.

    The third is when you win the game, which is mostly just a congratulation.

    When I go through two and three, I get the error. I guess I need to run the buttoncodes sort of way, so that the flash searching in fram 2 or 3. The game works fine, but the errors is not good, even if the game works.

    And the second problem is that every time that I lose or win and return to the framework one speed is multiplied by 2, it moves 4 PX instead of 2, etc.

    Any ideas?

    The error indicates that line 260 of frame 1 is where an object is covered by the code, but it does not exist as far as the compiler sees.  You can use the trace() function to determine the object that could be, but if there is only a single object on the line, this object will be the one.

    For your second problem, you must change the value of the speed somehow, so you will need to look at the code from frame 1 closely to see why this might be.  Still, you can probably use the trace() function to see when the value changes.

  • Error #1009 when sound inside game, a movie clip that is called to the scene with child add method

    What is supposed to happen

    I have a clip that is called when the user clicks a button. When moving clip appears music is expected to play. When the user clicks the close button the music stops and the clip is removed from the scene.

    But then I get an error

    When I test the movie I get the following error:

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

    to mc_playSong / frame2 () [mc_playSong::frame2:6]

    This is the code that calls the clip on the stage (no problem here):

    Call the video clip with the song played on stage

    stage.addEventListener (MouseEvent.MOUSE_DOWN, goButtons);

    function goButtons(event:MouseEvent):void

    {

    If (event.target is song_bnt)

    {

    SoundMixer.stopAll ();

    addChild (myPlaySong);

    myPlaySong.x = 558;

    myPlaySong.y = 384;

    Event.stopImmediatePropagation;

    }

    The following code inside the clip is called to the scene. The music is meant to play:

    Stop();

    Variables for listening to music

    var RJPlaySong:RJSong = new RJSong();

    var RJPlaySongChannel:SoundChannel;

    Music for plays

    stage.addEventListener (Event.ENTER_FRAME, startRJSong); (I think that the error in the code is in this function. When I comment on him I don't get error.)

    function startRJSong(event:Event):void

    {

    RJPlaySongChannel = RJPlaySong.play ();

    }

    Stop all sounds, sets variables to null and calls a send event that removes the clip of the scene.

    bnt_closeSong.addEventListener (MouseEvent.MOUSE_DOWN, closeCreditSongScreen);

    function closeCreditSongScreen(event:MouseEvent):void

    {

    SoundMixer.stopAll ();

    RJPlaySong = null;

    RJPlaySongChannel = null;

    dispatchEvent (new Event ("RemoveMCsong"));

    }

    Someone at - it ideas? This seems to be a pretty simple question, but I can't understand it.

    I meant that you have quoted just to be taken literally.  If it's still not clear what I say or what did your code, try the following in order to demonstrate the IT change... This code to be...

    stage.addEventListener (Event.ENTER_FRAME, startRJSong);

    function startRJSong(event:Event):void {}

    trace ("I can do this all day");

    }

    After doing this, you can see why you want to only call the function once, and you could eliminate most of it and just put...

    RJPlaySongChannel = RJPlaySong.play ();

    Instead, or as I said originally, you can change it to be...

    function startRJSong (): void

    {

    RJPlaySongChannel = RJPlaySong.play ();

    }

    startRJSong();

  • TypeError: Error #1009 in different chassis

    Hello. I know there are a lot of discussions on this subject, but so far I have not found the answer I was looking for.

    I'm script in an Actionscript 3.0 file, not in the timeline itself.

    I am creating a point and adventure where the player move through different scene by clicking on the environment as a normal point and then click adventure game. I currently have only 2 images.

    I put the different scenes on different chassis where the Reader click the environment to move to this frame. However, when I put Morgoth movieclips and buttons in addEventListener on frame 2, I get:

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

    at Puzzle1copy()

    I ran debug and got this:

    Try to launch and connect to player using the URL D:\Users\kikilalaz\Desktop\New Sem\GameProjectStuff\Puzzle1Copy\Puzzle1copy.swf

    [SWF] D:\Users\kikilalaz\Desktop\New Sem\GameProjectStuff\Puzzle1Copy\Puzzle1copy.swf - 1183598 bytes after decompression

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

    at Puzzle1copy() [D:\Users\kikilalaz\Desktop\New Sem\GameProjectStuff\Puzzle1Copy\Puzzle1copy.as:18]

    I have read a lot of people, said the instance must be initiated first, until the eventlisteners can run, otherwise she will become zero.

    Currently, I do not know how to fix this and is about to go crazy to try many different methods from different sources.

    This is my code:

    Header 1

    package {}

    import flash.display. *;

    import flash.events. *;

    SerializableAttribute public class Puzzle1copy extends MovieClip

    {

    public void Puzzle1copy() {}

    Frame1 listeners

    btnTrashCan.addEventListener (MouseEvent.CLICK, TrashCom);

    btnRadiator.addEventListener (MouseEvent.CLICK, RadCom);

    btnRatHole.addEventListener (MouseEvent.CLICK, RatCom);

    mcVicMar.addEventListener (MouseEvent.CLICK, VicCom);

    mcWindow.addEventListener (MouseEvent.CLICK, WinCom);

    listeners frame2

    mcDirt.addEventListener (MouseEvent.CLICK, DirtCom);

    btnBack.addEventListener (MouseEvent.CLICK, GoBack1);

    }

    frame1 functions

    function TrashCom(e:MouseEvent) {}

    txtCom1.text = "This is a trashcan.";

    }

    function RadCom(e:MouseEvent) {}

    txtCom1.text = 'This is an old radiator.';

    }

    function RatCom(e:MouseEvent) {}

    txtCom1.text = "a rat hole. I can see rats inside. « ;

    }

    function VicCom(e:MouseEvent) {}

    txtCom1.text = "This must be where his body was found.";

    }

    function WinCom(e:MouseEvent) {}

    txtCom1.text = 'He is too dirty to see anything.';

    }

    functions of frame2

    function DirtCom(e:MouseEvent) {}

    txtCom2.text = "nothing but garbage here.";

    }

    function GoBack1(e:MouseEvent) {}

    gotoAndStop ("BackAlley");

    }

    }

    }

    Thank you very much for the help!

    This is because the button is facing the second image and you cannot apply event for this button the first button.

    You must wait until frame2 is rendered and for this button instance is put into service.

    This code will be like

    package {}

    import flash.display. *;

    import flash.events. *;

    SerializableAttribute public class Puzzle1copy extends MovieClip

    {

    var isSecond:Boolean = false; / / to ensure that this event is apply only once

    public void Puzzle1copy() {}

    Frame1 listeners

    btnTrashCan.addEventListener (MouseEvent.CLICK, TrashCom);

    btnRadiator.addEventListener (MouseEvent.CLICK, RadCom);

    btnRatHole.addEventListener (MouseEvent.CLICK, RatCom);

    mcVicMar.addEventListener (MouseEvent.CLICK, VicCom);

    mcWindow.addEventListener (MouseEvent.CLICK, WinCom);

    this.addEventListener (Event.ENTER_FRAME, onAddToStage) ;// add frame event enter.

    }

    function onAddToStage(e:Event):void

    {

    If (this.currentFrame == 1)

    {

    }

    Else if (this.currentFrame == 2) / / when reach the second image

    {

    If (! isSecond)

    {

    isSecond = true;

    mcDirt.addEventListener (MouseEvent.CLICK, DirtCom);

    btnBack.addEventListener (MouseEvent.CLICK, GoBack1);

    }

    }

    on the other

    {

    this.removeEventListener (Event.ENTER_FRAME, onAddToStage);

    }

    }

    frame1 functions

    function TrashCom(e:MouseEvent) {}

    txtCom1.text = "This is a trashcan.";

    }

    function RadCom(e:MouseEvent) {}

    txtCom1.text = 'This is an old radiator.';

    }

    function RatCom(e:MouseEvent) {}

    txtCom1.text = "a rat hole. I can see rats inside. « ;

    }

    function VicCom(e:MouseEvent) {}

    txtCom1.text = "This must be where his body was found.";

    }

    function WinCom(e:MouseEvent) {}

    txtCom1.text = 'He is too dirty to see anything.';

    }

    functions of frame2

    function DirtCom(e:MouseEvent) {}

    txtCom2.text = "nothing but garbage here.";

    }

    function GoBack1(e:MouseEvent) {}

    gotoAndStop ("BackAlley");

    }

    }

    }

    I hope this will help u.

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

    I am doing a slideshow with buttons that link to web pages through a read more button but I get an error message

    Page2: function Function() {}

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

    to faccm_fla::MainTimeline/frame1() [faccm_fla. MainTimeline::frame1:36]

    Here is the AS 3.0 code I use

    Text1.addEventListener (MouseEvent.CLICK, nav1);

    function nav1(evt:MouseEvent):void {}

    gotoAndPlay (20);

    }

    Text2.addEventListener (MouseEvent.CLICK, nav2);

    function nav2(evt:MouseEvent):void {}

    gotoAndPlay (81);

    }

    Text3.addEventListener (MouseEvent.CLICK, nav3);

    function nav3(evt:MouseEvent):void {}

    gotoAndPlay (142);

    }

    Text4.addEventListener (MouseEvent.CLICK, nav4);

    function nav4(evt:MouseEvent):void {}

    gotoAndPlay (203);

    }

    Text5.addEventListener (MouseEvent.CLICK, nav5);

    function nav5(evt:MouseEvent):void {}

    gotoAndPlay (264);

    }

    read1_btn.addEventListener (MouseEvent.CLICK, page1);

    read2_btn.addEventListener (MouseEvent.CLICK, page2);

    read3_btn.addEventListener (MouseEvent.CLICK, page3);

    read4_btn.addEventListener (MouseEvent.CLICK, page4);

    read5_btn.addEventListener (MouseEvent.CLICK, page5);

    function page1(evt:MouseEvent):void {}

    var url: String = " " http://site ";

    var request: URLRequest = new URLRequest (url);

    try {}

    navigateToURL (request, "_blank");

    } catch (error) {}

    trace ("Error occurred!");

    }

    }

    function page2(evt:MouseEvent):void {}

    var url: String = " " http://site ";

    var request: URLRequest = new URLRequest (url);

    try {}

    navigateToURL (request, "_blank");

    } catch (error) {}

    trace ("Error occurred!");

    }

    }

    function page3(evt:MouseEvent):void {}

    var url: String = " " http://site ";

    var request: URLRequest = new URLRequest (url);

    try {}

    navigateToURL (request, "_blank");

    } catch (error) {}

    trace ("Error occurred!");

    }

    }

    function page4(evt:MouseEvent):void {}

    var url: String = " " http://site ";

    var request: URLRequest = new URLRequest (url);

    try {}

    navigateToURL (request, "_blank");

    } catch (error) {}

    trace ("Error occurred!");

    }

    }

    function page5(evt:MouseEvent):void {}

    var url: String = " " http://site ";

    var request: URLRequest = new URLRequest (url);

    try {}

    navigateToURL (request, "_blank");

    } catch (error) {}

    trace ("Error occurred!");

    }

    }

    Any object focused on whatever line 36 is does not exist as far as the code sees when it runs.

    This may mean that the object...
     
    n ' is not in the display list
    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).

  • New action script and get: TypeError: Error #1009: cannot access a property or method of a nude

    I get this message in the tab out to the buttons that I am creating.  Here is the code:

    import flash.events.MouseEvent;

    Stop();

    function goHome(myEvent:MouseEvent):void {}
    gotoAndStop ("home");
    SoundMixer.stopAll ();
    }
    function goAbout(myEvent:MouseEvent):void {}
    gotoAndStop ("about");
    SoundMixer.stopAll ();
    }
    function goBusiness(myEvent:MouseEvent):void {}
    gotoAndStop ("business");
    SoundMixer.stopAll ();
    }
    function goContact(myEvent:MouseEvent):void {}
    gotoAndStop ("contact");
    SoundMixer.stopAll ();
    }
    function goArchives(myEvent:MouseEvent):void {}
    gotoAndStop ("archives");
    SoundMixer.stopAll ();
    }
    function goBioTech(myEvent:MouseEvent):void {}
    gotoAndStop ("bioTech");
    SoundMixer.stopAll ();

    }
    function goRealEstate(myEvent:MouseEvent):void {}
    gotoAndStop ("realEstate");
    SoundMixer.stopAll ();
    }
    function goTechnology(myEvent:MouseEvent):void {}
    gotoAndStop ("technology");
    SoundMixer.stopAll ();
    }
    function goEnergy(myEvent:MouseEvent):void {}
    gotoAndStop ("energy");
    SoundMixer.stopAll ();
    }

    home_btn.addEventListener (MouseEvent.CLICK, goHome);
    about_btn.addEventListener (MouseEvent.CLICK, goAbout);
    business_btn.addEventListener (MouseEvent.CLICK, goBusiness);
    contact_btn.addEventListener (MouseEvent.CLICK, goContact);
    archives_btn.addEventListener (MouseEvent.CLICK, goArchives);
    bioTech_btn.addEventListener (MouseEvent.CLICK, goBioTech);
    realEstate_btn.addEventListener (MouseEvent.CLICK, goRealEstate);
    technology_btn.addEventListener (MouseEvent.CLICK, goTechnology);
    energy_btn.addEventListener (MouseEvent.CLICK, goEnergy);

    I ran the debugger and got this:

    TypeError: Error #1009: cannot access a property or method of a null object reference.
    at peakInsights_fla::MainTimeline/frame1() [peakInsights_fla. MainTimeline::frame1:48]

    I guess it tells me that there is a problem with the line 48, but what?

    Home, about, company, contact, archives button works. On the business page, there's the biotech buttons left, technology, real estate and energy. When I test it. I get the finger, but the buttons do not work. This is my first flash site I'am so new, new.

    for each button (for example btn1), the image you want is more appear, add a keyframe to this image and attach code like:

    removeChild (btn1);  then return to the frame where you want it to appear use addChild (btn1);

    or

    Btn1. Visible = false;  then back to the frame where you want it to appear use btn1.visible = true;

  • What does this error mean? TypeError: Error #1009...

    Hello

    Please let me know why the following error has occurred when the user clicks on the button?

    The PRStatus button has been clicked!
    TypeError: Error #1009: cannot access a property or method of a null object reference.
    at Final_2_fla::MainTimeline/frame20()
    at flash.display::MovieClip/gotoAndStop()
    at Final_2_fla::MainTimeline/clickSection()

    Some object is missing in the frame of 20.

    parameters--> flash--> turn on debugging of publication - it will show the line of code offensive.

  • 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.

  • 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.

  • 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);

  • Adobe Air + Box2D.swc = TypeError: Error #1009 / / new way of managing .swc files in Flash for iOS Apps?

    Hello

    I need your help please - I need to update one of my iOS Apps. In this application, I use Box2d for a simple maze game (this is an application for children). When I publish and test this game on my Mac it works fine. I can drag my hero (fish) in this maze and all detections of collision, gravity etc perfect work.

    maze.jpg

    When I test it on my iPad it does not work. The device debugger shows this error message:

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

    Global $init)

    Global $init)

    at Box2DAS.Common::b2Base$/initialize() [/ users/jan/Documents/_Projekte/Spielplatz/Universal_ Retina/src/com/Box2DAS/Common/b2Base.as:31]

    to wck::WCK/create() [/ utilisateurs/jan/Documents/_Projekte/Spielplatz/Universal_Retina/src/com/wck/WCK.as:26]

    in misc::Entity/ensureCreated() [/ users/jan/Documents/_Projekte/Spielplatz/Universal_Retina/s rc/com/misc/Entity.as:50]

    in misc::Entity/handleAddedToStage() [/ users/jan/Documents/_Projekte/Spielplatz/Universal_Ret ina/src/com/misc/Entity.as:100]

    in misc::Entity/handleAddedToStage()

    Line 31: loader = new CLibInit();

    Bildschirmfoto 2014-10-23 um 21.06.03.png

    I guess that "CLibInit" must come from the .swc file.

    The thing is:

    I won't change anything in this maze game - it seems it has to do something with the new version of Flash or Adobe Air. File box2d.swc is included:

    Bildschirmfoto 2014-10-23 um 21.01.26.png

    It has always worked like that - and it works when test on my Mac - but it doesn't work anymore on my current system.

    So I started my Mac from an older system (10.9.5 on an external HD) and published the App in Flash and Adobe Air 13.0 CS6 - then all of a sudden, he is working on my iPad as before. I was able to draw a fish and make it arround.

    The same project / app released from my current OS X 10.10 + Flash CC 2014 + Adobe Air 15.0.0.302 does not work. I still have this error message - I can't drag the fish - nothing happens. And I have no idea why this happens and what I could do. I searched all day for a solution but found nothing.

    If nothing has changed by the way Flash and/or Air manages the .swc files? Is there another way to include: import cmodule. Box2d.* / CLibInit?

    -If someone has an idea - please let me know!

    Best regards

    Jan

    SOLVED!

    I uncheck 'Schnelleres Verpacken aktivieren (Beta)' and now it works again! Hooray!

    @ Adobe: Please take a look at this!

  • TypeError: Error #1009: Variable

    If I do a timeline in as3. And this happen

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

    at arrow_Scene1_fla::MainTimeline/frame2()

    The code in box 2 is

    Stop();

    myscore var = 0;

    score. Text = "$" + myscore;

    var mylive = 3;

    Live.Text = "Live:" + mylive;

    var myspin = 0;

    Spin.Text = ' Spin: "+ myspin;

    btn_play.addEventListener (MouseEvent.CLICK, fl_ClickToGoToAndPlayFromFrame);

    function fl_ClickToGoToAndPlayFromFrame(event:MouseEvent):void

    {

    gotoAndPlay (5);

    }

    btn_rule.addEventListener (MouseEvent.CLICK, fl_ClickToGoToAndPlayFromFrame_2);

    function fl_ClickToGoToAndPlayFromFrame_2(event:MouseEvent):void

    {

    gotoAndPlay (3);

    }

    BTN_CREDIT.addEventListener (MouseEvent.CLICK, fl_ClickToGoToAndPlayFromFrame_3);

    function fl_ClickToGoToAndPlayFromFrame_3(event:MouseEvent):void

    {

    gotoAndPlay (4);

    }

    The fat is I think the cause.

    Here's one thing

    (a) no matter what, when I do a variable for the score. This message appears. Yet a new file. ONLY

    RARE CASES WHERE THIS IS NOT SERIOUS.

    Old file not affected, but new file.

    (b) the syntax in bold, no matter where I move it, follows the error. The old frame err message missing

    score, living or spin does not exist when your code runs.

    to identify the error, click file > publishing settings > swf and check the box "enable debugging" and retest.  the number of problematic line will be in the error message.

  • TypeError: Error #1009: How can I find the exact line of the error?

    I got the following error when testing a project:

    [SWF] ProjectZ_iOS.swf - 12154544 bytes after decompression

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

    at ProjectZ_iOS_fla::MainTimeline/goButtons() [ProjectZ_iOS_fla. MainTimeline::frame71:54]

    I don't know how to read what there isn't any 'framework' 71 Moreover, that means this average, 'MainTimeline::frame71:54 '?

    Since no one has mentioned, the line number is 54.  Field 71, line 54.

Maybe you are looking for