Actionscript 3.0 Type Error 1010
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings flex error 1010 and policies of this site About Us Learn more about Stack Overflow actionscript 3.0 game programming university the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation as3 error 1010 term undefined 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
Typeerror Error #1010
only takes a minute: Sign up Error in Actionscript 3 - “TypeError: Error #1010: A term is undefined and has no properties.” up vote 0 down vote favorite I cannot for the life of me find any undefined term in this code. The compiler isn't returning a line, just an error that says, "TypeError: Error #1010: A term is undefined and has no properties. at Snakev1_fla::MainTimeline/update()" Here's the code: function update(e:Event):void { if (keys[Keyboard.RIGHT]) { directions["right"] = true; } if (keys[Keyboard.LEFT]) { directions["left"] = true; } if (keys[Keyboard.UP]) { directions["up"] = true; } if (keys[Keyboard.DOWN]) { directions["down"] = true; } var i:int = segments.length - 1; while (i > 0) { segments[i].y = locations[locations.length - 6][1]; segments[i].x = locations[locations.length - 6][0]; i--; } if (directions["right"]) { head.x += 5; } if (directions["left"]) { head.x -= 5; } if (directions["up"]) { head.y -= 5; } if (directions["down"]) { head.y += 5; } directions["up"] = false; directions["down"] = false; directions["left"] = false; directions["right"] = false; locations[locations.length][0] = head.x; locations[locations.length][1] = head.y; trace(locations); if (head.x < food.x + food.width / 2 + head.width / 2 && head.x > food.x - food.width / 2 - head.width / 2 && head.y > food.y - food.height / 2 - head.height / 2 && head.y < food.y + food.height / 2 + head.height / 2) { food.x = Math.random() * 490; food.y = Math.random() * 490; var body:part = new part(); body.x = locations[locations.length - 6][0]; body.y
ElementsAdobe Dreamweaver Adobe MuseAdobe Animate CCAdobe Premiere ProAdobe After EffectsAdobe IllustratorAdobe InDesignView all communitiesExplore Menu beginsMeet the expertsLearn our productsConnect with your peersError: You don't have JavaScript enabled. This tool uses JavaScript and much of it will not work correctly without it enabled. Please turn JavaScript back on and reload this page. Please enter a title. You can not post a blank message. Please type http://stackoverflow.com/questions/22459150/error-in-actionscript-3-typeerror-error-1010-a-term-is-undefined-and-has-n your message and try again. More discussions in ActionScript 3 All CommunitiesAdobe Animate CC - HomeActionScript 3 7 Replies Latest reply on Sep 28, 2014 2:00 AM by JacobDon123 TypeError: Error #1010: A term is undefined and has no properties. ~AMH~ May 4, https://forums.adobe.com/thread/631396 2010 11:40 AM Hello,Having a bit of trouble with some AS3. Any help you can provide would be very appreciated.Error:TypeError: Error #1010: A term is undefined and has no properties.Code:var soundReq:URLRequest = new URLRequest("audio05.mp3");var sound:Sound = new Sound();sound.load(soundReq);sound.addEventListener(Event.COMPLETE, onComplete);function onComplete(event:Event):void{ sound.play();}var mySoundChannel:SoundChannel;var isPlaying:Boolean = false;var pos:Number = 0;play_btn.addEventListener(MouseEvent.CLICK, play_);function play_(event:Event):void { if (!isPlaying) { mySoundChannel = sound.play(pos); isPlaying = true; }}pause_btn.addEventListener(MouseEvent.CLICK, pause_);function pause_(event:Event):void { if (isPlaying) { pos = mySoundChannel.position; mySoundChannel.stop(); isPlaying = false; }}stop_btn.addEventListener(MouseEvent.CLICK, stop_);function stop_(event:Event):void { if (mySoundChannel != null) { mySoundChannel.stop(); pos = 0; isPlaying = false; }}var rectangle:Rectangle = new Rectangle(0,0,48,0);var dragging:Boolean = false;volume_mc.mySlider_mc.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);function startDragging(event:Event):void{ volume_mc.mySlider_mc.startDrag(false,rectangle); dragging = true; volume_mc.mySlider_mc.addEventListener(Event.ENTER_FRAME, adjustVolume);}function adjustVolume(event:Event):void { var myVol:Number = volume_mc.mySlider_mc.x / 48; var mySoundTransform:SoundTransform = new SoundTransform(myVol); if (mySoundChannel != null) { mySoundChannel.soundTransform = mySoundTransform; }}stage.addEventL
Error 1010....what is undefined? If this is your first visit, be sure to check out the FAQ by clicking http://board.flashkit.com/board/showthread.php?732321-Error-1010-what-is-undefined 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 error 1010 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 a button symbol on stage with an instance name of actionscript 3.0 type 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 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