As3 Error 1180
Contents |
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 actionscript error 1180 more about Stack Overflow the company Business Learn more about hiring developers or posting as3 error 1180 addframescript ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community error 1046 as3 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 Flash as3 Error 1180 that I don't understand up vote
As3 Error 1120
0 down vote favorite So, I got an error 1180 message with the following code: package objects.moving.dudes { import flash.utils.Timer; import objects.moving.Moving; import misc.MoveTimer; public class Dude extends Moving { public function Dude() { addEventListener(Event.ADDED_TO_STAGE, stageAddHandler); } public var theMoveTimer; public function stageAddHandler(e:Event) { addEventListener(KeyboardEvent.KEY_DOWN, keyPressed); removeEventListener(Event.ADDED_TO_STAGE, stageAddHandler); } public function keyPressed(e:KeyboardEvent) { theMoveTimer = new MoveTimer(e.keyCode); } } } It said, "call to a possibly undefined method as3 error 1180 dispatchevent MoveTimer". Here is the class MoveTimer: package misc { import flash.utils.Timer; class MoveTimer { private const TIMER_LENGTH = 500; public function MoveTimer(myKeyCode:int) { keyCode = myKeyCode; } public var keyCode:int; public var timer = new Timer(TIMER_LENGTH); } } I've looked at several different possible solutions to Error 1180, and none of them were applicable/worked for this one. Does anyone know why I'm getting this error? EDIT: I made some mistakes while transferring my code to stackoverflow, and I have made changes to make it look more like my actual code. actionscript-3 flash share|improve this question edited Nov 19 '13 at 6:18 asked Nov 11 '13 at 6:52 John L. 957 add a comment| 3 Answers 3 active oldest votes up vote 1 down vote as i see you forgot to type your variable theMoveTimer as MoveTimer and the MoveTimer class isn't imported in your Dude class. Try to change your declaration for theMoveTimer to: public var theMoveTimer:MoveTimer; and add the following line to your imports: import misc.MoveTimer; share|improve this answer answered Nov 11 '13 at 7:55 Binou 803137 Sorry, I did a bad job of transferring my code. I tried to take out everything that wasn't pertinent to the question, a
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings as3 error 1009 and policies of this site About Us Learn more about Stack Overflow
As3 Error 1067
the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation
As3 Error 1180 Addchild
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 http://stackoverflow.com/questions/19900476/flash-as3-error-1180-that-i-dont-understand only takes a minute: Sign up 1180 error:Call to a possibly undefined method addFrameScript in as3 up vote 3 down vote favorite package { import flash.display.Sprite; import flash.utils.*; public class SetTimeoutExample extends Sprite { private var delay:Number = 1000; // delay before calling myDelayedFunction public function SetTimeoutExample() { var intervalId:uint = setTimeout(myDelayedFunction, delay,stopTime); } public function myDelayedFunction():void { if(arguments[0] ==fk.playheadTime) http://stackoverflow.com/questions/3116541/1180-errorcall-to-a-possibly-undefined-method-addframescript-in-as3 {fk.pause();} } } }//this is my document class named SetTimeoutExample.as import flash.net.URLLoader; import fl.video.*; import flash.utils.getTimer; import flash.events.Event; fk.autoPlay = false; var myLoaderInfo=new Object(); myLoaderInfo.myParamsLoaded = false; myLoaderInfo.loaderComplete = loaderComplete; this.loaderInfo.addEventListener(Event.COMPLETE, myLoaderInfo.loaderComplete); myLoaderInfo.useParams = useParams; var myParams:Object = new Object(); var myParamsLoaded:Object = new Object(); function loaderComplete(myEvent:Event) { this.myParams = this.loaderInfo.parameters; this.myParamsLoaded = true;//Parametrelerin yuklendigine emin olduk. this.useParams(); fk.play(src); } var src:String; var startTime:Number; var stopTime:Number; function useParams() { var obj:Object = new Object(); var j; for (j in this.myParams) { if (j == "url") { src = this.myParams[j]; } else if (j=="bas") { startTime = int(this.myParams[j]); } else { stopTime = int(this.myParams[j]); } } } fk.addEventListener(VideoEvent.READY, bitti); function bitti(eventObject:VideoEvent):void { fk.seekSeconds(startTime); } //this is my player.fla hi,i get this 1180 error in as3.how can i solve this?i google it but i can't apply the solutions to my my code.i'm really new to as3.thanks for any help. flash actionscript-3 share|improve this question asked Jun 25 '10 at 8:22 merve_89 24116 and some forum says extend MovieClip but when i try this i get some error again. &nd