Maddening error (cannot access the property/method of null ref obj) problem...

Hey guys,.

I get the following error in the intro of my file...

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

to Juke_fla::MainTimeline/PL_LOADING() [Juke_fla. MainTimeline::frame3:11].

This refers to this piece of actionscript code:

This.Stop ();

() this.loaderInfo.addEventListener

ProgressEvent.PROGRESS, PL_LOADING

);

function PL_LOADING(event:ProgressEvent):void {}

var perc:Number = event.bytesLoaded / 3704635 * 100

LPC. Text = int (perc) + "%";

If (event.bytesLoaded > = 3704635) {}

this.gotoAndStop (4);

}

}

If (this.loaderInfo.bytesLoaded > = this.loaderInfo.bytesTotal) {}

this.gotoAndStop (4);

}

more precisely the line lpc.text = int (perc) + % ';
It works again... and unless you have the debug player you do not see the error, but its very annoying.
does anyone have ideas why this is or how to fix?
Dan

Oooohhh! Now, I had the problem!

The problem is that, inside the function, if you have a clause, that when the SWF file loads a number of bytes, send you it to the frame four. The problem occurs because even send you to the glory of four, he is always listening to the PROGRESS_EVENT, when this event is dispatched, the method is called again, trying to put the label of the textfield object that does not exist anymore.

To fix this, simply add a removeListener before send it to the framework 4.

function PL_LOADING(event:ProgressEvent):void {
     ...
     if (event.bytesLoaded>=3704635) {
          this.loaderInfo.removeEventListener( ProgressEvent.PROGRESS, PL_LOADING );
               this.gotoAndStop(4);
     }
}

if (this.loaderInfo.bytesLoaded >= this.loaderInfo.bytesTotal) {
      this.loaderInfo.removeEventListener( ProgressEvent.PROGRESS, PL_LOADING );
          this.gotoAndStop(4);
}

This will fix the problem.

Kind regards

CaioToOn!

Tags: Adobe Animate

Similar Questions

  • DONKEY - Vibration error: cannot access a property or method of a null object reference.

    Hi all

    I am trying to use the Vibration DONKEY but get the following error:

    IsSupported() vibration

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

    Manufacturer of vibration: create a context of extension

    at com.adobe.nativeExtensions::Vibration$/initExtension() [/ users/meetshah/Documents/Adobe Flash Builder 4.5/VibrationActionScriptLibrary/src/com/adobe/nativeExtensions/Vibration.as:58]

    to com.adobe.nativeExtensions::Vibration$/get isSupported() [/ users/meetshah/Documents/Adobe Flash Builder 4.5/VibrationActionScriptLibrary/src/com/adobe/nativeExtensions/Vibration.as:43]

    views::Tour/onMarkerClick() [/ < path to project here > / src/views/Tour.mxml:204]

    The code I am using is directly from the example:

    var vibe: Vibration;

    if (Vibration.isSupported)

    {

    Vibe = new Vibration();

    Vibe.VIBRATE (2000);

    }

    Not really sure why this could happen. If anyone has any suggestions, it would be much appreciated!

    Thank you

    Alastair

    I thought about it. It seems that the native extension has not been properly packed (check the parameters of the project, Flex Build Path and Extension Native for the iOS and Android).

  • Error 1009: Cannot access a property/method of a null object reference

    OK, so I've spent the last few weeks trying to figure this on my own, looking at the other tutorials and nothing has helped my situation. I am beyond frustrated with this project and I just want to find an answer quickly. I have some experience with Flash to school, but I can't understand this because it doesn't make sense to me.

    I have two main parts of my file. I have a photo gallery and I have a video. The home page allows the user to take them to a number of areas where they can see a gallery of photos or video from a certain city. Photo gallery works fine as do videos. Well, now, user can get the gallery photo to video, but when I try to set up exactly the same thing to bring video to the images it gives me an error of output message:

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

    to 2ndtest_fla::mc_brownton_110/frame1()

    at flash.display::Sprite/constructChildren()

    at flash.display::Sprite()

    at flash.display::MovieClip()

    to 2ndtest_fla::mc_home_168()

    at flash.display::Sprite/constructChildren()

    at flash.display::Sprite()

    at flash.display::MovieClip()

    to 2ndtest_fla::MainTimeline()

    The code that works very well is as follows:

    Stop();

    function showNextPicBrownton (e: Event): void {}

                            nextFrame();

                }

    btn_next_brownton.addEventListener (MouseEvent.CLICK, showNextPicBrownton);

    function showPrevPicBrownton (e: Event): void {}

                            prevFrame();

    }

    btn_prev_brownton.addEventListener (MouseEvent.CLICK, showPrevPicBrownton);

    function showBrowntonVideo (e: Event): void {}

                            gotoAndStop (7);

    }

    btn_brownton_videofrompics.addEventListener (MouseEvent.CLICK, showBrowntonVideo);

    But where everything goes wrong here:

    function showBrowntonPhotos (e: Event): void {}

                            gotoAndStop (1);

    }

    btn_photos_brownton.addEventListener (MouseEvent.CLICK, showBrowntonPhotos);

    All this code is not on the main timeline, but in a movie clip called mc_brownton where I have the pictures and video all on the same timeline.

    If someone could help, I would be eternally grateful. I'll throw my computer against the wall.

    Click file/publish settings/flash and check "permit debugging".  Repeat the test.  the line number with the null object will be in the error message.  to highlight this line of code if you cannot solve the problem with this info.

  • Unable to connect to the application Windows 8 music. I get an error "Cannot access the file."

    Hello

    When I open the Windows 8 Xbox music app I can't connect. Here's the exact error code.
    "Cannot access the file. Make sure that the file is not in use, you can access the file is stored, and that your network proxy settings are correct, and then try again.
    Error code: 0xc00d11d2 (0x80070005)
    I can sign in all other Windows 8 modern Apps without problem.
    Thank you
    Andy

    I created a local account and recreated my Windows Live profile and that fixed the issue.

    Thanks for your help.
  • When install or remove a product, get error cannot access the windows installer

    Whenever I'm installing an update or remove a product, I get the message "Cannot access Windows Installer"

    Hello

    ·        What are the programs you are trying to install on the system and updates?

    ·        Have you managed to install the updates before on the system without any problems before?

    ·        Remember to make any change to the system?

    I suggest you follow the steps mentioned below.

    Method 1:

    I suggest you to check in services if the service Windows install is set to automatic. Follow the steps mentioned below.

    a. Click Start--> Run--> "services.msc" [press on enter]

    b. scroll down and find "Windows Installer".

    c. right-click on it and choose "Properties".

    d. on the properties page, verify that the "Startup type" is set to 'Automatic'

    e. confirm the "Service status" is "started."

    f. click "OK".

    Method 2:

    I suggest you unregister re-register Windows install and check if it helps. Follow the steps mentioned in the article below.

    Error message "Could access the Windows Installer Service" when you install the application

    http://support.Microsoft.com/kb/319624

    Method 3:

    I suggest you to reset the windows update components and check. Follow the steps mentioned in the article below.

    How to reset the Windows Update components?

    http://support.Microsoft.com/kb/971058

    Method 4:

    I suggest you to download and install Windows install from the link below and check.

    Windows install 4.5 Redistributable

    http://www.Microsoft.com/downloads/en/details.aspx?FamilyId=5A58B56F-60B6-4412-95B9-54D056D6F9F4&displaylang=en

    I suggest you follow the steps mentioned in the articles given below for further assistance.

    Error message "Could access the Windows Installer Service" when you install the application

    http://support.Microsoft.com/kb/319624

    How to troubleshoot issues that may occur when you install, uninstall, or upgrade one program on a Windows computer

    http://support.Microsoft.com/kb/2438651

    Thanks and regards.

    Thahaseena M
    Microsoft Answers Support Engineer.
    Visit ourMicrosoft answers feedback Forum and let us know what you think.

  • Windows cannot access the specified path or file and devices problem

    I am on windows 7 o s a problem facing "windows cannot access specified path or devices" his see on instalation game of the World Cup fifa 2010 file this error see (file thretensed virus). How to fix this problem please help me

    installation file come you from another computer or downloaded from the internet? If so, right click on your setup file > properties > then press on unlock. This method works every time. If this is your problem or not please let me know :-)

  • Error: Cannot access a property or method of a null object reference. to enemy / loop)

    Hi everyone, I'm learning Flash for a few days. I want to write a simple game... We have a 'gun', and if we click the mouse, the gun to send a ball. Then, if the ball hits the enemy, the enemy and bullet disapear. Unfortunately, I got an error this is my code fragment:

    main (in game.fla):

    var bulletholder:MovieClip = new MovieClip();

    addChild (bulletholder);

    function shoot(e:Event):void

    {

    Player.y = 400;

    var bul:MovieClip = new bullet();

    Bul.x = player.x + 21;

    Bul.y = player.y - 10;

    Bul.Width = 30;

    Bul.Height = 30;

    bulletholder.addChild (bul);

    }

    It's code in enemy.as:

    public enemy class extends MovieClip {}

    Subject: main private var;

    public void enemy() {}

    addEventListener (Event.ENTER_FRAME, loop);

    x = Math.random () * 550;

    y = - 100;

    Base = MovieClip (root);

    }

    private void loop(e:Event) {}

    y += 4;

    var ilosc:int = core.bulletholder.numChildren; Currently, debugging display error!

    for (var i: int = 0; i < 4.Ilosc; i ++)

    {

    var target: MovieClip = core.bulletholder.getChildAt (i);

    If (hitTestObject (target))

    {

    core.bulletholder.getChildAt (i) .remove (); Remove() is my bullet.as function

    core.bulletholder.removeChild (target);

    removeEventListener (Event.ENTER_FRAME, loop);

    core.removeChild (this);

    }

    }

    if(y > 600)

    {

    removeEventListener (Event.ENTER_FRAME, loop);

    core.removeChild (this);

    }

    }

    }

    Please help me, I'm stuck here now for 2 days

    And sorry for the typos, I do not know English very well.

    When you remove a child so that reduce you the number of children and all children above this movement of the index down this gap.  Your loop counter 'number' is based on the number of children before remove you any.  So as soon as you get to an 'i' value when it is no longer a child, you will encounter this error.

    Overcome is to work the loop in the opposite direction, from the child index higher at the lowest, as in...

    for (var i: int = number-1, I > - 1; i--)

  • parsing with HP printer error cannot access the solutions Center

    I can't access HP solution center anymore, I get a message "ERROR PARSING in digital imaging bin hpqscloc 1033

    I tried, I couldn't Uninstall HP totally yhank you for help

    You will probably need to uninstall all HP software via Add/Remove with your disconnected printer, then restart, before installing the software on HP site and only connect the printer when installing telling you.

    HP have also a tool on their site to completely remove the remove failure cases of

  • Try to install Topaz Denoise and Topaz Clean, getting the error "cannot access the windows service install. "This can happen if windows install is not properly installed.

    This problem arises when clean installing topaz denoise and "Topaz". I tried the fixes in this article http://support.microsoft.com/kb/2642495 and none of them seem to work. This problem arises when clean installing topaz denoise and "Topaz". I tried to install other programs, and the error does not appear anything else. I also restarted my computer, any advice on how to solve this problem would be appreciated.

    Original title: the windows service install are not accessible. This can happen if windows install is not properly installed. Ask your assistance technical assistance

    Hello

    Have you made changes on the computer before this problem?

    I suggest you try these methods and check the status of the issue.

    Method 1:

    Keep the computer in a clean boot, try to install the programs and check the status of the issue.

    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7.

    http://support.Microsoft.com/kb/929135

    Note: Please, go to step 7 of the Kb to maintain the computer to a normal startup after you fix the problem.

    Method 2:

    I suggest to try the methods mentioned in the following article and check the status of the issue.

    How to solve the problems when you install or uninstall programs on a Windows computer.

    http://support.Microsoft.com/kb/2438651

  • Cannot access the itemrenderer methods

    Hello guys, I have this custom with an element of rendering components

    <mx:TileList xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:mgs="componentes.*">
       <mx:itemRenderer>
       <mx:Component>
          <mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml" paddingBottom="0" paddingTop="0" width="100%">
             <mx:Script>
                <![CDATA[
                   public function get cyclesValue():uint
                   {
                      return cycles.value;
                   }         
    
                   public function set cyclesValue(repeat:uint):void
                   {
                      cycles.value=repeat;
                   }         
                ]]>
             </mx:Script>
                <mx:VBox width="225" verticalScrollPolicy="off" horizontalScrollPolicy="off">
                   <mx:Label text="Video: {data.nombreVideo}" />
                   <mx:Label text="Sonido: {data.nombreSonido}" />
                </mx:VBox>
                <mx:VBox width="45" height="100%" horizontalAlign="center">
                   <mx:Label text="Repetir"  fontFamily="Verdana" fontSize="10" fontWeight="bold"/>
                   <mx:NumericStepper width="45" minimum="0" value="1" maxChars="2" maximum="99" id="cycles"/>
                </mx:VBox>
          </mx:HBox>
       </mx:Component>
       </mx:itemRenderer>
    </mx:TileList>
    

    Arrises them problem when I want to call the methods within the component, my main actionscript, like this file:

    private function up():void
    {
           var item:IListItemRenderer = playlist.indexToItemRenderer(playlist.selectedIndex);
          item.cyclesValue(item.cyclesValue()+1);
    }
    
    private function down():void
    {
           var item:IListItemRenderer = playlist.indexToItemRenderer(playlist.selectedIndex);
          item.cyclesValue(item.cyclesValue()-1);
    }
    

    This arrises this error

    1061: Call to a possibly undefined method cyclesValue through a reference with static type mx.controls.listClasses:IListItemRenderer

    Any ideas on what I m doing wrong here?

    Thank you very much!

    You use the set for cyclesValue method incorrectly.

    Try:

    item.cyclesValue = miniaturas.getItemAt(playlist.selectedIndex).ciclos;
    
  • Error "Cannot set the property 'innerHTML' undefined reference or zero" during the installation of Flash player 18.0.0.209

    Check the status of my modules I've seen "update" notice for flash player.

    I clicked the button to update and was taken at Adobe to start the process. I clicked on the "Download" button and the download of the installer has set and completed normally.

    I clicked on the file Installer downloaded and started the installation. Then this error message appeared (see snapshot). By pressing 'Yes' or 'no' buttons causes the message reappear continually. I had to use the Task Manager to kill the process.

    MY version of FF is 39.0. The version of flash player that is 18.0.0.209. OS is W7 Home Premium (update).

    I have to wait until Adobe releases another version? Thanks in advance for your help.

    Hi, can try you if the installation works with the offline installation program, you can download on http://www.adobe.com/products/flashplayer/distribution3.html (for use of firefox windows-exe for plugin-based browsers)?
    otherwise, you may contact adobe technical support to get their product to work...

  • FATAL ERROR: Cannot access the temporary directory for remote package "detached.pkl".

    have already run antivirus

    already uninstalled and re-installed the app, I wish to run (even used revounistaller and other programs to ensure that all this)

    have already removed all the components of the registry associated with this application, I want to make it work with some programs

    In my view, it is over 2 years old, but I just had the same ERROR FATAL happen on my departure upward and found that a power cable to one of my extra hard drives has been disconnected. I was redirecting my temporary files to a G: drive to save space on my SSD boot drive. After that I reconnected it to power, everything was good.

  • Cannot access the disk in the drive E:, please make sure that the drive is ready and the disk is not write protected.

    When I try to backup Quicken, I received the error: cannot access the disk in the drive E:, please make sure that the drive is ready and the disk is not write protected.  My last backup of Quicken was 16/07/2010.  I don't know why I can't back up now.  Is there a way to fix this?

    Why not save to a folder on your hard drive and burn them to a CD - R from there? I can't tell from the little you wrote if the problem is with Quicken (not work or you have incorrectly backup location) or with your CD - RW drive. How about more details to work with? This will give you an idea of what to write:

    The first Question of troubleshooting: If the problem is new, what has changed between the time things worked and the time they do not have?

    http://www.elephantboycomputers.com/page2.html#Tech_Support - See the article "how to write a Post.
    http://support.microsoft.com/default.aspx/kb/555375 - how to ask a Question

    MS - MVP - Elephant Boy computers - don't panic!

  • BlackBerry Classic error - cannot access media library

    Since buying classic BlackBerry, I was unable to view the images, music, videos.  I get the message 'error, cannot access the media library.  I met a few suggestions to this problem on the Web sites and tried them but still no joy.  I tried to telephone support BlackBerry, but no matter which option I pressed, he simply repeated the options.  A solution to this problem has been found?

    yvonnec1 wrote:

    Since buying classic BlackBerry, I was unable to view the images, music, videos.  I get the message 'error, cannot access the media library.  I met a few suggestions to this problem on the Web sites and tried them but still no joy.  I tried to telephone support BlackBerry, but no matter which option I pressed, he simply repeated the options.  A solution to this problem has been found?

    Hi @yvonnec1! Welcome to the community of BlackBerry Support Forums!

    You don't mention what specific solutions you have tried already, if I may say so things that you've already tried. Have you seen this KB: KB33501 ?

  • Cannot access the API blocked

    I created a web application bb factory using the web works for Visual Studio plugin. I tried to install the application and got the error cannot access the api blocked. I researched and found that the fact of not having signed app can cause this error. I followed the instructions that comes with the plugin on the signing of the app.

    • In Microsoft® Visual Studio®, on the Tools menu, click on install BlackBerry signing key.
    • Navigate to the folder that contains the file signing key (.csi).
    • Click OK.
    • Type the PIN registration and the password for the private key.
    • Click Save.
    • When the success dialog box appears, click on exit.

    When I try to install the application, I get the same error message. Do not install the key and sign the application correctly? Help, please

    Have you installed all the three keys?

Maybe you are looking for