As3.0 Error #1010
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions
As3 Error 1010 Term Undefined
you might have Meta Discuss the workings and policies of typeerror error #1010 this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions 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 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 start
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions 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 them; http://stackoverflow.com/questions/16639211/as3-error-1010 it only takes a minute: Sign up AS3 - Error #1010: A term is undefined and has no properties up vote 0 down vote favorite I keep getting the following error: TypeError: Error #1010: A term is undefined and has no properties. at FinalGame_fla::MainTimeline/pulse() [FinalGame_fla.MainTimeline::frame1:183] I have checked the code multiple times and can't seem to figure out what http://stackoverflow.com/questions/29595030/as3-error-1010-a-term-is-undefined-and-has-no-properties is wrong because the high score table still displays the correct entries. Below is the code showing the variables defined and the code itself which is causing the problem. Defining Variables & Arrays var playerName:String="Anonymous"; var allScores:Array = new Array(); var nameBoxes:Array = new Array(mcScoreboard.player1, mcScoreboard.player2, mcScoreboard.player3, mcScoreboard.player4, mcScoreboard.player5); var scoreBoxes:Array = new Array(mcScoreboard.score1, mcScoreboard.score2, mcScoreboard.score3, mcScoreboard.score4, mcScoreboard.score5); var sr:SharedObject=SharedObject.getLocal("previousResults"); if (sr.data.allScores!=undefined) { allScores = sr.data.allScores; } Function for displaying high scores if (livesLeft==0) { stopGame(); mcScoreboard.visible=true; var playerScore:Object = new Object(); playerScore["name"] = playerName; playerScore["score"] = totalScore; allScores.push(playerScore); sr.data.allScores = allScores; sr.flush(); allScores.sortOn("score", Array.DESCENDING|Array.NUMERIC); for (var i=0;i 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: http://board.flashkit.com/board/showthread.php?732321-Error-1010-what-is-undefined click the register link above to proceed. To start viewing messages, select the http://v-resheno.ru/468828-error-1010-actionscript-3 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 error #1010 Posts Visit Homepage Senior Member Join Date Jul 2000 Posts 373 Error 1010....what is undefined? This is really strange. I've got 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: as3.0 error #1010 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 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 мне подсказку. Почему я получаю ошибки # 1010.во-Вторых, что я, не видя, что и так очевидно? Жаль, что я пошел на это с более крепкий фундамент в actionscript 3, но я читаю и стараюсь изо всех сил. ЧТО я ВИЖУ, -знак доллара указывает переменная или массив "$чисел" -импорт flash.utils.Dictionary; "указывает на ассоциативный строка" -Ошибка #1010: В срок не определен, и не имеет свойств -это ассоциативный строка обманывают меня? "может быть, я не ценности, это и ежу понятно" -являются собственностью своих символов устанавливаются неправильно? numbers.fla -MovieClip с именем "mc-NumberImage" Класс "NumberImage"-Растровые изображения "number_0.jpg к number_9.jpg"NumberDocumentClass.as "NumberDocumentClass"package { import flash.display.Sprite; import flash.utils.Timer; import flash.events.TimerEvent; public class NumberDocumentClass extends Sprite { private var timer:Timer = new Timer(10); private var count:int = 0; private var fcount:int = 0; private var numbers:NumbersView; public function NumberDocumentClass() { timer.addEventListener(TimerEvent.TIMER, incrementCounter); timer.start(); numbers = new NumbersView(); addChild(numbers); } function incrementCounter(event:TimerEvent) { count++; fcount=int(count*count/1000);//starts out slow... then speeds up numbers.setTime(formatCount(fcount)); } function formatCount(i:int):String { return ("000000000" + i).substr(-9, 9); } } } NumbersView.aspackage { import flash.display.DisplayObject; import flash.display.MovieClip; import flash.utils.Dictionary; import flash.events.Event; import caurina.transitions.Tweener; public class NumbersView extends MovieClip { private var _listItems:Array = new Array(); public function NumbersView() { var item:NumberImage; for (var i:Number = 0; i < 9; i++) { item = new NumberImage(); addChild(item); item.x = i