1009 error for reference of object null-how fix/workaround solution?

Hello

There, with the help on the forum, worked on a script (AS3) for a tween animation show breathing in and out for a year of e-learning courses. There are buttons to pause and cancel the pause/resume the animation.

These functions of pause and cancel the pause/repeat up a 1009 error if you click on the button break for time interpolation is the evolution of the expansion to the contractors. Thus, most of the time, no error. But every so often, if you click on the turn, the 1009 error when debugging.

The error points to the line: _paused == null? pauseAnimation():unpauseAnimation(); as part of one of the functions pause. And the error points also to a conditional in a second pause feature which is probably the beginning of the attempt to run the script in him: if (_tX.isPlaying) {}

I tried different ways to change the script but cannot prevent the error. Any help would be appreciated.

I've included the complete pause below feature script:

// pause/unpause
function pauseButtonClick2(e:MouseEvent):void {
    _paused == null ? pauseAnimation():unpauseAnimation(); error 1009
} 
// pause
function pauseAnimation():void { 
    // if Tween _tX is running
    if (_inhale) { //error 1009
        // stop the Tween        
        _tX.stop();
        _soundChannel.stop(); //soundChannel playing inhale sound mp3
         _exitButton.visible = false
        indexBtn2.visible = false;
        // record what is paused
        _paused = "tween";

    } if (!_inhale) {        
        _tX.stop();
        _soundChannel.stop(); //soundChannel playing exhale sound mp3
        _exitButton.visible = false
        indexBtn2.visible = false; 
        // record what is paused
        _paused = "tween2";        
    }
        else{
        // timer is running
        // stop the timer
        _timer.stop();
        exitButton.visible = false
        indexBtn2.visible = false;

        // record what is stopped
        _paused = "timer";
    }
    _pauseButton2.visible = false
    _exitButton.visible = true;
    _exitButton.alpha = .5;
    indexBtn2.visible = true;
    //indexBtn2.alpha = .5;
    _resumeButton2.visible = true;
    //_resumeButton2.alpha = .5;
}

// unpause
function unpauseAnimation():void {

    // unpause accordingly
    switch (_paused) {
        case "tween" :
            _tX.resume();
            _soundChannel = _inhaleSound.play()
            break;
        case "tween2" :
            _tX.resume();
            _soundChannel = _exhaleSound.play()
            break;
        case "timer" :
            _timer.start();
            break;
    }

    // reset what was paused
    _paused = null;
    _pauseButton2.visible = true;
    //_pauseButton2.alpha = .5;
    _exitButton.visible = false;
    indexBtn2.visible = false;
    _resumeButton2.visible = false;
}

Error 1009:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at FLNav9exp_fla::MainTimeline/pauseAnimation()[FLNav9exp_fla.MainTimeline::frame6:305]
    at FLNav9exp_fla::MainTimeline/pauseButtonClick2()[FLNav9exp_fla.MainTimeline::frame6:300]

It makes more sense.

Replace your if statement (_inhale) with:

if (_inhale&&_tX) {

p.s. Please check the useful/correct.

Tags: Adobe Animate

Similar Questions

  • Unidentified for reference ActiveX object

    There are objects in the examples following that I can't identify (the program was written by someone else).

    There are labeled WINX32Lib.IExpSetup and pFile on the block diagram. There's obviously static ActiveX references, but the contextual help of Labview said "no description available".
    What do these, and how to create them in the palette of functions?

    calvintiger wrote:

    They were in fact part of the Winview (used for scientific CCD cameras).

    Do you know how to create these items on the block diagram?

    I admitted little knowledge or not and you think I can help it Fund?

    I'll take the complement and offer what I can in Exchange.

    Start by droping a container ActiveX on the FP.

    Right click and find an option to navigate (or something like that).

    There may be an option to "Create from the document" available for ActiveX stuff.

    In the case of navigation find something that looks like what you want (with the help files you will have to explore).

    After choosing the AX thingy, go to the BD and start adding nodes of property or invoke nodes and see what you find.

    I don't know if this will help. That's what I would do if I found myself trying to create code using undocumented stuff AX.

    It would be interesting to link to serach for help on the web for the AX.

    You COULD also just drag the code that you have demonstrated a new schema and there is.

    Made with the specualtion!

    Have fun!

    Ben

  • Hello. I do not understand what that error for Adobe Illustrator and Adobe Muse creative cloud products: I open the app and they are closed today. In the writing of Muse: app error #1009 in Illustrator just closed.

    Hello. I do not understand what that error for Adobe Illustrator and Adobe Muse creative cloud products: I open the app and they are closed today. In the writing of Muse: app error #1009 in Illustrator just closed.

    Please check:

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

    Adobe Flash Player Error #1009 Windows 8.1

    TypeError: Error #1009

    Flash Player ' TypeError: Error #1009: cannot access one - Microsoft Community

    It seems to be an error in the Flash Player rather than illustrator.

    Concerning

    Stéphane

  • Error: Unable to get the 'platform' of undefined reference property or null

    I am updating a Web site on a computer that had Dreamweaver Cs4 installed as a transfer file from another computer. I get an error (unable to get the 'platform' of undefined reference property or null). The current computer has Windows7. How to upgrade to the operation of the platform within the program? What is the problem?

    What are you trying to do exactly?

    Files created in DW are not specific platform (they are just .html, .css, .js, etc.), but the program itself is when it's one of the older versions of perpetual license / disc.

    Adobe does not swap the platform for something else that current versions, however the current version (PCOC 2014) is not really specific platform more since you can have it installed on two machines, regardless of the platform. So, basically, ranking/cross-platform interchange is not permitted more.

    Product order | Platform, language Exchange

  • object on a simple object null reference

    Turn it on some of the projects currently working on.

    So I have this


    main.conductor.gotoAndStop (4);

    get the "#1009: cannot access a property or method of an object. null reference" error.

    Its scope, I think. the same framework and not at course time am damned a subject are right.

    frustrating it is like script101 of the action and can't make it work.

    Click the object on the stage that you think is key (to select).  take a screenshot showing the chronology, the object on stage and the properties panel.  Attach the screen shot here.

  • I have to do, if this error message appears: "JavaScript exception: error calling function selector: [object Error]? It seems that by Internet Explorer. Thank you very much for your reply and I hope you can help me.

    I have to do, if this error message appears: "JavaScript exception: error calling function selector: [object Error]? It seems that by Internet Explorer. Thank you very much for your reply and I hope you can help me.

    Hi Brad,

    Here is the link: http://projektw.primo-werbung.de/

    We have this problem only by Internet Explorer. Mozilla, Safari and Opera - there is all right.

  • Edge Animate error: cannot get goods 'set' reference undefined or null

    I don't know why I'm getting an error 'could not get property "set" of reference undefined or null' when I insert into my edge Animations through Javascript in containers on my page.


    The error is emitted by version CDN (minimized) runtime at the following address: line: 97, column: 245 Any idea why this would be greatly appreciated! Thank you.

    It seems that this question was because I included the "xxxx_ege.js" file in the head. Who shot, first of all, even before I needed to load in the composition, because he wasn't in sight yet. So I just removed those file and it took these issues.

  • How to add the chapter name and page not for reference

    Hello

    How to add the chapter name and page not for reference in indesign CS6.

    Thank you

    Please try variable notion of text

  • How ot call dynamic test for a button object

    I have a button on the stage as a button instance name of hava.

    Inside the button objectd, IN the second layer of my button, I added a dynamic test with instance name dynamictest.

    When I add the code to my first image in the time line of main stage, the program cannot identfiy dynamic text with instance name dynamictext.

    I say button.dynamictext. How can I solve it.

    If you use a simplebutton control, there is no practical way to reference child objects.  to remedy this, use a movieclip button.

  • Reference the object expected found execution

    I have a .NET DLL that has a method that takes a parameter of reference an object of type NationalInstruments.TestStand.Interop.API.Execution. In TestStand 4.2.1 it worked well if I spent it RunState.Execution.

    Now in 2010 TestStand I get an error in TestStand that the method expects an object reference, but found a writ of execution. A performance, that's what I want is what describes the method. Then, why this doesn't work?

    Anyone have any ideas?

    Thank you.

    Skeptical salvation,

    It is a known backwards compatibility problem introduced in 2010 TestStand and will be fixed in a later version.

    That said, is not really meaningful for the parameter as byref (i.e. input/output) in this case, execution is already a type of reference data interface. Thus, passing byref implies that the method has the possibility of replacing the object that points to RunState.Execution with another object of execution that very probably is not something of the method would make ever.

    To work around this problem, you can do the following:

    (1) changing the prototype of the method (or add a new overload) to take the run by value setting (i.e. only), which is probably what that the author of the code really the intention anyway.

    Or

    (2) create a local variable of type object reference and assign RunState.Execution before your call to the method, and then pass the local variable for the byref parameter.

    Please let us know if you have any questions or if workarounds are not enough for you.

    Hope this helps,

    -Doug

  • Error for KB974674 "update is not applicable to your computer"

    Actual title: KB974674 installation problems

    I tried to install KB974674 on my new HP laptop under Windows 7 Home Premium to allow me to back up data from my old XP PC but got the message that the update is not applicable to your computer. Unlike others with this problem, the data are English to English. No reason for the message and how I can make my backup?

    Hello

    -What is the exact error that you receive when trying to install updates?
    -You are aware of any changes made on the computer before this problem?
     
    Method 1: I suggest trying to install the patch and also to try the steps mentioned in step 2 in the " WORKAROUND " section from the link mentioned below to check if the number perissts.
    Restore description of the backup of Windows NT to Windows 7 and Windows Server 2008 R2
     
    Method 2: Clean Boot Mode
    I suggest to keep the computer in clean boot mode and try to install the updates then check if the problem persists.
    A clean boot to check if startup item or services to third-party application is causing this issue.
    You can read the following article to configure the computer to boot:
    http://support.Microsoft.com/kb/929135
    Note: After the troubleshooting steps, see the link to start to set up the computer in normal clean startup mode.
     
    For reference:
    Problems with installing updates
     
    Hope this information helps.
  • Get #1009 error - Impossible to find my mistake

    Hello

    I'm trying to implement a contact form, but I get an error #1009. I read somewhere that this has to do with false targeting, but I can't find my mistake (s). Help, please.

    Imports needed for radio button grouping

    Import fl.controls.RadioButton;

    Import fl.controls.RadioButtonGroup;

    hide the CM treatment

    processing_mc. Visible = false;

    custom function, we create to fill the comboBox list

    function addPrintsToList (): void {}

    printList.addItem ({label: 'DIBC'});

    printList.addItem ({label: "Fittraketerna"});

    }

    Run the above function now

    addPrintsToList ();

    make radio button group distictions

    var radioGroup1:RadioButtonGroup = new RadioButtonGroup ("radioGroupStorlek");

    radioSmall.group = radioGroup1;

    radioMedium.group = radioGroup1;

    radioLarge.group = radioGroup1;

    construct the name of the variable for the loader Variables URLS

    var variables: URLVariables = new URLVariables;

    Build the varSend variable

    var varSend:URLRequest = new URLRequest ("form_parse.php");

    varSend.method = URLRequestMethod.POST;

    variable = varSend.data;

    Build the varLoader variable

    var varLoader:URLLoader = new URLLoader;

    varLoader.dataFormat = pouvez;

    varLoader.addEventListener (Event.COMPLETE, completeHandler);

    Manager for the realization of PHP script and the return of the status

    function completeHandler(event:Event):void {}

    remove the clip of treatment

    processing_mc. Visible = false;

    name_txt. Text = "";

    email_txt. Text = "";

    msg_txt. Text = "";

    Antal.Value = 1;

    CheckBox.Selected = false;

    Load the answer from php here

    status_txt. Text = event.target.data.return_msg;

    }

    function ValidateAndSend

    function ValidateAndSend (event: MouseEvent): void {}

    field validation

    {if(!name_txt.) Length)}

    status_txt. Text = "Var God och fyll I ditt namn. ';

    } else if (! email_txt.length) {}

    status_txt. Text = 'Var God och fyll i din e-mail.';

    } else if (! msg_txt.length) {}

    status_txt. Text = 'Var God och skriv ett meddelande.';

    } else {}

    Everything is good, send the data now for PHP

    processing_mc. Visible = true;

    loan variables in our entry form

    variables.userName = name_txt.text;

    variables.userEmail = email_txt.text;

    variables.userMsg = msg_txt.text;

    variables.userPrints = printList.value;

    variables.userAntal = antal.value;

    variables.userStorlek = radioGroup1.selection.value;

    variables.userNewsletter = checkbox.selected;

    Send data to PHP now

    varLoader.load (varSend);

    } / / close another condition to handle errors

    } / / close accept and send service

    Thanks in advance,

    Anton

    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.

  • Detect/catch errors for photos in datagrid

    Hi all

    Is that anyway to detect/catch errors for the loading of the photos in the grid data if pictures cannot be loaded for some reasons such as photo not found in the directory, etc... As the use of ioerror or sth...

    This is how I load photos in the datagrid control. Using

    var col_img:DataGridColumn = new DataGridColumn("photo");
                   myDataGridList.addColumn(col_img);
                   col_img.cellRenderer = LoaderCellRenderer;
                   col_img.width = 80;
                   col_img.sortOptions = Array.NUMERIC;
                   col_img.resizable = false;
                   col_img.headerText = "Photo";
                   LoaderCellRenderer._stage = this;
    

    //LoaderCellRenderer.as
    
    
    package {
    
         import fl.containers.UILoader;
         import flash.events.MouseEvent;
         import flash.display.Stage;
         import flash.ui.Mouse;
         import fl.controls.listClasses.ListData;
         import fl.controls.listClasses.ICellRenderer;
    
         public class LoaderCellRenderer extends UILoader implements ICellRenderer {
              protected var _data:Object;
              protected var _listData:ListData;
              protected var _selected:Boolean;
              public static var _stage;
    
              public function LoaderCellRenderer() {
                   super();
                   addEventListener(MouseEvent.CLICK, onClick);
                   addEventListener(MouseEvent.ROLL_OVER, rOver);
                   addEventListener(MouseEvent.ROLL_OUT, rOut);
              }
    
              private function onClick(MouseEvent):void {
                   if (! _stage.mainLoaderbg.mainLoader.visible) {
                        _stage.mainLoaderbg.mainLoader.source=_data.photo;
                        _stage.mainLoaderbg.visible=true;
                        _stage.mainLoaderbg.mainLoader.visible=true;
                        Mouse.cursor="button";
                   }
              }
    
              private function rOver(MouseEvent):void {
                   if (! _stage.mainLoaderbg.mainLoader.visible) {
                        Mouse.cursor="button";
                   }
              }
              private function rOut(MouseEvent):void {
                   Mouse.cursor="auto";
                   _stage.txt_statusList.text = ""; 
              }
    
              public function get data():Object {
                   return _data;
              }
    
              public function set data(value:Object):void {
                   _data=value;
                   source=value.photo;
              }
    
              public function get listData():ListData {
                   return _listData;
              }
    
              public function set listData(value:ListData):void {
                   _listData=value;
              }
    
              public function get selected():Boolean {
                   return _selected;
              }
    
              public function set selected(value:Boolean):void {
                   _selected=value;
              }
    
              public function setMouseState(state:String):void {
              }
    
         }
    }
    

    LoaderCellRenderer is a class written by the tutorial on the adobe site.

    Thank you

    Zainuu

    Use the below code to know if the image loaded has failed:

    In the .as file:

    Constructor
    public void LoaderCellRenderer()
    {
    Super();
         addEventListener (IOErrorEvent.IO_ERROR, ioErrorHandler);
    }

    private void ioErrorHandler(event:IOErrorEvent):void {}
    trace ("ioErrorHandler:" + event);
    trace ("Image URL Not Found");
    }

  • Get this error message: reference #30.9079ccc.1416414297.9e80d60

    Went to sears.com and put four tires in the basket. When I clicked on the "order" button I get the following error message: reference #30.9079ccc.1416414297.9e80d60

    Weird because last week I performed this operation without problem.

    I contacted Sears and they said that it wasn't a mistake there messages. The tech support guy could not reproduce the problem to an end. I went to another computer running Google Chrome and has not encountered the problem.

    I tried the website again and everything works! Don't know what was the problem but thanks for the help.

  • Error: cannot access dead object

    [JavaScript application] Error: cannot access dead object.

    This message appears repeatedly after using Gmail, sign out, close the tab, then open a new tab.

    Uploadd disabling Drag & Drop appeared to be... on my 7 machine. Now for my Vista laptop. Thank you.

Maybe you are looking for