Error #1009. Error in ActionScript in Flash game I'm doing...

Hello

I do a Flash game and rather than putting a .as file separate all AS3, I'm throwing on the timeline, which may or may not be a mistake since this game gets really big, really fast and messy.

And if I get this error when I test:

TypeError: Error #1009: cannot access a property or method of a null to GameBeta_MainTimeline_fla::MainTimeline/frame1() object reference

What I read on that mistake, it refers to something that is not instantiated again, as something that is out of order? As I am referring to something that is not at the point in time that I refer to it? I am interested in my AS3 and I have NO idea. Here's what I wrote:

Stop();

TITLE PAGE

play_game.addEventListener (MouseEvent.CLICK, startgame)

function startgame(evt:MouseEvent):void
{
Stop ("Input Name");

}

Entry name and sex page

var userName:String;

inputField.addEventListener (Event.CHANGE, onInput)

function onInput(e:Event):void
{
outputField.text = "If your name is" + inputField.text + "are you sure?";
userName = inputField.text;
}


confirm_input.addEventListener (MouseEvent.CLICK, toCreationpg)

function toCreationpg(evt:MouseEvent):void
{
Stop ("creation of Fem");
outputField.text = "your name is" + username;
}

Character creation page

readytostart.addEventListener (MouseEvent.CLICK, firstscene_plz)

function firstscene_plz(evt:MouseEvent):void
{
gotoAndStop ("Day03");
outputField.text = "Let's make your character,"+ username; "
}

So, any ideas as to why I get this error?

Before I had each page with its own Actionscript and buttons inside their own clips on the timeline. Who became confused, then I took everything off the movieclips to put everything on a timeline and have a layer of Actionscript in the hope to simplify things and find the problem easier. No luck. It is supposed to have a title page and a button that goes to the 2nd page where you enter your name and as you type, it displays your name before you confirm by pressing another button that will finally to character creation page. When I test, I just get this error #1009, it will go to page 2 for the name entry, but the wacky bill text fields and does not have the key to continue. I hope that when I find the source of this error, the rest will be fixed as well.

Thanks in advance for all advice! I'm very happy.

There are many ways to create this error which are undetectable to inspect your fla unless you go up the steps you took to create.  and that's worth.

and there is only one way to ensure that you will not see this error: inputField in its own layer and ensure that there is only a single keyframe in this layer.  test.  You should see no problem if you assign this instance name in this key frame (unless you have another inputField somewhere).

from there you can begin to add keyframes and as long as you do not remove all keyframes inputField your code will continue to work.

Tags: Adobe Animate

Similar Questions

  • I'm so fed up with the error message that adobe flash broke down.

    I'm so fed up with the error message that adobe flash plugin has crashed. You got two years, in order to solve this problem, and all your proposed solutions do not work. I see no alternative but to return to Internet Explorer. It's so frustrating when I check my emails and click on a link to get the same message over and over again. Why did this problem occurs only with Firefox? It is not the case with Internet Explorer and it is not the case with Google Chrome. Otherwise, Mozilla Firefox is great.

    This from Halofromsue copied here:

    Well as I said in my last post, yesterday I disabled Shockwave in Plugins. However, as you know, you need shockwave and flash for most things... so I went back and set it to say "ASK to ACTIVATE" so when a web page loads and he needs, he will ask, and then I will either say 'Yes' or ' ' and that seems to work. So far, after three hours, it has collapsed and shockwave/flash all work fine when she needs.

    Me: it works!

  • Error ox5fff4b1b in Pogo Quest game?

    having a problem when playing pogo quest for the Ruby ring get 0x5fff4b1b error message and stops the game

    Hi no interestede.

    1. what browser you use to play the game?

    If you are using Internet Explorer (IE), then optimize IE and check the result.
    See How to optimize Internet Explorer

    For more assistance on Pogo games, see http://games-forum.pogo.com

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • I have Windows Vista and have recently received an error message about Adobe Flash Player Update Service 11.6 is this something I need to download?

    After having been online for some Germans, the error message about Adobe Flash Player Update Service 11.6 r602 constantly comes up.  Do I have to buy this update?

    HI Maria,

    Please go to the Microsoft Community Forums.
    After the description of the question, I understand that you want to install Adobe Flash Player Update Service 11.6.
    Let me go ahead and help you with the issue.
     
    I want to tell you that you don't have to buy this update, it is free to download. You can go ahead and install the update that is offered automatically.
     
    You can find out which version of Adobe Flash Player is currently installed on the computer:
    Check out the link:
    Note: Follow step 4 of this article to install the latest version of Adobe Flash Player.

    If the problem persists, you can display in the Community Forums of the Flash Player to get help:
    http://forums.Adobe.com/community/flashplayer
     
    Hope that answers your query. You can write back to us for other queries/problems related to windows and we will be happy to help you further.
  • Help error "script ActionScript 2.0 class may only define class or interface built."

    I get this error (scripts ActionScript 2.0 class may only define class or interface built) for lines:

    1956

    1978

    1991

    2023

    2116

    2152

    2157

    2162

    2166

    and many others. I'll post my code in a second post.

    I can't understand why I get this error and I don't know how to fix it.

    I scrolled to the bottom of your message to reach the button answer to tell you, nobody's going to read this code in a forum.

    but in the end, I noticed two things:

    1. you have code outside your class that raises this error and

    2. what looks you somebody elses code who usually, but not always, means that you do not understand that the decompiled code.

    Anway, I hope you understand that the code and can solve the problem, now that it's been highlighted in 1.  of course, there are probably more problems if it is decompiled code.

  • Windows 7 64 bit computer crashes when loading flash games or during video playback, forcing a manual reboot.

    My computer freezes completely at random times while playing the flash games or watching videos. In this case the mouse and keyboard stop working. If this happens during the video with sound, it makes a noise very loud signal blocked by speakers that continues until I restart the computer. The only way to recover is to manually restart the computer with the reset button.

    I tested different browsers to see if that was the problem, but it will happen in 3 I - IE, FF and Chrome.

    I allows Windows to update itself at will and he has recently updated the video drivers and the wireless mouse and keyboard drivers, but this problem has occurred before and after these updates. There is an update that is still not well, and is an update of Java. I don't know how to fix it or if it even is related.

    I checked the Windows error logs and Windows saves any errors before the Frost, so not obvious (to me) clues it. I tried searching for answers to my question, but forgive me, in this forum the language a bit above my head (Tip: simple answers, please).

    Hello

    Do you have an error message after the failure of the update of Java?

    Try the following steps:

    Step 1: Update the drivers for your chipset.

    Also uninstall and reinstall the display adapter drivers.

    Follow these steps:
    a. open the Manager of devices by clicking the Start button, click Control Panel, click System and security, and then, under system, clicking Device Manager. If you are
    you are prompted for an administrator password or a confirmation, type the password or provide confirmation.
    b. in the list of hardware categories, click on graphics cards and then double-click the device name.
    c. click on the driver tab and click on uninstall, and then follow the instructions. If you are prompted for an administrator password or a confirmation, type the password or provide
    confirmation.
    d. restart the computer.

    Refer to this link for help:
    http://Windows.Microsoft.com/en-us/Windows7/update-a-driver-for-hardware-that-isn ' t-work correctly

    Step 2: Put the computer in a clean boot state.

    Perform a clean boot on your computer to verify if a third-party program or service is the cause of the problem. With the help of the boot, we can isolate the program and disable it.

    Refer to this article for more information:
    How to troubleshoot a problem by performing a clean boot in Windows Vista or Windows 7:
    http://support.Microsoft.com/kb/929135

    Steps to perform a clean boot:
    a. click the ORB start on your desktop
    b. type msconfig in the search box and press ENTER.
    If you are prompted for an administrator password or a confirmation, type the password, or click on continue.
    c. in the general tab, click Selective startup.
    d. under Selective startup, clear the check box load startup items.
    e. click on the Services tab, select the hide all Microsoft Services check box and then click Disable all.
    f. click OK.
    g. When prompted, click on restart.

    NOTE: Please check that you start your computer in normal mode when you are finished troubleshooting. Followstep 7 of the article mentioned above.

    Kind regards
    Afzal Taher-Microsoft Support.
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • It is time to move on? (stop making flash games)

    Hello

    It's time to stop making flash games? am an amateur flash programmer, I used to work with ActionScript 2 and when I decided to start learning ActionScript 3, the artist that I used to work with told me that it is a useless task, it will be a waste of time and it is best to begin work with HTML5, flash cause will die sooner or later specially for mobile device (which is our main platform)

    so my question is,

    I had to move and stop learning AS3? cause I really found it a little bit 'disappointing' (i really like flash) and I saw that Unity3D built-in flash edition that make my opinion of a kinda weird friend.

    Thank you

    then, if you want to target the iOS devices, you must use the html, html5, javascript.

    If you do your animation with actionscript, it is time to stop the use of the flash.

    If you do a little of your animation using the timeline, you can still use flash to create animations flash cs6 (with the extension of the free createJS) and export these animations to be used with compatible with iOS browsers html.

  • Disable the Flash game in iPhone App

    Hello

    I did a some time ago flash game (ActionScript 2), and I was wondering what steps I should take to make an application?

    It is not very complex, it is a word game.

    I don't know where to start. I just need to be headed in the right direction.

    Thank you!

    you need flash cs5 and you need to convert it to as3, and you need a license from apple ($100).

  • Quiz Flash game

    Hello

    I take a quiz flash game as described in this tutorial. http://www.TU-world.com/Flash/flash_tutorial_08.php

    After anwsering, he goes to the next section, very simple. How is it possible that a response would be 50% of correct answers?

    Write the ActionScript for each button:

    on (release) {}

    gotoAndPlay("02");

    }

    To write the CORRECT answer:

    on (release) {}

    gotoAndPlay("02");

    Note ++;

    }

    Last image as a percentage = partition/4 * 100 + "%";

    Best regards

    Ekri

    I don't see where my code would be the problem.  If you only add 0.5 to the score and divide by 10 and multiply it by 100, you get 5%.  I have mentioned already, you need to see what is happening with your points and probably also your calculation of the final grade.

  • Using 'Help of Flash' to help make the flash game?

    Hello

    I noticed the other day in Flash, the 'Flash help (F1)' under 'Help' is distributed under licence "Creative Commons Attribution-Noncommercial-Share Alike 3.0 ported License.  The resources available on adobe.com in the Center of development of Flash is also registered with it.

    The status of the license:

    " You are free: .

    * except - to copy, distribute and transmit the work
    * to Remix - to adapt the work

    Under the following conditions:

    Paternity - You must cite the work in the manner specified by the author or licensor (but not in a way that would suggest that they support you or approve your use of the work).

    No commercial use - you may not use this work for commercial purposes.

    " Sharing the same - if alter you, transform or inspired this work, you can distribute work resulting only under license or similar to this one."

    -CC license

    I am trying to learn flash so that I can make flash games.  I intend to get their sponsored game portals and attach them to MochiAds - so, technically, it's commercial, Yes?

    This means so I can't use 'Help of Flash' or publications in the adobe Flash Developer Center to learn how to use the actionscripts?

    Of course I do not plan to outright copy - paste codes, but it would be nice if I could adapt and learn how things work.  Sometimes I'm stuck and I need a reference...  The last thing I want is to get into copyright problems.

    Sorry if this post is irrelevant.  I tried to put in days customer support there, but I feel that they have ignored me.

    All tips are welcome.

    Thank you

    Jane

    I'm not a copyright lawyer, but it does not seem plausible that you could copyright of basic information and wait then royalties if others use this basic information.

  • Is there anyway to import a flash game in a fla?

    I know that you can import videos, but there are anyway to import a swf flash game to a project?

    You can import a swf file but all actionscript in the swf file will fail.

  • No flash games load at all or are displayed.

    I had this problem with Firefox for the last couple months where no flash games load and appear as a blank screen. I tried update Javascript, Shockwave Flash and other things that I thought may be associated with the problem, but not good. I even tried turning off hardware exceleration and protected mode, AND using IE, but nothing helped. I think install Chrome, but I don't want to waste my time trying several solutions. Any help?
    I thought that it might help:

    • Adobe PDF plugin for Firefox and Netscape 10.1.14
    • Deploy Script NPRuntime plugin Library for Java (TM)
    • Next-generation Java plug-in 11.45.2 for Mozilla browsers
    • The plug-in allows you to open and edit files using Microsoft Office applications
    • Authorization plug-ins office for NPAPI browsers
    • Shockwave Flash 18.0 r0
    • Adobe Shockwave for Director Netscape plug-in, version 12.1.8.158
    • 5.1.31211.0
    • NPWLPG
    • Windows Presentation Foundation (WPF) plugin for Mozilla browsers

    Firefox Version 39
    Operating system: Windows Vista

    TheRedWall said

    He started the day, I've updated my security suite

    You should always check the updates in time.
    Many programs can be automatically configured to "Phone Home".

    This threat is useless now! Yay!

    I think you want to say "the problem is solved," Yes?
    Good day and safe surfing.

  • Losing flash game saves during the deletion of cookies.

    Since I've updated my firefox version 8.0.1, it free of my flash LSO every time I clear my cookies. That's fine if I wasn't playing flash games on sites like sudokuz.eu. Unfortunately, this translates to losing me my flash parties recorded whenever I have clear my cookies. I make a habit to erase any of my recent history; cookies, cache, etc. This change is destructive for me, because I want to keep some of my flash LSO all in compensation to all my web cookies. Is there some kind of workaround, or better yet, firefox will never erase flash LSO a separate option instead of just their agglutination with "cookies"?

    Don't use not clear recent history to clear cookies, but do it manually in the Cookie Manager.

    • Tools > Options > privacy > Cookies: "show the Cookies".
  • Re: Cannot use arrow keys when playing flash games

    Someone had this problem? The arrow keys on my keyboard do not work when I play flash games. Have downloaded the latest version of adobe, but not luck. Is it sounds like a hardware problem? What is the best way to thing to work around this problem?

    Thanks for any response.

    Post edited by: terrypal

    For me it has nothing to do with a malfunction of the equipment. If you can use the arrow keys in Windows or any application there absolutely no problem with the keyboard or something similar.

    Maybe is this result of the issue of the restriction of game control.

  • Pavilion P6120nl freeze when playing Flash game while

    Hi all

    I just bought my house 3 days ago p6210nl. But every time I play the game HP Games flash or http://www.games.co.id my computer got the gel after saveral minutes of play any flash game.

    Please help me and share your experience if you ever had the same problem and knows how to solve the problem. Thank you

    Kind regards

    Hi all

    Now I can manage the problem that causes my computer to FREEZE.

    I found that one of the software my computer HP thatmake some time when I played the game of freezing or watch a movie.

    So I just disabled the HP application in 'Startup' and 'Services '. It is already 2 weeks I can plaing a gmae and watch movie without GEL.

    For any other type of HP I have the same problem, try this:

    1 type "msconfig" in run or start search

    2. go in Services, check hide all Microsoft services

    3. just uncheck everything that isn't Microsoft services.

    4. go to start and tap on disable all the

    5 restart the computer

    6 and try activity that make you computer freezes or lock.

    7 activated one by one the services and startup and again repeat number 6.

    8 and turn it on continuously services or start making your computer freezes

    Hope that help.

Maybe you are looking for