Flash Error 1010 Actionscript 3
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the
A Term Is Undefined And Has No Properties As3
workings and policies of this site About Us Learn more about Stack as3 error 1010 term undefined Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions typeerror error #1010 Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join
As3 Typeerror: Error #1010
them; it only takes a minute: Sign up AS3 Error #1010 up vote 0 down vote favorite Im taking an AS3 course and on one of the lessons, i get this on the output of my program: TypeError: Error #1010: A term is undefined and has no properties. at Main() this is my code: package { import flash.display.MovieClip; import flash.events.MouseEvent; public class Main extends MovieClip { var startPage:StartPage; var hillPage:HillPage; var lakePage:LakePage; public function Main() { startPage = new StartPage(); hillPage = new HillPage(); lakePage = new LakePage(); addChild(startPage); //Add event listeners startPage.hillButton.addEventListener(MouseEvent.CLICK, onHillButtonClick); startPage.pondButton.addEventListener(MouseEvent.CLICK, onLakeButtonClick); } //Event handlers function onHillButtonClick(event:MouseEvent):void { addChild(hillPage); removeChild(startPage); } function onLakeButtonClick(event:MouseEvent):void { addChild(lakePage); removeChild(startPage); } } } if you have any help please post it, its driving me crazy. oh and the buttons on my file itself wont work for some odd reason, as its basically the same exact code as the lesson. Thank You actionscript-3 flash-cs5 share|improve this question asked May 19 '13 at 20:33 OmegaDan 523 add a comment| 1 Answer 1 active oldest votes up vote 0 down vote accepted Basically that means that you are trying to access an invalid parameter. Most likely either or both of startPage.hillButton & startPage.pondButton does not exist. It could also be that you cant perform addEventListener on those items. share|improve this answer answered May 19 '13 at 22:09 Daniel MesSer 1,0781613 Thanks, that was the probl
Error 1010....what is undefined? If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 20 of 20 Thread: Error 1010....what is undefined? Tweet Thread Tools Show Printable Version Email this Page… Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 05-23-2007,05:24 PM #1 databell View Profile View Forum Posts Visit Homepage Senior Member Join Date Jul 2000 Posts 373 Error 1010....what is undefined? This is really strange. I've got http://stackoverflow.com/questions/16639211/as3-error-1010 a button symbol on stage with an instance name of aboutUs_btn. My code on my AS layer is: this.aboutUs_btn.addEventListener(MouseEvent.MOUSE _DOWN, about); function about(evt:MouseEvent):void { this.wipe_mc.gotoAndPlay(2); this.gotoAndStop("history"); head.unload(); } And then I test the movie and get this error and it makes no sense to me. TypeError: Error #1010: A term is undefined and has no properties. at main1_fla::MainTimeline/about() What's weird is I tried this in another .fla and it didn't bring up the error. That makes no http://board.flashkit.com/board/showthread.php?732321-Error-1010-what-is-undefined sense. They've both got Publish Settings for AS3/FL9 Adam Bell dzign@datatv.com -- Over 90% of all websites suck...... Join the minority. Reply With Quote 05-23-2007,05:50 PM #2 senocular View Profile View Forum Posts Visit Homepage half as fun, double the price Join Date Feb 2002 Location San Francisco, CA (USA) Posts 4,361 trace your values and see if any come up undefined (or use the debugger to check out their values during playback) Reply With Quote 05-23-2007,06:09 PM #3 databell View Profile View Forum Posts Visit Homepage Senior Member Join Date Jul 2000 Posts 373 I don't know how to do that. Adam Bell dzign@datatv.com -- Over 90% of all websites suck...... Join the minority. Reply With Quote 05-24-2007,04:44 AM #4 tonypa View Profile View Forum Posts Visit Homepage Senior Member Join Date Jul 2001 Location Estonia Posts 8,227 Most likely you do not have movie clip with instance name "wipe_mc" on stage when code is run. My games, Tile based tutorials, Vectors, Latest update - fastazzi Reply With Quote 05-24-2007,08:45 AM #5 cancerinform View Profile View Forum Posts Visit Homepage Mod Join Date Mar 2002 Location press the picture... Posts 13,448 Forget what I originally wrote. It is too early in the morning But what you can do is put a trace of an object at a certain point in the script. If your error occurred after th
Retrieving Data from Server... Run-Time Errors Properties | Properties | Constructor | Methods | Global Constants | Events | Styles | Skin Parts | Skin States | Effects | Constants | Global http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/runtimeErrors.html Functions | Functions | Interfaces | Classes | Examples Classes x The following errors can occur at run time. Run-time type checking occurs in ActionScript 3.0 whether you compile in strict mode or warning mode.CodeMessageDescription1000The system is out of memory. Flash needs more memory to compile your code than your system has available. Close some of the applications or processes running on your system. 1001The method %m is not implemented.1002The error 1010 precision argument must be between 0 and 20; got %d You specified a value less than 0 or greater than 20 for the precision argument of a method or property. Pass a value between 0 and 20 as a precision argument. 1003The radix argument must be between 2 and 36; got %d You passed a value less than 2 or greater than 36 for the radix argument of a flash error 1010 method or property. Pass a value between 2 and 36 as a radix argument. 1004A method of '%t' was invoked on an incompatible object. You tried to call a method that is not available to the specified object.This error occurs when you have copied a prototype function from one object to another, and then invoked it, but the target object is not the same type as the original object. Ensure that the target object and original object are the same type. See ECMAScript edition 3 chapter 15 for more details. 1005Array index is not an integer (%f) You tried to access a member of an array using an index value that is not an integer. Pass only integers as index values for arrays. 1006Call attempted on an object that is not a function. This error occurs when you attempt to call a function that does not exist. Make sure that you are calling the correct function, and that the API has not changed from ActionScript 2.0. Also, make sure that you are using the correct object. For example, you will see this error when you use the following code (because the last line mistakingly calls the variable big instead of blg): var blg:String = "foo"; var big:S