TypeError: Error #1009? New to the use of AS3, please help!

Hi, I'm doing a site in flash, and so far everything went perfectly well so far.
I've done a few buttons using MovieClips and then animate it with some actionscript 3. from what I can tell there is nothing wrong with the code itself, the problem is with the clips or symbols or something...? what I need help!


Here is the code for one of the buttons (I use the same code for each button only change the name of the instance):

function btn1Over(event:MouseEvent):void {}

btn1.gotoAndPlay ("Over");

}

function btn1Down(event:MouseEvent):void {}

btn1.gotoAndPlay ("Down");

}

function btn1Out(event:MouseEvent):void {}

btn1.gotoAndPlay ("Out");

}

Btn1.addEventListener (MouseEvent.ROLL_OVER, btn1Over);

Btn1.addEventListener (MouseEvent.ROLL_OUT, btn1Out);

Btn1.addEventListener (MouseEvent.CLICK, btn1Down);

And here is the error message:

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

to openingscene_fla::MainTimeline/frame107()

at flash.display::Sprite/constructChildren()

at flash.display::Sprite()

at flash.display::MovieClip()

to openingscene_fla::home5_38()

at flash.display::Sprite/constructChildren()

at flash.display::Sprite()

at flash.display::MovieClip()

to openingscene_fla::cartoon2_33()

at flash.display::Sprite/constructChildren()

at flash.display::Sprite()

at flash.display::MovieClip()

to openingscene_fla::about1_28()

at flash.display::Sprite/constructChildren()

at flash.display::Sprite()

at flash.display::MovieClip()

to openingscene_fla::contact3_23()

at flash.display::Sprite/constructChildren()

at flash.display::Sprite()

at flash.display::MovieClip()

at openingscene_fla::donate4_18()

donate4, about1, housecalls.5, contact3, cartoon2 is the buttons I use the YOU for. But what is the problem with him, I do not understand what meens sprite / cunstructChildren () for example?

Please help me!

If you show you get the error message, then it would be possible to help you find the problem.  If you do not, you already said enough you should be able to fix the problem yourself, but it is difficult to say if you understand what you are being told.

Tags: Adobe Animate

Similar Questions

  • I have problem with value NULL when the use CASE statement please help this question

    I have problem with value NULL when the use CASE statement please help this question


    Table: digital_val

    SNO cl C2

    1 San1 11

    2 22 San2

    Actual result: expected to A         B

    A            B                                                                           11        22

    11 NULL

    22 NULL



    query:

    Select case when c1 = "san1" then c2,.

    case If c1 = "san2" then c2 B

    of digital_val

    I'm more curious why, when you select 2 rows, you expect a result of row?

    WITH digital_val

    AS (SELECT 1 AS 'Sno', 'San1"C1, c2 FROM DUAL 11)

    UNION ALL

    2 SELECT AS 'Sno', 'San2"C1, c2 FROM DUAL 22)

    SELECT CASE WHEN c1 is "San1" THEN END AS A c2.

    CASE WHEN c1 = "San2" THEN END AS B c2

    OF digital_val;

    With no other input, if you select 2 rows, you get 2 rows.  One of the other solutions use a max function, but is this really what you want, does not specify?

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

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

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

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

  • My event.result may or may not return a node in the xml file. How can I avoid that TypeError: Error #1009:

    My event.result may or may not return a node in the xml file. How can I avoid that TypeError: Error #1009: cannot access a property or method of a null object reference.

    I have a very simple question. I want to take the value of

    Event.Result.Item.nodeindex1.nodeindex2.Row.MyValue;

    and assign it to a text field

    mytextTi.text = event.result.item.nodeindex1.nodeindex2.row.myvalue;

    But if a part of the tree is missing, which is also valid, so I get TypeError: Error #1009: cannot access a property or method of a null object reference.

    I tried various solutions such as the following. Is there any simple way to do this?

    If (event.result.item.nodeindex1.nodeindex2.row.myvalue! = undefined)-does not work

    Unfortunately, one must test all levels to ensure that it is not null before the reference to it. You can take advantage of the short-circuit evaluation in tying together, for example

    if (event.result.item
        && event.result.item.nodeindex1
        && event.result.item.nodeindex1.nodeindex2
        && event.result.item.nodeindex1.nodeindex2.row
        && event.result.item.nodeindex1.nodeindex2.row.myvalue)
    {
        // access the variable
    }
    else
    {
        // one of the XML nodes in the path is null
    }
    

    Or you could stay away from her a little hacky and wrap the reference in a try/catch block.

    -Tom

    Flex SDK engineer

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

    Dear Sir.

    I really need your help at the very last moment, I'm stuck, but I was about to finish a project. Here is the explanation below...

    I have two files called "holder.swf" and "slide.swf" i want to improt 'slide.swf' using this action below

    var myLoader:Loader = new Loader();

    var url: URLRequest = new URLRequest ("slide.swf");

    myLoader.load (url);

    addChild (myLoader);

    myLoader.x = 2;

    myLoader.y = 2;

    Also, I am attaching the flash file of "'holder.swf '." My concern is the time that I call the 'slide.swf' inside the 'holder.swf', it is showing the following error...

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

    to FC_Home_Ads_Holder_v2_fla::MainTimeline() .

    Here are the files downloaded for your reference, please download this file http://www.touchpixl.com/ForumsAdobecom.zip

    This error is being occurred file 'MainTimeline.as', here is the code used within this file below...

    package FC_Home_Ads_Holder_v2_fla

    {

    Import __AS3__.vec. * ;

    Adobe.utils import. *;

    com.danehansen import. *;

    import com.greensock;

    com.greensock.easing import. *;

    com.greensock.plugins import. *;

    flash.accessibility import. *;

    flash.desktop import. *;

    import flash.display. *;

    flash.errors import. *;

    import flash.events. *;

    flash.external import. *;

    flash.filters import. *;

    import flash.geom. *;

    flash.globalization import. *;

    import flash.media. *;

    flash.net import. *;

    flash.net.drm import. *;

    flash.printing import. *;

    flash.profiler import. *;

    flash.sampler import. *;

    flash.sensors import. *;

    flash.system import. *;

    import flash.text. *;

    flash.text.engine import. *;

    flash.text.ime import. *;

    flash.ui import. *;

    import flash.utils. *;

    flash.xml import. *;

    SerializableAttribute public class dynamics MainTimeline extends flash.display.MovieClip

    {

    public void MainTimeline()

    {

    new vector. < String > (6) [0] = "productivity."

    new vector. < String > (6) [1] = "Leadership."

    new vector. < String > (6) [2] = "Execution."

    new vector. < String > (6) [3] = "Education";

    new vector. < String > (6) [4] = "speed of trust";

    new vector. < String > (6) [5] = "Sales";

    Super();

    addFrameScript (0, this.frame1);

    return;

    }

    public void init (): void

    {

    var loc1: * = null;

    com.greensock.plugins.TweenPlugin.activate ([com.greensock.plugins.Aut oAlphaPlugin]);

    LOC1 = new flash.net.URLLoader (new flash.net.URLRequest (this. XML_LOC));

    loc2 var: *;

    This.next_mc.buttonMode = loc2 = true;

    This.prev_mc.buttonMode = loc2;

    stage.scaleMode = flash.display.StageScaleMode.NO_SCALE;

    internship. Align = flash.display.StageAlign.TOP_LEFT;

    LOC1.addEventListener (flash.events.Event.COMPLETE, this.xmlLoaded, false, 0, true);

    This.prev_mc.addEventListener (flash.events.MouseEvent.CLICK, this.minusClick, false, 0, true);

    This.next_mc.addEventListener (flash.events.MouseEvent.CLICK, this.plusClick, false, 0, true);

    return;

    }

    public void xmlLoaded (arg1:flash.events.Event): void

    {

    var loc1: * = null;

    loc2 var: * = 0;

    this.xmlData = new XML (arg1.target.data);

    loc2 = 0;

    While (loc2 < this.) LABELS.length)

    {

    LOC1 = new Btn (this. LABELS [loc2], loc2);

    this.btnHolder_mc.addChild (loc1);

    This. BTNS.push (loc1);

    trace (this.) LABELS [loc2]);

    ++ loc2.

    }

    This.Current = uint (this.xmlData.@firstPick);

    trace ("- width-");

    trace (this.contentMask.Width);

    var loc3: * = this.contentMask.width / this. LABELS.length;

    trace (LOC3);

    loc2 = 0;

    While (loc2 < this.) BTNS.length)

    {

    This. Inclinometer [loc2] .width = loc3;

    This. Inclinometer [loc2] .x = loc3 * loc2.

    ++ loc2.

    }

    this.btnHolder_mc.addEventListener (flash.events.MouseEvent.CLICK, this.numClick, false, 0, true);

    this.selectMovie ();

    return;

    }

    public void numClick (arg1:flash.events.MouseEvent): void

    {

    this.killTimer ();

    This.Current = arg1.target.i;

    this.selectMovie ();

    return;

    }

    public void killTimer (): void

    {

    this.timerGoing = false;

    If (this.timer)

    {

    This.Timer.Reset ();

    this.timer.addEventListener (flash.events.TimerEvent.TIMER, this.plusClick, false, 0, true);

    This.Timer = null;

    }

    return;

    }

    public function selectMovie (): void

    {

    If (this.timerGoing)

    {

    This.Timer = new flash.utils.Timer (uint (this.xmlData.ad [com.danehansen.MyMath.modulo (t his.current, this.xmlData.ad.length ())] .@delay), 1);

    This.Timer.Start ();

    this.timer.addEventListener (flash.events.TimerEvent.TIMER, this.plusClick, false, 0, true);

    }

    While (this.holder_mc.numChildren > 0)

    {

    This.holder_mc.removeChild (this.holder_mc.getChildAt (0));

    }

    var loc1: * = new flash.display.Loader ();

    LOC1. Load (new flash.net.URLRequest (this.xmlData.ad [com.danehansen.MyMath.modulo (thi s.current, this.xmlData.ad.length ())] .@loc));

    This.holder_mc. AddChild (LOC1);

    loc2 var: * = 0;

    While (loc2 < this.) BTNS.length)

    {

    This. BTNS [loc2]. Deselect();

    ++ loc2.

    }

    This. BTNS [com.danehansen.myMath.modulo (this.current, this.xmlData.ad.length ())] .select ();

    var loc3: * = this. BTNS [com.danehansen.myMath.modulo (this.current, this.xmlData.ad.length ())] .x + this. BTNS [com.danehansen.myMath.modulo (this.current, this.xmlData.ad.length ())] .width/2 + this.btnHolder_mc.x;

    trace ("addLength:" + this.xmlData.ad.length ());

    trace (loc3, com.danehansen.MyMath.modulo (this.current, this.xmlData.ad.length ()));

    com.greensock.TweenLite.to (this.indicator_mc, 0.3, {'x': loc3, "ease":com.greensock.easing.Cubic.easeOut});})

    LOC1.contentLoaderInfo.addEventListener (flash.events.Event.COMPLETE, this.adLoaded, false, 0, true);

    return;

    }

    public void adLoaded (arg1:flash.events.Event): void

    {

    var evt:flash.events.Event;

    loc1 var: *;

    evt = arg1;

    Try

    {

    evt.target.content.xmlData = this.xmlData.ad [com.danehansen.MyMath.modulo (this.current, this.xmlData.ad.length ())];

    }

    catch (er: error)

    {

    };

    return;

    }

    public void minusClick (arg1:flash.events.MouseEvent): void

    {

    this.killTimer ();

    loc1 var: *;

    loc2 var: * = ((loc1_=_this).current - 1);

    LOC1. Current = loc2;

    this.selectMovie ();

    return;

    }

    public void plusClick (arg1:flash.events.Event): void

    {

    If (arg1.type! = "timer")

    {

    this.killTimer ();

    }

    loc1 var: *;

    loc2 var: * = ((loc1_=_this).current + 1);

    LOC1. Current = loc2;

    this.selectMovie ();

    trace ("Next");

    return;

    }

    public function ended (arg1:flash.events.Event): void

    {

    If (arg1.type! = "timer")

    {

    this.killTimer ();

    }

    loc1 var: *;

    loc2 var: * = ((loc1_=_this).current + 1);

    LOC1. Current = loc2;

    this.selectMovie ();

    trace ("Next");

    return;

    }

    public void STARTED (arg1:flash.events.Event): void

    {

    this.killTimer ();

    return;

    }

    function frame1(): *.

    {

    this.timerGoing = true;

    addEventListener ("endNow", this.) COMPLETED, false, 0, true);

    addEventListener ("startNow", this.) STARTED, false, 0, true);

    This.init ();

    return;

    }

    public const XML_LOC:String = stage.loaderInfo.parameters.xmlLoc? stage.loaderInfo.parameters.xmlLoc: "home_ads.xml";

    public const LABELS: __AS3__.vec. Vector. < String > = new Vector. < String > (6);

    public const BTNS:__AS3__.vec. Vector. < Btn > = new Vector. < Btn > ();

    public const TRANSITION_TIME:Number = 0.2;

    public var contentMask:flash.display.MovieClip;

    public var btnHolder_mc:flash.display.MovieClip;

    public var holder_mc:flash.display.MovieClip;

    public var indicator_mc:flash.display.MovieClip;

    public var prev_mc:flash.display.MovieClip;

    public var next_mc:flash.display.MovieClip;

    public var current: int;

    public var xmlData:XML;

    public var timer:flash.utils.Timer;

    public var timerGoing:Boolean;

    }

    }

    Here's the file uploaded to the server for you to get a clear picture, please click this link to download the entire folder. http://www.touchpixl.com/ForumsAdobecom.zip

    I'm not being able to solve the problem, it needs a master to get the right solution. I would ask you to help me.

    Thanks and greetings

    Sanjib Das

    This will fix the error you mentioned, if it comes to your document class:

    package FC_Home_Ads_Holder_v2_fla

    {

    Import __AS3__.vec. * ;

    Adobe.utils import. *;

    com.danehansen import. *;

    import com.greensock;

    com.greensock.easing import. *;

    com.greensock.plugins import. *;

    flash.accessibility import. *;

    flash.desktop import. *;

    import flash.display. *;

    flash.errors import. *;

    import flash.events. *;

    flash.external import. *;

    flash.filters import. *;

    import flash.geom. *;

    flash.globalization import. *;

    import flash.media. *;

    flash.net import. *;

    flash.net.drm import. *;

    flash.printing import. *;

    flash.profiler import. *;

    flash.sampler import. *;

    flash.sensors import. *;

    flash.system import. *;

    import flash.text. *;

    flash.text.engine import. *;

    flash.text.ime import. *;

    flash.ui import. *;

    import flash.utils. *;

    flash.xml import. *;

    SerializableAttribute public class dynamics MainTimeline extends flash.display.MovieClip

    {

    public const XML_LOC:String;

    public const LABELS: __AS3__.vec. Vector. = new Vector. (6);

    public const BTNS:__AS3__.vec. Vector. = new Vector. ();

    public const TRANSITION_TIME:Number = 0.2;

    public var contentMask:flash.display.MovieClip;

    public var btnHolder_mc:flash.display.MovieClip;

    public var holder_mc:flash.display.MovieClip;

    public var indicator_mc:flash.display.MovieClip;

    public var prev_mc:flash.display.MovieClip;

    public var next_mc:flash.display.MovieClip;

    public var current: int;

    public var xmlData:XML;

    public var timer:flash.utils.Timer;

    public var timerGoing:Boolean;

    public void MainTimeline()

    {

    XML_LOC = internship. LoaderInfo.Parameters.xmlLoc? stage.loaderInfo.parameters.xmlLoc: "home_ads.xml";

    new vector. (6) [0] = "productivity."

    new vector. (6) [1] = "leadership."

    new vector. (6) [2] = "execution."

    new vector. (6) [3] = "education";

    new vector. (6) [4] = "speed of trust";

    new vector. (6) [5] = "sales";

    Super();

    addFrameScript (0, this.frame1);

    return;

    }

    public void init (): void

    {

    var loc1: * = null;

    com.greensock.plugins.TweenPlugin.activate ([com.greensock.plugins.Aut oAlphaPlugin]);

    LOC1 = new flash.net.URLLoader (new flash.net.URLRequest (this. XML_LOC));

    loc2 var: *;

    This.next_mc.buttonMode = loc2 = true;

    This.prev_mc.buttonMode = loc2 = true;

    stage.scaleMode = flash.display.StageScaleMode.NO_SCALE;

    internship. Align = flash.display.StageAlign.TOP_LEFT;

    LOC1.addEventListener (flash.events.Event.COMPLETE, this.xmlLoaded, false, 0, true);

    This.prev_mc.addEventListener (flash.events.MouseEvent.CLICK, this.minusClick, false, 0, true);

    This.next_mc.addEventListener (flash.events.MouseEvent.CLICK, this.plusClick, false, 0, true);

    return;

    }

    public void xmlLoaded (arg1:flash.events.Event): void

    {

    var loc1: * = null;

    loc2 var: * = 0;

    this.xmlData = new XML (arg1.target.data);

    loc2 = 0;

    While (loc2<>

    {

    LOC1 = new Btn (this. LABELS [loc2], loc2);

    this.btnHolder_mc.addChild (loc1);

    This. BTNS.push (loc1);

    trace (this.) LABELS [loc2]);

    ++ loc2.

    }

    This.Current = uint (this.xmlData.@firstPick);

    trace ("- width-");

    trace (this.contentMask.Width);

    var loc3: * = this.contentMask.width / this. LABELS.length;

    trace (LOC3);

    loc2 = 0;

    While (loc2<>

    {

    This. Inclinometer [loc2] .width = loc3;

    This. Inclinometer [loc2] .x = loc3 * loc2.

    ++ loc2.

    }

    this.btnHolder_mc.addEventListener (flash.events.MouseEvent.CLICK, this.numClick, false, 0, true);

    this.selectMovie ();

    return;

    }

    public void numClick (arg1:flash.events.MouseEvent): void

    {

    this.killTimer ();

    This.Current = arg1.target.i;

    this.selectMovie ();

    return;

    }

    public void killTimer (): void

    {

    this.timerGoing = false;

    If (this.timer)

    {

    This.Timer.Reset ();

    this.timer.addEventListener (flash.events.TimerEvent.TIMER, this.plusClick, false, 0, true);

    This.Timer = null;

    }

    return;

    }

    public function selectMovie (): void

    {

    If (this.timerGoing)

    {

    This.Timer = new flash.utils.Timer (uint (this.xmlData.ad [com.danehansen.MyMath.modulo (t his.current, this.xmlData.ad.length ())] .@delay), 1);

    This.Timer.Start ();

    this.timer.addEventListener (flash.events.TimerEvent.TIMER, this.plusClick, false, 0, true);

    }

    While (this.holder_mc.numChildren > 0)

    {

    This.holder_mc.removeChild (this.holder_mc.getChildAt (0));

    }

    var loc1: * = new flash.display.Loader ();

    LOC1. Load (new flash.net.URLRequest (this.xmlData.ad [com.danehansen.MyMath.modulo (thi s.current, this.xmlData.ad.length ())] .@loc));

    This.holder_mc. AddChild (LOC1);

    loc2 var: * = 0;

    While (loc2<>

    {

    This. BTNS [loc2]. Deselect();

    ++ loc2.

    }

    This. BTNS [com.danehansen.myMath.modulo (this.current, this.xmlData.ad.length ())] .select ();

    var loc3: * = this. BTNS [com.danehansen.myMath.modulo (this.current, this.xmlData.ad.length ())] .x + this. BTNS [com.danehansen.myMath.modulo (this.current, this.xmlData.ad.length ())] .width/2 + this.btnHolder_mc.x;

    trace ("addLength:" + this.xmlData.ad.length ());

    trace (loc3, com.danehansen.MyMath.modulo (this.current, this.xmlData.ad.length ()));

    com.greensock.TweenLite.to (this.indicator_mc, 0.3, {'x': loc3, "ease":com.greensock.easing.Cubic.easeOut});})

    LOC1.contentLoaderInfo.addEventListener (flash.events.Event.COMPLETE, this.adLoaded, false, 0, true);

    return;

    }

    public void adLoaded (arg1:flash.events.Event): void

    {

    var evt:flash.events.Event;

    loc1 var: *;

    evt = arg1;

    Try

    {

    evt.target.content.xmlData = this.xmlData.ad [com.danehansen.MyMath.modulo (this.current, this.xmlData.ad.length ())];

    }

    catch (er: error)

    {

    };

    return;

    }

    public void minusClick (arg1:flash.events.MouseEvent): void

    {

    this.killTimer ();

    loc1 var: *;

    loc2 var: * = ((loc1_=_this).current - 1);

    LOC1. Current = loc2;

    this.selectMovie ();

    return;

    }

    public void plusClick (arg1:flash.events.Event): void

    {

    If (arg1.type! = "timer")

    {

    this.killTimer ();

    }

    loc1 var: *;

    loc2 var: * = ((loc1_=_this).current + 1);

    LOC1. Current = loc2;

    this.selectMovie ();

    trace ("Next");

    return;

    }

    public function ended (arg1:flash.events.Event): void

    {

    If (arg1.type! = "timer")

    {

    this.killTimer ();

    }

    loc1 var: *;

    loc2 var: * = ((loc1_=_this).current + 1);

    LOC1. Current = loc2;

    this.selectMovie ();

    trace ("Next");

    return;

    }

    public void STARTED (arg1:flash.events.Event): void

    {

    this.killTimer ();

    return;

    }

    function frame1(): *.

    {

    this.timerGoing = true;

    addEventListener ("endNow", this.) COMPLETED, false, 0, true);

    addEventListener ("startNow", this.) STARTED, false, 0, true);

    This.init ();

    return;

    }

    }

    }

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

  • TypeError: Error #1009 generation stars on stage please help!

    Hey,.

    var arrayLAL:Array = new Array();

    arrayLAL.push (star);

    for (var a: uint = 0; has < 5; a ++) {}

    var Star: Star = new Star();

    star.x = 150

    star.y = stage.stageHeight * Math.Random ();

    addChild (star);

    trace (arrayLAL.length)

    stage.addEventListener (MouseEvent.MOUSE_MOVE, lalBlocksMove);

    }

    function lalBlocksMove(evt:MouseEvent)

    {

    addEventListener (Event.ENTER_FRAME, lalBlocksCollision);

    }

    function lalBlocksCollision(event:Event)

    {

    for (var a: uint = 0; has < arrayLAL.length; a ++)

    {

    if (arrayLAL [a] .hitTestPoint (mouseX, mouseY, true))

    {

    this.removeChild (star);

    }

    }

    }

    This is the code that im using and this is the error I get:

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

    to Star_fla::MainTimeline/lalBlocksCollision()

    Im trying to auto generate a number of stars on the stage and then put each in a table and then delete a text hit... previously I created sumthing very similar except that I had to manually push each of the objects in the table, while hoping that it may work as well, coz I have a lot of objects in the last verious: S

    also im not rly sure if this is possible, but I want to 'auto' align you stars so they are not above the knees but rather arragne around the screen evenly as in the lines and coloms... is this possible? or am I to hopeful?

    thx for advice, assistance or suggestions... all is much appreciated

    Pavel

    Pass the grid (rectangle) to the function.  I gave an example of the use of the entire scene for the grid.

  • TypeError: Error #1009... PLEASE HELP ME

    I'm new to using AS3, FLASH CS4...

    my output is:

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

    the code is who has a problem:


    function button6_clicked(event:MouseEvent):void {}
    gotoAndPlay ("page6")
    }

    Button6.addEventListener (MouseEvent.CLICK, button6_clicked);

    How can I solve this?

    my entire code is:

    Stop();

    function button1_clicked(e:MouseEvent):void {}
    gotoAndStop ("page1");
    }

    function button2_clicked(e:MouseEvent):void {}
    gotoAndStop ("page2");
    }

    function button3_clicked(e:MouseEvent):void {}
    gotoAndStop ("page3");
    }

    function button4_clicked(e:MouseEvent):void {}
    gotoAndStop ("page4");
    }

    function button5_clicked(e:MouseEvent):void {}
    gotoAndStop ("5");
    }

    function button6_clicked(event:MouseEvent):void {}
    gotoAndPlay ("7")
    }

    Button1.addEventListener (MouseEvent.CLICK, button1_clicked);
    Button2.addEventListener (MouseEvent.CLICK, button2_clicked);
    Button3.addEventListener (MouseEvent.CLICK, button3_clicked);
    Button4.addEventListener (MouseEvent.CLICK, button4_clicked);
    Button5.addEventListener (MouseEvent.CLICK, button5_clicked);
    Button6.addEventListener (MouseEvent.CLICK, button6_clicked);


    function playMusic(e:MouseEvent):void {}
    var myMusic:Sound = new Sound();
    var soundFile:URLRequest = new URLRequest ("music1.mp3");
    myMusic.load (soundFile);
    myMusic.play ();
    }

    Opps I did not see this >

    ... key 6 is frame 2-6...

    the code resides in the image 1...

    You're code is on frame 1 and trying to access button6 who only begins to exist within the Framework 2. It is not possible. Put on your frame 1 button or put your code to add the listener to button6 on frame 2.

  • TypeError: Error #1009 (SWF loaded)

    I'm pulling my hair out on this one!

    I'm just starting a website (website full-Flash) using CS3 and AS3. I'm pretty much used to the new changes in AS3. I built a rough structure to make sure that the way I wanted to create the site would work (external swf loading, etc.). The tests worked.

    Now, I'm going to do real things, and I get this error as soon as an external SWF to load in:

    ------------------------------------------------------------------------------------------ -----------------------------------------
    TypeError: Error #1009: cannot access a property or method of a null object reference.
    at test_fla::MainTimeline/test_fla::frame2()
    ------------------------------------------------------------------------------------------ -----------------------------------------

    I tried this shrinkage, impossible to find the exact culprit (had to remove every shred of ActionScript, before starting to work again). So, I started to rebuild this film entirely - allowed out of the library and deleted all the layers. Did not work. Impossible to add a stop(); action in Frame 1.

    Then I started completely expenses File > New, rebuilt again. I tested after every single change. I finally built it up to the point where I first tested the original, and it worked. Then added some things more re-tested and I get the error again. Ahh, so I removed EXACTLY what I had just added. Re-tested. SAME ERROR - now it won't go away little matter what I delete!

    Crazier still is that I can always load in my other test SWF files and they have stock in them and they are set up exactly the same way - but they work...

    The entire site is new, so each SWF is CS3/AS3. I'm even not doing something crazy, so I'm pretty frustrated trying to build an AS3 all the site and I even do basic stuff...

    I can download/email the FLA files in question, if someone has the time to watch...

    Thank you
    Brandon

    It sounds ridiculous, but I think it had to do with the file names...

    I think that Flash CS3 has some problem with multiple file names using a hyphen, and start with the same word... I changed this:

    -test - container.swf
    -test - home.swf

    to do this:

    -test - container.swf
    -home.swf

    And rebuilt the home.swf from zero (new). And it seems to work now.

    Here, loads of test - container.swf the home.swf inside himself, I think he cannot know how to distinguish between the two because of the initial error in screaming "test_fla" rather than the name 'test-container_fla' or 'test-home_fla.

    Ugh.

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

Maybe you are looking for

  • HP Paviillion g6 2230tx what happens if more than 8 GB of ram?

    HelloI have HP Pavilion 2230tx g6. I bought laptop with 4 GB of RAM (1 x 4). Then I switch to 8 GB (2 x 4). I heard that this model can use no more then 8 GB of RAM. But my question is what happens if I try you put 12 GB (1 x 4, 1 x 8) or 16 GB (2 x

  • OfficeJet Pro 8600 Windows 7 HP updated expired Certification

    We have received an update for our all-in-one printer.  Before that I accept the downloads, I always check the Verisign certification.  The date of the last update is valid 17/12/08 through 12/18/11.  I am concerned by downloading and am waiting to k

  • Fatal error CNU9106HCV

    Hello on my HP mini 1000 MDL 1120une, I get this fatal error when I try to enter the cmos CNU9106HCV, thank you for your help

  • Question of IdealPad V360

    I found that my V360 could not run anything (accident always at the same point in the same program) SO I tried using memtest + to carry out a control on the main-meory but memtest + could not load the machine always reload. That cause me as a glance

  • Implementation of the remote access VPN IPSec using SRI 2801

    Hello I tried to set up a VPN for remote access using 2801 SRI. I've been able to establish my house vpn tunnel using the DSL (behind a NAT) connection, give it SRI the IP address that is in the ip pool I configured on safety. The problem I have righ