ActionScript 3 Error 1078: Label must be a simple identifier

May 20, 2012   Programming   Nick Vogt   Comments (1)
Please note that this post is over a year old and may contain outdated information.
This error is often caused by the accidental use of a colon (:) to terminate a statement instead of a semi-colon (;). The error report should give you the error location.

1078: Label must be a simple identifier.
Share This Post

Comments (1)

Maarten Jones   Jun 21, 2012
plz can anyone help me with this everything looks fine but i cant see the problem in this action scrip actionscript follows package { import flash.display.MovieClip; import flash.events.Event; import flash.events.MouseEvent; import flash.geom.Rectangle; public class main extends MovieClip { private var bounds:Rectangle; private var startX:Number; private var contentX:Number; public function main():void; { addEventListener(Event.ADDED_TO_STAGE, init):void; } private function init(e:Event):void { removeEventListener(Event.ADDED_TO_STAGE, init); scrollHandle.addEventListener(MouseEvent.MOUSE_DOWN, drag); startX = scrollHandle.x; contentX = scrollingContent.x; bounds = new Rectangle((scrollHandle.x, scrollHandle.y, scrollBar.width - scrollHandle.width + 4),0); } private function drag(e:MouseEvent):void { scrollHandle.startDrag(false, bounds); scrollHandle.gotoAndStop(2); scrollHandle.removeEventListener(MouseEvent.MOUSE_DOWN, drag) addEventListener(MouseEvent.MOUSE_UP, stopdrag); addEventListener(Event.ENTER_FRAME, moveBox); } private function stopdrag(e:MouseEvent):void { scrollHandle.stopDrag(); scrollHandle.gotoAndStop(1); scrollHandle.addEventListener(MouseEvent.MOUSE_DOWN, drag) removeEventListener(MouseEvent.MOUSE_UP, stopdrag); removeEventListener(Event.ENTER_FRAME, moveBox); } private function moveBox(e:Event):void { scrollingContent.x = -((contentX - startX) + scrollHandle.x) * ((scrollingContent.width - masker.width) / (scrollBar.width - scrollHandle.width)); } } }
Share This Post
H3XED © Nick Vogt   RSS   Policies   Twitter