Action Script 3 code works does not start and stop button?

OK so I have what I have created simple animations of a circle that moves from one side of the stage to the other. I have added a new layer and named her buttons. On this layer, I added 2 buttons. One for the beginning and another to stop. The goal is to get my circle to pass from one side of the stage to the other, but be able to use my buttons so that I can start and stop times random animations during playback. I've corrected all my faults of the compiler now the problem is that whenever I click on the start or the stop button, I get an error output. I have a 3rd layer which is called actions and that's where all my code is displayed. I removed this layer and put my code in the first frame of the layer of buttons to see if that would change anything but I still get the same errors of output. So I just added back my layer actions. What could I do it wrong? I made sure to name all of my video clips and buttons correctly and I even added an instance name for them.

Here is my code and errors I get when I press play and stop button - test

start_btn.addEventListener (MouseEvent.CLICK, startCircle);

stop_btn.addEventListener (MouseEvent.CLICK, stopCircle);

function startCircle(e:MouseEvent):void {}

Circle.Play ();

}

function stopCircle(e:MouseEvent):void {}

Circle.Stop ();

}


green_btn.addEventListener (MouseEvent.CLICK, greenCircle);

red_btn.addEventListener (MouseEvent.CLICK, redCircle);

function greenCircle(e:MouseEvent):void {}

Circle.Play ();

}

function redCircle(e:MouseEvent):void {}

Circle.Stop ();

}

Here's my output errors-

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

What timeline you want to stop?

Tags: Adobe Animate

Similar Questions

  • Internet works does not fast and stops constantly

    Why internet stops working even though it is connected?

    This looks like a problem with your Internet Service Provider (ISP) and that you should probably contact them to get advice... If there is a problem with your modem or router, your ISP provider should be able to identify the same and give you advice on how to proceed.

    Good luck...

  • my windows firewall does not start and I get a erroe code 5, can someone help me

    my windows firewall does not start and I get a erroe code 5, can someone help me

    Hello

    1. What is the brand and model of the computer?

    2. what security software is installed on the computer?

    3. have you made changes on the computer recently?

    Method 1.

    To resolve this problem, click the fix button of this article to diagnose and fix common Windows Firewall problems automatically.

    Some services start not in Windows Vista and Windows 7: http://support.microsoft.com/kb/943996

    Method 2.

    Automatically repair the settings of Windows security to secure your PC: http://support.microsoft.com/mats/Malware_Prevention/

    To do: Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base: How do I back up and restore the registry in Windows

    For Windows 7: back up the registry: http://windows.microsoft.com/en-US/windows7/Back-up-the-registry

    I hope this helps.

  • Anyone know how to get your money back?  My CC application does not start and I have tried the suggested workaround solutions listed above and they have not worked for me.  The amount of problems listed here in the forum, I have to ask the product is real

    Anyone know how to get your money back?  My CC application does not start and I have tried the suggested workaround solutions listed above and they have not worked for me.  I'm new to the CC Apps but use the versions installed for years.  The amount of questions listed here in this forum, I have to ask the product is really stable?

    Thank you.  I've deleted and reinstalled.  Seems to have solved the problem.

  • Mac does not start and the fans going crazy

    Computer does not start and the fans work hard and fast. Someone has an idea what is the problem and how can I solve this problem?

    OLA I will try help EU tenho um macbook pro, mas esse problema não me it happened ainda EU acho seria o seu mac origem help esse problema pode formatar better.

    SE nao tem'm ligar o seu osx para formatar use cmd + r e ligar pressionar cmd + r ele deve AI PODES ligar restore o seu novo osx.

  • Satellite Pro L300-21F does not start and the screen remains blank

    L300-21F is aged 18 months, so out of warranty. When you press the power button, you can hear the fan and a "click" but the hard drive does not start and the screen remains blank. The power and the battery on the headlight LEDs, but the switch light does not work. I checked the power supply and it is 19.3V and substituted a good known. Removed the battery, tried with just the power cord and still nothing. Pressing ESC or F2 when you press the button power does not bring to the top of the screen of the bios or any other message. I have concluded there is no power the jury. A friend he had its technology take a look and he concluded Council is probably a friend.

    So my questions are:
    1. He's probably right?
    2. is it a common problem with an easy solution?
    3. what else can do before shelling out for a new Board of Directors?
    4. is there a link where I can find how to disassemble the case?

    Any help appreciated

    Hello

    > 1. He's probably right?

    Yes, it looks like motherboard failure

    > 2. Is this a common problem with an easy solution?

    If it's a motherboard problem, the whole motherboard is replaced. Quite expensive part...

    > 3. What else can do before shelling out for a new Board of Directors?

    I don't think you can do anything with fried mobo

    > 4. Is there a link where I can find how to disassemble the case?

    Take a look at the site called irisvista.com

  • Application does not start and does not respond. Closed that it self.

    Hi guys

    I made a game for the BlackBerry using Flash Pro CS6 z10. I tried it in the Simulator and I installed it in a system z10.

    To do this, I packed the bar and signed the app using the command line and I send the Simulator and the device with the HELP of graphics OS Tablet.

    Everything works perfectly, in the SIM and the device... However, when I presented the game on the portal of the seller for review and approval, I had... "correct the following issues and resubmit your application as a new version."

    I'm testing your app on the BlackBerry Z10. When I press the icon for your application, it does not start and does not respond. Closed by it self. » ...

    Anyone know how to solve this problem or what can I do? (and why it's working ok for me and not them?)

    Thank you very much!

    OK, I downloaded your app and checked that it uses Stage3D (you renderMode value to indicate in the app.xml file). I tested it in point 10.2 and it works for me. When using the portal provider make sure you specify BlackBerry 10.2 or higher.

  • I'm using Photoshop CS4 on an iMac with OS Lepord of snow.  Recently, I had to do a fresh install of the OS software, then brought back all my Apps, etc. back using Time Machine.  My problem is that now my Photoshop does not start and gives me a messa

    I'm using Photoshop CS4 on an iMac with OS Lepord of snow.  Recently, I had to do a fresh install of the OS software, then brought back all my Apps, etc. back using Time Machine.  My problem is that now, my Photoshop does not start and gives me a message to contact Technical Support with error # 150:30... What should I do now? @

    You must click on this link 150:30 blue and start with message 11.

    Don't forget to leave a space after sudo python before submitting the script.

    Remember that you will not see your password when you enter it when calling to make.

  • my windows xp does not start and it only shows the arrow and a black screen in the Middle, what can I do to solve this problem. __

    my windows xp does not start and it only shows the arrow and a black screen in the Middle, what can I do to solve this problem.

    Try to restart your machine and pressing F8 before the spash screen Windows appears.  Choose the option "last last known good configuration".

    If this fails, you can try to repair your installation of starting for the original CD-ROM for Windows XP installation and choosing the option 'Fix' when prompted.

  • Creative cloud does not start and I can't re - install

    I had problems with creative cloud, it does not start and I can't uninstall it because a prompt appears telling me I can't uninstall it because the programs use. I really need to get the latest update for Illustrator, because it also crashes without reason.

    Help

    Hi tsumera,

    Try to uninstall the application office creative cloud through the cleaning tool

    If that doesn't help, please try the following steps to completely uninstall the creative cloud.

    Remove the OOBE and AAMUpdater folders.

    Mac OS:

    1 leave the creative Cloud Desktop application

    2 force quit Adobe all processes in the activity monitor (for example, CC, Core sync, the broker CC library, Office, Adobe, Adobe CPI, demon Adobe Crash etc..)

    3. navigate to \User\\Library\Application Support\Adobe *.

    And/Library/Application Support / Adobe *.

    To access the hidden user library folder, see library user access hidden files. Mac OS 10.7 and later.

    4. search and delete the files AAMUpdater and OOBE

    5 / Library/Application Support/Adobe (rename Adobe Application Manager and Adobe of joint office)

    6. go > utilities > (rename Adobe Application Manager and creative cloud)

    7 re - download creative-cloud

    https://helpx.Adobe.com/creative-cloud/help/install-apps.html

    Windows:

    1. Exit creative Cloud Desktop
    2. Force quit Adobe all processes from the Task Manager (e.g. cc, Core sync, the broker CC library, Office, Adobe, Adobe CPI, demon Adobe Crash etc..)
    3. Go to \Users\AppData\Local\Adobe\

    And C:\Program Files (x 86) \Common Files\Adobe

    C:\ProgramData\Adobe

    1. To view the AppData folder and program hidden data, see files, folders, file name extensions. Windows XP, Vista, Windows 7.
    2. Find and delete the files AAMUpdate and OOBE
    3. Download creative-cloud

    https://helpx.Adobe.com/creative-cloud/help/install-apps.html

  • Mr President, when I do some changes on a page of its buttons on the right side convert (> >) sings two more. What is that this does not happen and the buttons are always visible?

    Mr President.

    When I convert a few changes on a page of its buttons on the right side of the page (> >) sings two more.

    What is that this does not happen and the buttons are always visible?

    Concerning

    Did you try what I suggested?

    listed AFStretchWidth styleclass property of panelGroupLayout and remove the box toolbar tools just use inside grouplayout

    If this does not work please share your xml source

    Thank you

  • Satellite U300-13U does not start and the recovery disc fails to too much work

    Hi all

    I have the above computer (or should I say my wife) & it is nothing that a good pain since the first day we got it.
    I have had it about 2 years & had to reformat the HD at least 6-8 times using the product recovery disc as laptop starts.
    The laptop runs Vista.

    In any case, problem I have now is that new laptop does not start, but for some reason any product recovery disc also does not work...
    What I can do...

    I have read on various forums that it might work if I reformat the HD first using some s/w on a bootable CD but how / what S/W can I use...?
    The laptop has a SATA HD 160 GB installed. How can I check that it all works.
    I don't know if the current problem is S/W or related material...

    Toshiba has a utility that I can use...?

    Thanks a lot for all the help...

    John

    Hello

    What happened exactly?
    Do you receive error messages by using the recovery disk?

    Check if the HARD drive is OK! You can check in the BIOS.
    If the HARD drive is listed in the BIOS then the HARD drive and HARD drive found BIOS is not dead.

    Usually, you might start Notepad with the help of a Live disc for example Bart PE
    It s a bootable windows CD/DVD live

    http://www.nu2.nu/pebuilder/

    This can allows you to format the HARD disk, and then use the recovery disc!

  • What can I do if Windows does not start and system repair will not work

    Original title: pc does not start. blue screen says driver overtaking has a stack buffer and of physical memory dumps. repair of the proven system and also the restoration of the system. still no luck. Help please! Jane.

    Blue screen flashes off pretty quick so cannot read all of it. It says problem can be installed recently ware. don't the have not installed anything. Since regular programs.

    says a malicious attempt can occur. that security essentials update installed.  Windows system repair ran several times and said that he could not fix pc. Just tried restoring the system to the 22/10/11, which said it was successful, but still have the same problem. Don't know what to do now that not that computer savvy!

    Hello

    Did you do changes on the computer before the show?

    Method 1:
    You can disable automatic reboot system Advanced Start Menu fails to capture the error message and check if it helps.

    Method 2:

    You can start the computer in safe mode and check if you are able to start
    http://Windows.Microsoft.com/en-us/Windows-Vista/start-your-computer-in-safe-mode

    Method 3:
    If you are able to boot into safe mode, then perform a clean boot and check:
    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7

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

    Note: After troubleshooting, be sure to set the computer to start as usual as mentioned in step 7 in the Knowledge Base article.

    Method 4:
    You can perform system restore and startup using Windows vista DVD repair.

    What are the system recovery options?

    http://Windows.Microsoft.com/en-us/Windows-Vista/what-are-the-system-recovery-options-in-Windows-Vista

  • My MacBook does not start and fires after the Apple logo. I received this error via FirstAid detail in disk utility.

    Hi Apple/community,

    I need a help.

    What it means? Operation failed! My MacBook Pro does not start. It cuts after the loading screen. What will happen?

    Any help will be greatly appreciated. Thank you!

    Well, it seems that your MacBook Pro hard drive has failed and cannot be repaired by disk utility.

    Try to reboot into single user mode: How to start your Mac in single user mode or verbose--Apple Support

    If it works, try to repair the disk with this command:

    fsck -fy

    (http://osxdaily.com/2013/08/07/how-to-repair-a-mac-disk-with-fsck-from-single-us UH-mode /)

  • Satellite A80 121 does not start and make a beep after every 15 seconds

    Hello
    I have a Toshiba Satellite A80-121, and it won't work. Yesterday, worked all very well, but now it does not start.
    When I press the button the button normally has a blue color, then the screen stays black, no image at all, then the fan stops. Then I got a beep every 15 seconds.

    Can someone help me what is wrong?

    Thank you very much for your help

    Hello!

    It sounds like a hardware malfunction...
    If you have installed two RAM sticks try it with a single. Check it!

    I m not a technician to laptop but the problem may be with the motherboard, RAM or CPU, but this is my personal opinion.

    Good bye

Maybe you are looking for