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.

Tags: Adobe Animate

Similar Questions

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

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

    }

    }

    }

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

    Hello

    I'm trying to load a menu as an external file... and it is: TypeError: Error #1009: cannot access a property or method of a null object reference.
    to com::menu()

    Here is my code:

    {if(!menuLoader)}

    var menuRequest:URLRequest = new URLRequest ("menu.swf");
    var menuLoader:Loader = new Loader();
    menuLoader.load (menuRequest);
    container.addChild (menuLoader);

    menuLoader.x = 700;
    menuLoader.y = 50;
    }

    can someone give me a hand?

    Thanks in advance.

    you do something wrong.

    start a new fla.  Add follows her and the test.  any problem?

    var menuLoader:Loader;

    {if(menuLoader==null)}

    var menuRequest:URLRequest = new URLRequest ("menu.swf");
    menuLoader = new Loader();
    menuLoader.load (menuRequest);
    container.addChild (menuLoader);

    menuLoader.x = 700;
    menuLoader.y = 50;
    }

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

    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: 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: 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".

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

  • 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 object reference.      to tail/Chec

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

    to Tail / CheckCollision ([Tail::frame1:5])

    I have 2 movieclips, head and tail placed on stage (frame 1 and exported for ACE), head is the name of the instance of head, the tail has instances tail_1, tail_2, tail_3, tail_4 , I'm trying to detect collisions between these two. When head hits any instance of the queue class I want to delete tail_3 and tail_4 how this can be done?

    Code on frame 1 of tail MC

    function CheckCollision(evt:Event):void

    {

    If (Math.abs (MovieClip (root).head.x - x) < 20 & & Math.abs (MovieClip (root).head.y - y) < 20) / / 20 is the size of each and registration is at the centre

         {

    MovieClip (root) .collisionDetected = 1;

         }

    }

    addEventListener (Event.ENTER_FRAME, CheckCollision);

    Code on the MainTimeLine

    for (var m:uint = 3; m < = 4; m ++)

         {

    removeChild (getChildByName ("tail_" + m));

    tail_3 and tail_4 are dynamically added class tail by another function (which is not relevant here), tail_1 and tail_2 are on //stage

         }

    I get this message but SWF file works fine, there is no error either, and BTW if I don't know this message there will be a problem with performance, this message very much continue to pour into the output window (I guess that's normal since I ENTER_FRAME event)

    If you add these bodies without a name in one table, then you can loop through the array and use something like...

    for (var i: uint = 0; i

    {if (mcA.hitTestObject (mcBArray [i]))}

    No matter what

    }

    }

    You can probably also do the same at the breast of each mcB, just using the reverse, without looping...

    {if (this.hitTestObject (MovieClip (root) .mcA))}

    No matter what

    }

    You just need to be sure that you are targeting mcA (or BCP) correctly, which you can determine by drawing the target.

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

  • Interpolation Pages error - TypeError: Error #1009: cannot access a property or method of a null

    -Start new thread for this topic as suggested by the forum. ---

    I have a website, the pages of movieclip interpolations (named home, bio, music, video and contact). Love the effect and tried to keep it.  Main scenario contains the main buttons (home_btn, bio_btn, music btn, video_btn, contact_btn).  Music page has an XML mp3 player it with the button control.  Video page has a video encoded without code.

    I need the following:

    1 - music and video to be cut as the tween pages/movieclips offstage.  Gets boring with them playing mostly at the same time!

    2 - music player to play properly.  He's not with the new code.

    I have the following code.  The "Code in 'tween' is on frame 1 of the main timeline of the movie.  The 'MP3 code' is on frame 1 of the music clip. I get the error message after running my film.  I ran the debugger I publish and point it to music.my_channel.stop (); to the code below.  My thought process on this was that it reach out to music movieclip, find my_channel and stop him.  Also, my MP3 player does not work as a result of this new code.

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

    to MethodInfo - 665)

    to::EventDispatcher/dispatchEventFunction() flash.events

    to::EventDispatcher/dispatchEvent() flash.events

    to fl.transitions::Tween / set time() function

    to::Tween/nextFrame() fl.transitions

    to::Tween/onEnterFrame() fl.transitions

    TWEEN CODE (the main sequence control):

    must add to the tween and easing

    Import fl.transitions.Tween;

    Fl.transitions.easing import. *;

    Import fl.transitions.TweenEvent;

    Association of the buttons with clips

    home_btn. MC = Home;

    bio_btn. Bio = MC;

    music_btn. MC = Music;

    video_btn. MC = Video;

    contact_btn. MC = contact;

    var curMarkerXPos:Number = home.x;

    var duration: number = 1.3;

    function markerFollow (event: MouseEvent): void {}

    var markerTween:Tween = new Tween (marker, "x", Strong.easeOut, curMarkerXPos, event.target.x, duration, true);

    curMarkerXPos = event.target.x;

    }

    home_btn.addEventListener (MouseEvent.ROLL_OVER, markerFollow);

    bio_btn.addEventListener (MouseEvent.ROLL_OVER, markerFollow);

    music_btn.addEventListener (MouseEvent.ROLL_OVER, markerFollow);

    video_btn.addEventListener (MouseEvent.ROLL_OVER, markerFollow);

    contact_btn.addEventListener (MouseEvent.ROLL_OVER, markerFollow);

    Movie clip car1 position to start the movie

    Home.x = 0;

    Home.y = 0;

    control headphones and button events

    var currentMC:MovieClip = home;

    home_btn.addEventListener (MouseEvent.Click, f);

    bio_btn.addEventListener (MouseEvent.Click, f);

    music_btn.addEventListener (MouseEvent.Click, f);

    video_btn.addEventListener (MouseEvent.Click, f);

    contact_btn.addEventListener (MouseEvent.Click, f);

    you add this code to each button.  make the clip act as button on turnover

    home_btn.mouseChildren = false;

    home_btn.buttonMode = true;

    bio_btn.mouseChildren = false;

    bio_btn.buttonMode = true;

    music_btn.mouseChildren = false;

    music_btn.buttonMode = true;

    video_btn.mouseChildren = false;

    video_btn.buttonMode = true;

    contact_btn.mouseChildren = false;

    contact_btn.buttonMode = true;

    var tweenOut:Tween;

    var tweenIn:Tween;

    your function is defined.  said current MC drag as one slides in.

    function f(e:MouseEvent):void {}

    tweenOut = new Tween(currentMC,"x",Strong.easeOut,currentMC.x,stage.stageWidth,2,true);

    currentMC = e.currentTarget.mc;

    currentMC.x = - currentMC.width;

    tweenIn = new Tween(currentMC,"x",Strong.easeOut,currentMC.x,0,2,true);

    tweenOut.addEventListener (TweenEvent.MOTION_FINISH, stopF);

    function stopF(e:TweenEvent):void {}

    music.my_channel.stop ();  stop sound

    music.woofers.stop (); //stops woofers animation

    music.dial.stop (); //stops band dials animation

    }

    }

    MP3 PLAYER CODE (contained in frame 1 of the movieclip music):
    var my_songs:XMLList;
    var my_total:Number;
    var my_sound:Sound;
    var my_channel:SoundChannel;
    var current_song:Number = 0;
    var song_position:Number;
    var song_paused:Boolean;
    var myXMLLoader:URLLoader = new URLLoader();
    myXMLLoader.load (new URLRequest ("playlist.xml"));
    myXMLLoader.addEventListener (Event.COMPLETE, processXML);
    function processXML(e:Event):void {}
    var myXML:XML = new XML (e.target.data);
    my_songs = myXML.SONG;
    my_total = my_songs.length ();
    / / playSong (0);
    myXMLLoader.removeEventListener (Event.COMPLETE, processXML);
    myXMLLoader = null;
    }
    function playSong(mySong:Number):void {}
    myTitle var = my_songs[mySong].@TITLE;
    var myArtist = my_songs[mySong].@ARTIST;
    var myURL = my_songs[mySong].@URL;
    title_txt.text = myTitle.
    artist_txt.text = myArtist;
    if {(my_channel)
    my_channel.stop ();
    my_channel.removeEventListener (Event.SOUND_COMPLETE, onNext);
    }
    my_sound = new Sound();
    my_sound.load (new URLRequest (myURL));
    my_channel = my_sound.play ();
    my_channel.addEventListener (Event.SOUND_COMPLETE, onNext);
    }
    Dial.Stop (); Stops to compose the video clip on stage
    woofers. Stop(); Movie clip on stage stops woofers
    next_btn.addEventListener (MouseEvent.CLICK, goNext);
    function goNext(event:MouseEvent):void {}
    Dial.Play ();
    woofers.play ();
    }
    next_btn.addEventListener (MouseEvent.CLICK, onNext);
    function onNext(e:Event):void {}
    current_song ++;
    if (current_song > = my_total) {}
    current_song = 0;
    }
    playSong (current_song);
    }
    prev_btn.addEventListener (MouseEvent.CLICK, goPrev);
    function goPrev(event:MouseEvent):void {}
    Dial.Play ();
    woofers.play ();
    }
    prev_btn.addEventListener (MouseEvent.CLICK, onPrev);
    function onPrev(e:MouseEvent):void {}
    current_song -;
    if (current_song < 0) {}
    current_song = my_total-1;
    }
    playSong (current_song);
    }
    pause_btn.addEventListener (MouseEvent.CLICK, goPause);
    function goPause(event:MouseEvent):void {}
    Dial.Stop ();
    woofers.stop ();
    }
    pause_btn.addEventListener (MouseEvent.CLICK, onPause);
    function onPause(e:MouseEvent):void {}
    if {(my_channel)
    song_position = my_channel.position;
    my_channel.stop ();
    song_paused = true;
    }
    }
    play_btn.addEventListener (MouseEvent.CLICK, goBack);
    function goBack(event:MouseEvent):void {}
    Dial.Play ();
    woofers.play ();
    }
    play_btn.addEventListener (MouseEvent.CLICK, onPlay);
    function onPlay(e:MouseEvent):void {}
    if {(song_paused)
    my_channel = my_sound.play (song_position);
    song_paused = false;
    { } else if (! my_channel) {}
    playSong (current_song);
    }
    }

    If these animations stops, try:

    tweenOut.addEventListener (TweenEvent.MOTION_FINISH, stopF);

    function stopF(e:TweenEvent):void {}

    {if(Music.my_channel!=null)}

    Music.my_channel. Stop();  stop sound

    }

    Music.woofers.Stop (); stop animation woofers

    Music.Dial.Stop (); bunch of dials animation stops

    }

    }

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

Maybe you are looking for

  • 6730 b: BIOS password

    Hello I'm comfronting a problem with my laptop. For an object of the school, I need to install it on windows server 2008 and 2012. But my laptop is a 32-bit operating system and Server 2008 and 2012 are no longer compatible with the 64-bit operating

  • Z230: How to turn on hardware virtualization on HP Z230

    The Hyper-V platform will not install because I have to first enable hardware virtualization. I've done it before on multiple computers. But on the new Z230 HP I just unpacked it, I can't find the setting in the BIOS. BIOS version v01.42 L51 ME Versi

  • What is the new application

    How to recover the shortcuts which is the new app button "home" to scroll upward after the new update of it

  • Windows Vista Home Premium SP2 - firewall Windows has stopped working

    I get an error in recent days with the firewall stopping & it seems to be related to the MPSSVC does not properly Does anyone know of a related problem & workaround? I tried to restart it & tried the fix (which is not actually work, incidentally) Is

  • SIP URI B2B calls via CUCM and Highway

    Hi all Cannot find out how to configure the SIP URI from SX codecs, recorded calls on CUCM. I CUCM and IM & P 10.5.1 a pair of X8.5.2 expressway with two areas of course - for B2B calls, and the external jabber. I want to make calls of SX-codecs outs