Several events error #1009 w / 2 TLF/TLFTextField in CS5.5

I am currently working on a Flash application that previously used plain old TextFields and has now been adapted to use TLFTextFields instead.

While I am generally quite satisfied to some improvements in the TLF 2 (lists!), it still seems a lot than expected bug from Adobe.

For example, textHeight still does not seem to update immediately after the htmlText, scrollV absurd values sometimes returned in scrolling, setting when re-defining htmlText some formatting (color, font), previous stays in value around etc. In short, even the new TLFTextField version seems much less robust than TextField (which probably shouldn't be a surprise, given the complexity of the thing).

While embarrassing, for most of these questions, I was able to find alternatives. Now, however, we see rather mysterious pointer null questions arise.

Perhaps these errors ring a Bell with you; I'm sorry that I can't provide more details yet (I get these reports of testers in the field).

A question: is there a 100% reliable way to reset a TLFTextField, so that no internal inconsistency has every chance to stay around?

---

When querying numlinesrequired:

TypeError: Error #1009: Der Zugriff auf eine oder eine method eines null-Objektverweises ist nicht possible attribute.
to flashx.textLayout.compose::BaseCompose/advanceToComposeStartPosition() [C:\Vellum\branches \v2\2.0\dev\output\openSource\textLayout\src\flashx\textLayout\compose\BaseCompose.as:485]
to flashx.textLayout.compose::BaseCompose/composeTextFlow() [C:\Vellum\branches\v2\2.0\dev\ou tput\openSource\textLayout\src\flashx\textLayout\compose\BaseCompose.as:431]
to flashx.textLayout.compose::ComposeState/composeTextFlow() [C:\Vellum\branches\v2\2.0\dev\o utput\openSource\textLayout\src\flashx\textLayout\compose\ComposeState.as:106]
at flashx.textLayout.compose::StandardFlowComposer/ http://ns.Adobe.com/TextLayout/internal/2008:callTheComposer ([C:\Vellum\branches\v2\2.0\ dev\output\openSource\textLayout\src\flashx\textLayout\compose\StandardFlowComposer.as:676])
to flashx.textLayout.compose::StandardFlowComposer/internalCompose() [C:\Vellum\branches\v2\2.0\dev\output\openSource\textLayout\src\flashx\textLayout\compose\StandardFlowComposer.as: 760]
to flashx.textLayout.compose::StandardFlowComposer/composeToPosition() [C:\Vellum\branches\v2 \2.0\dev\output\openSource\textLayout\src\flashx\textLayout\compose\StandardFlowComposer.a s:837]
at flashx.textLayout.container::TextContainerManager/ (http://ns.adobe.com/textLayout/internal/2008::getActualNumLines) [C:\Vellum\branches\v2\2. 0\dev\output\openSource\textLayout\src\flashx\textLayout\container\TextContainerManager.as: 1192] )
to SingleTextContainerManager/get numLines() [/Volumes/BuildDrive/stage/Flash11.5_Main_325_Stage/main/authortool/Stage/tlfRu ntime/fl/text/SingleTextContainerManager.as:183]
to fl.text::TLFTextField / get numLines() [/Volumes/BuildDrive/stage/Flash11.5_Main_325_Stage/main/authortool/Stage/tlfRu ntime/fl/text/TLFTextField.as:3323]
at kp.ui.controls::TextScrollBar/get visibleLines() [/ users/chris/r/2010/09/kp-interview-2010-11/flash-5/kp/ui/controls/text crollBar.as:119]

---

When you set htmlText:

ypeError: Error #1009: Der Zugriff auf eine oder eine method eines null-Objektverweises ist nicht possible attribute.

to flashx.textLayout.compose::FlowComposerBase/addLine() [C:\Vellum\branches\v2\2.0\dev\outpu t\openSource\textLayout\src\flashx\textLayout\compose\FlowComposerBase.as:463]

to flashx.textLayout.compose::ComposeState/endLine() [C:\Vellum\branches\v2\2.0\dev\output\op enSource\textLayout\src\flashx\textLayout\compose\ComposeState.as:305]

at::BaseCompose/composeParagraphElementIntoLines() [C:\Vellum\branc hes\v2\2.0\dev\output\openSource\textLayout\src\flashx\textLayout\compose\BaseCompose.as:9 01] flashx.textLayout.compose

to flashx.textLayout.compose::BaseCompose/composeParagraphElement() [C:\Vellum\branches\v2\2. 0\dev\output\openSource\textLayout\src\flashx\textLayout\compose\BaseCompose.as:688]

at::ComposeState/composeParagraphElement() [C:\Vellum\branches\v2\2.0\dev\output\openSource\textLayout\src\flashx\textLayout\compose\ComposeState.as:316] flashx.textLayout.compose

to flashx.textLayout.compose::BaseCompose/composeBlockElement() [C:\Vellum\branches\v2\2.0\de v\output\openSource\textLayout\src\flashx\textLayout\compose\BaseCompose.as:358]

to flashx.textLayout.compose::BaseCompose/composeInternal() [C:\Vellum\branches\v2\2.0\dev\ou tput\openSource\textLayout\src\flashx\textLayout\compose\BaseCompose.as:673]

to flashx.textLayout.compose::ComposeState/composeInternal() [C:\Vellum\branches\v2\2.0\dev\o utput\openSource\textLayout\src\flashx\textLayout\compose\ComposeState.as:143]

to flashx.textLayout.compose::BaseCompose/composeTextFlow() [C:\Vellum\branches\v2\2.0\dev\ou tput\openSource\textLayout\src\flashx\textLayout\compose\BaseCompose.as:458]

to flashx.textLayout.compose::ComposeState/composeTextFlow() [C:\Vellum\branches\v2\2.0\dev\o utput\openSource\textLayout\src\flashx\textLayout\compose\ComposeState.as:106]

at flashx.textLayout.compose::StandardFlowComposer/ http://ns.Adobe.com/TextLayout/internal/2008:callTheComposer ([C:\Vellum\branches\v2\2.0\ dev\output\openSource\textLayout\src\flashx\textLayout\compose\StandardFlowComposer.as:676])

to flashx.textLayout.compose::StandardFlowComposer/internalCompose() [C:\Vellum\branches\v2\2.0\dev\output\openSource\textLayout\src\flashx\textLayout\compose\StandardFlowComposer.as: 760]

to flashx.textLayout.compose::StandardFlowComposer/composeToPosition() [C:\Vellum\branches\v2 \2.0\dev\output\openSource\textLayout\src\flashx\textLayout\compose\StandardFlowComposer.a s:837]

at flashx.textLayout.container::TextContainerManager/ (http://ns.adobe.com/textLayout/internal/2008::getActualNumLines) [C:\Vellum\branches\v2\2. 0\dev\output\openSource\textLayout\src\flashx\textLayout\container\TextContainerManager.as: 1192] )

to SingleTextContainerManager/get numLines() [/Volumes/BuildDrive/stage/Flash11.5_Main_325_Stage/main/authortool/Stage/tlfRu ntime/fl/text/SingleTextContainerManager.as:183]

to fl.text::TLFTextField / get maxScrollV() [/Volumes/BuildDrive/stage/Flash11.5_Main_325_Stage/main/authortool/Stage/tlf Runtime/fl/text/TLFTextField.as:3135]

to fl.text::TLFTextField / set scrollV() [/Volumes/BuildDrive/stage/Flash11.5_Main_325_Stage/main/authortool/Stage/tlfRun time/fl/text/TLFTextField.as:3723]

to fl.text::TLFTextField / () http://ns.adobe.com/textLayout/internal/2008:doImport [/ Volumes/BuildDrive/stade/Flash11.5_Main_325_Stage/main/authortool/Stage/tlfRuntime/fl/text/TLFTextField.as:1365]

to fl.text::TLFTextField / set htmlText() [/Volumes/BuildDrive/stage/Flash11.5_Main_325_Stage/main/authortool/Stage/tlfRu ntime/fl/text/TLFTextField.as:2705]

to kp.ui.windows::BubbleWindow/set text() [s /Users/chris/r/2010/09/kp-maintenance-2010-11/flash-5/kp/ui/windows/BubbleWindow.a: 84]

I would say that Yes. The codes listed on the blog are required for this scenario.

The example in the link I gave you last time can be another example, if you do not need the resize operation as shown in the example of the blog.

TLF is designed to manage complex text layout. Please make sure that it works for almost every customer scenario and manage hundreds of properties of text. We can do it try to get one or two more properties in a specific scenario (i.e. static text TextWidth) but will make the framkework more complex and less flexible (i.e. TextWidth of danamic text cannot be obtained in this way because it can be changed at any time). I think that most Rich Text editor faces the same problem. Personally, I think that the TLF is a nice solution.

Whether, we very much appreciate your advice. We will consider your advice in the future.

Tags: Adobe Open Source

Similar Questions

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

  • Local calling XML gives Error #1009: cannot access a null object

    Kind of perplexed as to what is happening...

    Calling a function "loadDownloads" which prepares to load a local file "downloads.xml" (located in the CBC even as the application mxml file); This XML file is very simple, containing a root 'downloads' with several 'download' elements it contains (each is a brief description and the url)

    I put my compiler settings for - use-network = 'false' to be able to load local XML file, and I use a HTTPService.send () to raise the load.  My HTTPService is defined as follows:

    <mx: HTTPService id="httpService" resultFormat="e4x" 
     fault="httpService_fault(event)" result="httpService_result(event)" />
    

    I put the default event handler until, in case of default, an alert indicates the error information; the result handler simply does the following:

    private function httpService_result(evt:ResultEvent):void {
         xmlContent = XML(evt.result);}
    

    Yes, all variables have been previously declared and typed.  This throws any errors (he did at the beginning, when I was incorrect for the URL file names and when I had the malformed XML instructions, so I know that Manager error works) to access the XML file

    However, when I try to access the nodes or elements in the XML document, I get this runtime Error #1009: cannot access method or property object, null, and of course, xmlContent shows as null.  Here's how I'm trying to access:

    for each (xmlDownload in xmlContent.downloads) {
         // do stuff here like...
         linkLabel.text = [email protected]();
    }
    

    All all all ideas why HTTPService is to see the XML file and says it's OK, but does not seem to extract the XML file in the xmlContent:XML object?

    Three service objects would be better.

    Also remember that you can not call a fair request after the other because you can have only active requires both.

    You must call each new request out of the resultHandler of demand of ends.

  • TypeError: Error #1009: question

    I placed a TabNavigator with 2 tabs, labeled hand, line1.
    On the homepage, I have several boxes of TextInput, I also TextInput boxes on the Line1 page as well.

    I have a created a public function called "public void Line1Refresh (): void. In here, everything I do is initialize the TextInput boxes with values by default until it can connect to my server and get the actual data.
    That is L1.text = "Please wait";

    In line 1 settings, I added the 'Line1RefreshI() '; call for the option to create full so that when the page is rendered, it will call this function and fill in the empty fields.
    I have the same thing for the home page as well during the initialization of the TextInputs on this page as well.

    Ok... Now for the problem...

    When the home page is visited over and called MainRefresh(); I initialize the TextInputs there in it without any problem.

    Everything worked fine until I tried also initialize the TextInput fields in the line 1 page.
    When I did that I got a:

    TypeError: Error #1009: cannot access a property or method of a null object reference.
    index / ParseReceivedData ([G:\Flex3\Index\src\Index.mxml:412])
    index / our () [G:\Flex3\Index\src\Index.mxml:170]

    Anyone know what is the problem here, why I can't access the items on a different page?


    Objects in Flex are not created until they are needed. Objects in your second tab are not yet created.

    You can set creationPolicy = "all" in your subject, definition and make all the objects to be created when the parent object is created.

    You can also use the event listener "change" of the object of the tab to initialize objects on the tab pages. This technique requires verification for the tab pages which is now a code specific page tab visible and enforcement. However, this technique allows for the page to display to the user faster.

    If there are very few items on the page, then either the creationPolicy and change event listener would be good to use.

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

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

    Any help would be appreciated.

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

    import flash.events.MouseEvent;

    Stop();

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

    gohome function (event: MouseEvent): void {}

    gotoAndStop (1);

    }

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

    function goabout (event: MouseEvent): void {}

    gotoAndStop (2);

    }

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

    goservices function (event: MouseEvent): void {}

    gotoAndStop (3);

    }

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

    function gocontact (event: MouseEvent): void {}

    gotoAndStop (4);

    }

    Ran the test after allowing debugging and myself

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

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

    Chassis 1 line 3.

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

    -is declared but not instantiated

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

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

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

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

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

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

    Error:

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

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

    at flash.display::MovieClip/gotoAndStop()

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

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

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

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

    I get no error for them.

    And frame1:13?

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

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

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

  • Error #1009 when loading SWF with Document class

    Hello

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

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

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

    sector: RaceMain()

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

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

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

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

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

    sector: RaceMain()

    Cannot view the source code at this location


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


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


    var loader: Loader = new Loader();

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

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

    function openSWF(e:Event) {}

    addChild (loader)

    }

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

    the packet network {}

    import flash.display.MovieClip;

    //... More import clausses

    SerializableAttribute public class RaceMain extends MovieClip {}

    public void RaceMain() {}

    if(stage==null)

    this.addEventListener (Event.ADDED_TO_STAGE, main);

    on the other

    hand (null);

    }

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

    start the game

    }

    }

    }


    Thank you.

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

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

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

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

    at TheMathsRooms_fla::MainTimeline/ObjectFound()

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

    function objectFound

    function ObjectFound(event:MouseEvent):void {}

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

    var room1_inventoryItem:DisplayObject = getChildByName (room1_inventoryName);

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

    founditems ++;

    Event.Target.alpha = 0

    }

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

    room1_inventoryone_mc.Alpha = 0

    room1_inventorytwo_mc.Alpha = 0

    room1_inventorythree_mc.Alpha = 0

    room1_inventoryfour_mc.Alpha = 0

    room1_inventoryfive_mc.Alpha = 0

    room1_inventorysix_mc.Alpha = 0

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

    var founditems:Number = 0;

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

    room1_hiddenone_mc.addEventListener (MouseEvent.MOUSE_DOWN, ObjectFound);

    room1_hiddentwo_mc.addEventListener (MouseEvent.MOUSE_DOWN, ObjectFound);

    room1_hiddenthree_mc.addEventListener (MouseEvent.MOUSE_DOWN, ObjectFound);

    room1_hiddenfour_mc.addEventListener (MouseEvent.MOUSE_DOWN, ObjectFound);

    room1_hiddenfive_mc.addEventListener (MouseEvent.MOUSE_DOWN, ObjectFound);

    room1_hiddensix_mc.addEventListener (MouseEvent.MOUSE_DOWN, ObjectFound);

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

    function StartDragging (e:MouseEvent) {}

    e.currentTarget.startDrag ();

    }

    function StopDragging (e:MouseEvent) {}

    e.currentTarget.stopDrag ();

    }

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

    Bluechair.buttonMode = true;

    Bluechair.addEventListener (MouseEvent.MOUSE_DOWN, StartDragging);

    Bluechair.addEventListener (MouseEvent.MOUSE_UP, StopDragging);

    Pencilcase.buttonMode = true;

    Pencilcase.addEventListener (MouseEvent.MOUSE_DOWN, StartDragging);

    Pencilcase.addEventListener (MouseEvent.MOUSE_UP, StopDragging);

    Painting.buttonMode = true;

    Painting.addEventListener (MouseEvent.MOUSE_DOWN, StartDragging);

    Painting.addEventListener (MouseEvent.MOUSE_UP, StopDragging);

    Rubbish.buttonMode = true;

    Rubbish.addEventListener (MouseEvent.MOUSE_DOWN, StartDragging);

    Rubbish.addEventListener (MouseEvent.MOUSE_UP, StopDragging);

    Painting2.buttonMode = true;

    Painting2.addEventListener (MouseEvent.MOUSE_DOWN, StartDragging);

    Painting2.addEventListener (MouseEvent.MOUSE_UP, StopDragging);

    Trunk.buttonMode = true;

    Trunk.addEventListener (MouseEvent.MOUSE_DOWN, StartDragging);

    Trunk.addEventListener (MouseEvent.MOUSE_UP, StopDragging);

    Pillow.buttonMode = true;

    Pillow.addEventListener (MouseEvent.MOUSE_DOWN, StartDragging);

    Pillow.addEventListener (MouseEvent.MOUSE_UP, StopDragging);

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

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

    function ObjectFound(event:MouseEvent):void {}

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

    trace (room1_inventoryName);

  • Error 1009 for SetIntervalTimer / onTimer)

    Please any professional knowledge... I have this code

    var timeout:Number = setTimeout(DAndM(Cover1, Text1, Box1), 7000);
    
    function DAndM(Cover:MovieClip, Text:TLFTextField, Box:MovieClip)
    {
         Cover.x = 0;
         Text.x = 0;
         Box. x = 0;
    }
    

    And to know Cover1 Box1 is a movieclip in resource and Text1 is a TLFTextField

    My error is therefore

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

    to SetIntervalTimer / onTimer)

    at flash.utils::Timer/_timerDispatch()

    to::Timer/tick() flash utils

    Thank you for helping me

    Try:

    1. var Timeout = setTimeout (DAndM, 7000, Cover1, Text1, Box1);
  • Error #1009: What eventlistener is other than frame 1

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


    Stop();

    l2v2_btn.addEventListener (MouseEvent.CLICK, l2v2);

    function l2v2(event:MouseEvent):void

    {

    gotoAndStop (2);

    }

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

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

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

    to * _fla::MainTimeline/frame2()

    at flash.display::MovieClip/gotoAndStop()

    to * _fla::MainTimeline/l2v2()

    actions on frame 1 are above

    code on frame 2 ate here:


    var nd: and = new And();

    var big: big = new Big().

    class var = 'none ';

    and_btn.addEventListener (MouseEvent.CLICK, fAnd);

    big_btn.addEventListener (MouseEvent.CLICK, fBig);

    function fBig(event:MouseEvent):void

    {

    If (current == "none")

    {

    addChild (nd);

    current = nd.name;

    }

    ElseIf (current! = "none")

    {

    removeChild (getChildByName (current));

    addChild (nd);

    ND.x = 818;

    ND.y = 438;

    current = nd.name;

    }

    }

    function fAnd(event:MouseEvent):void

    {

    If (current == "none")

    {

    addChild (big);

    current = big.name;

    }

    ElseIf (current! = "none")

    {

    removeChild (getChildByName (current));

    addChild (big);

    current = big.name;

    }

    }

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

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


    In fact, it seemed to solve my problem:

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

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

    function onEnterFrame(e:Event):void

    {

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

    {

    and_btn.addEventListener (MouseEvent.CLICK, fAnd);

    big_btn.addEventListener (MouseEvent.CLICK, fBig);

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

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

    }

    }

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

  • Geolocation product Disable Error #1009: cannot access a property or method...

    Hello

    I am trying to disable the detector in geolocation leaving a framework.

    I added a REMOVED_FROM_STAGE event that works, but does not disable the Geo on election in frames later.

    When I add a "null;", as shown below, I get the error #1009.

    No idea why this is happening?

    Thank you

    __________________________________

    Stop();

    import flash.display.MovieClip;

    import flash.sensors.Geolocation;

    import flash.events.GeolocationEvent;

    import flash.events.StatusEvent;

    import flash.events.MouseEvent;

    import flash.net.URLRequest;

    import flash.events.Event;

    import flash.events.IOErrorEvent;

    import flash.errors.IOError;

    import flash.display.Loader;

    var geo:Geolocation;

    var loader: Loader;

    Camera1.addEventListener (Event.REMOVED_FROM_STAGE, removedF);

    function removedF(e:Event):void {}

    geo.removeEventListener (GeolocationEvent.UPDATE, updateHandler);

    geo.removeEventListener (GeolocationEvent.UPDATE, geolocationStatus);

    GEO = null;

    removeEventListener (Event.ENTER_FRAME, fl_EnterFrameHandler);

    removeEventListener (Event.ENTER_FRAME, geostart);

    removeEventListener (Event.REMOVED_FROM_STAGE, removedF);

    }

    addEventListener (Event.ENTER_FRAME, fl_EnterFrameHandler);

    function fl_EnterFrameHandler(event:Event):void

    {

    If (Geolocation.isSupported)

    {

    GEO = new Geolocation();

    geo.addEventListener (StatusEvent.STATUS, geolocationStatus);

    }

    on the other

    {

    }

    }

    addEventListener (Event.ENTER_FRAME, geostart);

    function geostart(event:Event):void

    {

    geo.addEventListener (GeolocationEvent.UPDATE, updateHandler);

    }

    function geolocationStatus (e: StatusEvent): void

    {

    If (e.code is 'Geolocation.Unmuted')

    {

    loadMap();

    }

    on the other

    {

    }

    }

    function updateHandler(event:GeolocationEvent):void

    {

    loadMap (event.latitude.toString (), event.longitude.toString ());

    geo.removeEventListener (GeolocationEvent.UPDATE, updateHandler);

    }

    function loadMap(lat:String=null,_long:String=null):void

    {

    var locString:String;

    var markers: String;

    If (lat! = null)

    {

    If (Number (lat) > 39.13 & & Number (lat) < 39.19 & & Number (long) >-86.59 & & Number (long) <-86.55) {}

    gotoAndStop (21);

    }

    else {}

    gotoAndStop (20);

    }

    } else {}

    gotoAndStop (20);

    }

    }

    Thank you, Ned.

    This has helped, and I think that I thought about it.

    Before I moved the following listener:
    geo.removeEventListener (GeolocationEvent.UPDATE, geolocationStatus);

    But the event should have been as follows:

    geo.removeEventListener (StatusEvent.STATUS, geolocationStatus);

    DOH!

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

  • Error 1009: Very simple Animation... it can not know!

    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 there is no such thing as "d_placebtn" on the framework, on you, or on the frame marked 'dfingers', you may encounter the error you see.  'D_placebtn' can not be embedded in another clip.

  • Need help with Error #1009

    Hello, I am working on a Flash game where you navigate in different rooms. Each room is located in a frame on the main timeline. I get an error message #1009 when I navigate to certain parts, but each image almost the same code, so I don't know why some executives encounter this problem while others are very well. When the error message that I am always directed to the 'room' I clicked on, but all the buttons in this room disappear and you are then stuck there and having to restart the project. I looked through other forums where people had this error message similar but I could not find a solution that could help me, so I apologize for the display of such a common problem! Here is a screenshot of the error message I get, which says:

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

    at project1_fla::MainTimeline/frame4() [project1_fla. MainTimeline::frame4:43]

    at flash.display::MovieClip/gotoAndStop()

    at project1_fla::MainTimeline/enterElevator3() [project1_fla. MainTimeline::frame12:25]

    errormessage.png

    Here are links to the screenshots of the debugging session where it points to the lines of code that contains the error and also screenshots of my code in these pictures:

    Frame error 4 part 1

    Frame error 4 part 2

    Frame error 12 part 1

    Frame error 12 part 2

    Code for chassis 4 part 1

    Code for chassis 4 part 2

    Code 4 room 3

    Code for chassis 4 part 4

    Code for frame 12 part 1

    Code for frame 12 part 2

    Frame 4 is labeled as 'elevator' and armature 12 is "medEntrance". I know that the problem is to jump from an image to the image, but I honestly have no idea what would be the error. I double checked all my code and it must be correct, and what makes it even more confusing, is that some rooms work perfectly while others have this problem and they all use the exact code, but with different names of MC! :/ Something I noticed is that the rooms which are most often linked to (for example that the lift can bind to three different "floors" or frames) are those who encounter this problem. But I chose this pair in particular because it contains the least amount of code I do not understand why have several frames, a link to a picture in particular would be a problem, but it's my first time using Flash and AS3 so I don't know any with its limits.

    Sorry for the overload of code and messy information! I thought it's better to provide too much information than too little and thanks for your help, it is much appreciated!

    rather than distributing your rooms in different key frames,

    Move them to separate the layers

    and use only the first image of each layer

    then do what amy suggested and is wirtie a document class that will have all your key code in

    or put all your code on the first frame of the first layer (separate layers where you have your rooms on)

    So, it becomes available for all your parts.

    To hide rooms you don't currently need put all the parts inside a table:

    var rooms: Array = [room1 room2... room100];

    then write a function

    function showRoom(_index:int):void {}

    for (var i: int = 0; i<>

    {if(i==_index)}

    rooms [i] .visible = true;

    }

    else {}

    rooms [i] .visible = false;

    }

    }

    }

    for example, when you move to the next room call sth. as

    showRoom (4);

    This will hide all parts in addition to the 5th

Maybe you are looking for

  • How can I empty trash?

    I can't find any option that allows me to empty the trash. Can you help me?

  • Identify and purge the duplicate files

    I'm running out of storage space. When I look at My Documents & Settings it seems that there is a lot of duplicates and files. Is there a process to identify duplicate files and purge them in Window XP?

  • computer laptop m7 envy touchsmart: beat audio

    IM extremely unhappy with the removal of the audio beats laptop is nowhere as strong as it was before the update of the anniversary that has deleted the audio beats now why would u delete something that makes the best sigh system, I hope that you sen

  • How can I change the direction of my laptop screen?

    I dropped my laptop and now my screen is upside down. How can I rotate back? Thank you. Very embarrassed!

  • Application module tries to access the secure API

    Hi all. We are new to Blackberry Java development and have some problems with it. We use the same BlackBerry Bold 9000 and OS worm Simulator. 5.0 in Eclipse JDE. The JDE version is 5.0.0 We signed HelloWorldDemo with tool of power, provided by BB. It