actionscript 3 - AS3 Error 1061 Reference with Static Type -


I am new to AS3, and am trying to create a dragable element, however, I was getting a 1061 error Is it, and I do not know why, because I'm pretty sure that I do not have any spelling errors or not. Can anyone tell me what I'm doing?

This is my code:

  package {import flash.display *; Import flash.events *; Import flash.geom.Rectangle; Public Script Script Module {Public Priority Value: Number; Private var max: number; Private Wearer Min: Number; Public Function Dragable () {min = erhu_mc.y; Max = erhu_mc.height - Aru_H3_btn height; Erhu_H3_btn.addEventListener (MouseEvent.MOUSE_DOWN, DragHandle); } Function Drag Handle (Event: Mouse Event): Zero {Erhu_H3_btn.startDrag (new rectangle, false, (0, min, 0, max)); Stage.addEventListener (MouseEvent.MOUSE_UP, StopDragging); } Stoppracing (Event: Mouse Event): Zero {Erhu_H3_btn.stopDrag (); Platform .removeEventListener (MouseEvent.MOUSE_UP, StopDragging); }}}}    

There are 2 problems with your current class. (<, Min, 0, max)); should be: Erhu_H3_btn.startDrag (wrong, new rectangle (0, minimum, 0, max));

  • You can not reference objects from a classroom directly from the timeline. For example, tap the following returns:

    import flash.display You will either need to pass the context of the object, or reference to the object. *; Public class script movie clip (public function script) extends (trace);}

    I have copied and modified your code so that it is a frame Work on. Flash import flash.display *; Import flash.events. *; Import flash.geom.Rectangle; Var value: number; var max: number; var min: number; drag Qualified (); Function Dragable () {min = Erhu_H3_btn.y; Max = Aru_H3_btn.i + = 100; Erhu_H3_btn.addEventListener (MouseEvent.MOUSE_DOWN, Draghendal);} Function Draghendal (Ive String.addEventListener (MouseEvent.MOUSE_UP, StopDragging);} Stop Stop Writing (Event: Mouse Event): Zero {Erhu_H3_btn}: Zero {Erhu_H3_btn.startDrag (wrong, new rectangle (0, min, 0, max)); StopDrag (); Platform .removeEventListener (MouseEvent.MOUSE_UP, StopDragging);}

    Hope this helps.

  • Comments

    Popular posts from this blog

    php - PDO bindParam() fatal error -

    logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

    java - Why my included JSP file won't get processed correctly? -