As3 Error 1083 Package Is Unexpected
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; it only takes a minute: Sign up Type 1083: Syntax error: package is unexpected up vote 1 down vote favorite So, I got this .as file that is called, let say, class A. class A inside has other 2 classes, class B and class C, and the only class that is inside a package is class A. And it throws that error. I downloaded this as an example, and it should work, however Flash Builder 4.6 doesn't like it. The structure of the as file is like this: imports variables class B class C package public class A /package Btw, I'm using Flash Builder not Flash CC. Update, posting code: import com.adobe.serialization.json.JSON; import com.shephertz.appwarp.WarpClient; import com.shephertz.appwarp.listener.ConnectionRequestListener; import com.shephertz.appwarp.listener.NotificationListener; import com.shephertz.appwarp.listener.RoomRequestListener; import com.shephertz.appwarp.listener.ZoneRequestListener; import com.shephertz.appwarp.messages.Chat; import com.shephertz.appwarp.messages.LiveResult; import com.shephertz.appwarp.messages.LiveRoom; import com.shephertz.appwarp.messages.LiveUser; import com.shephertz.appwarp.messages.Lobby; import com.shephertz.appwarp.messages.MatchedRooms; import com.shephertz.appwarp.messages.Move; import com.shephertz.appwarp.messages.Room; import com.shephertz.appwarp.types.ResultCode; import flash.utils.ByteArray; var APIKEY:String = "key"; var SECRETEKEY:String = "secretkey"; var Connected:Boolean = false; var INITIALIZED:Boolean = false; var client:WarpClient; var roomID:String; var State:int = 0; var User:String; class connectionListener implements Conne
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 http://stackoverflow.com/questions/18473710/type-1083-syntax-error-package-is-unexpected 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 ActionScript 3 Error: 1083: Syntax http://stackoverflow.com/questions/36235236/actionscript-3-error-1083-syntax-error-package-is-unexpected error: package is unexpected up vote 1 down vote favorite Hi I'm currently learning how to use Flash so I'm creating a colouring book as a project I'm just having trouble with my code though. The Code I've written is: import coloring; PrevBtn.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_14); function fl_ClickToGoToAndStopAtFrame_14(event:MouseEvent):void { gotoAndStop(40); } HomeBtn.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_11); function fl_ClickToGoToAndStopAtFrame_11(event:MouseEvent):void { gotoAndStop(10); } NextBtn.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_13); function fl_ClickToGoToAndStopAtFrame_13(event:MouseEvent):void { gotoAndStop(20); } HelpBtn.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_31); function fl_ClickToGoToAndStopAtFrame_31(event:MouseEvent):void { gotoAndStop(45); } Any help would be majorly appreciated. Thanks in advance! **UPDATE: So I have created coloring.as and now import it in my code but I am now getting a further error when I get to my colouring sheet which reads: TypeError: Error #1009: Cannot access a property or method of a null object reference. at laurenBurke/frame15() at flash.display::MovieClip/gotoAndStop() at laurenBurke/fl_ClickToGoToAndStop
View New Content Science Forums, The Original Members Forums Chat More Science Forums → Sciences → Computer Science Javascript Disabled Detected You currently have javascript disabled. Several functions may not work. Please re-enable javascript to access full functionality. http://www.scienceforums.net/topic/53194-as3-error-1083-syntax-error-else-is-unexpected-need-help/ AS3 Error 1083: Syntax error: else is unexpected NEED HELP Started by astro geek, Dec 04, 2010 Please log in to reply 2 replies to this topic #1 astro geek astro geek Lepton Members 5 http://flash.bigresource.com/actionscript-3-Keep-getting-a-Package-is-Unexpected-error-in-Flash-CS5-DiIpqpqbL.html posts LocationAustralia, Melbourne Posted 4 December 2010 - 07:12 AM I am having trouble with my code, the code is: { var num1:Number = 0.5; if(num < num1) mc_enemy.y += 20 num = Math.random() else mc_enemy.y as3 error -= 20 num = Math.random() } And it shows the error, "Error 1083: Syntax error: else is unexpected", Does anybody have any suggestions? 0 Back to top #2 skyhook skyhook Quark Senior Members 128 posts Posted 4 December 2010 - 03:57 PM I'd say my programming skills sucks, don't listen to me, but just to say that you can maybe take a look at the if else statement structure, maybe as3 error 1083 you can include { } and ; at some parts. http://www.adobe.com...tionary196.html Edited by skyhook, 4 December 2010 - 03:57 PM. 0 Back to top #3 Cap'n Refsmmat Cap'n Refsmmat Mr. Wizard Administrators 11,755 posts LocationTexas Posted 4 December 2010 - 04:23 PM Indeed. Your if() has two lines after it, but no braces, so only the first line is considered to be inside the if(). Then, a couple of lines later, the parser sees an else, but the if() has already ended. You need to do this: { var num1:Number = 0.5; if(num < num1) { mc_enemy.y += 20 num = Math.random() } else { mc_enemy.y -= 20 num = Math.random() } } 0 Cap'n RefsmmatSFN Administrator Back to top Back to Computer Science 2 user(s) are reading this topic 0 members, 2 guests, 0 anonymous users Reply to quoted postsClear Science Forums → Sciences → Computer Science Privacy Policy ScienceForums.Net Forum Rules · English (USA) English (USA) English (USA) (COPY) Help Community Forum Software by IP.Board 3.4.9 Sign In Use Facebook Use Twitter Need an account? Register now! Username Forum Password I've forgotten my password Remember me This is not recommended for shared computers Sign in anonymously Don't add me to the active users list Privacy Policy
3 in Flash CS5. It's the one at the bottom of the page here: [URL] I'm putting the ActionScript into the frame I want to play the video in. When I try to test it, I keep getting the following error message: "1083: Syntax error: package is unexpected" So I try taking the "package { }" code out and running it again. Then this error pops up: "The public attribute can only be used inside a package" I tried removing all the code inside the package and I still get the first error. View 1 Replies Similar Posts: ActionScript 3.0 :: As3 Syntax Error / Package Is Unexpected Dec 10, 2009 I'm new to AS3, I am trying to convert my as2 to as3 for my movie and I am getting this error:Line 1: 1083: syntax error: package is unexpected.[code] View 1 Replies ActionScript 3.0 :: 1083 Syntax Error: Package Is Unexpected Dec 10, 2009 So I'm new to AS3, I am trying to convert my as2 to as3 for my movie and I am getting this error: Line 1: 1083: syntax error: package is unexpected[Code]..... View 2 Replies Actionscript 3 :: Keep Getting A "Package Is Unexpected" Error In Flash CS5? Mar 24, 2005 I'm trying to use one of Adobe's examples to put a video player in my Flash application using ActionScript 3 in Flash CS5. It's the one at the bottom of the page here:I'm putting the ActionScript into the frame I want to play the video in. When I try to test it, I keep getting the following error message:"1083: Syntax error: package is unexpected"So I try taking the "package { }" code out and running it again. Then this error pops up:"The public attribute can only be used inside a package"I tried removing all the code inside the package and I still get the first error View 3 Replies ActionScript 3.0 :: What Means "package Is Unexpected" ? Jun 14, 2009 What means "package is unexpected" in AS 3? View 2 Replies ActionScript 3.0 :: Compile Package File - Error: A File Found In A Source-path Must Have The Same Package Structure? Dec 19, 2011 I have an actionscript file,it has a package name,it locate C:demo directory,like follows:package demo{ import flash.display.*; public class ABC extends Sprite{[code]............Then I compile above code like following command,but it raise following error:C:>mxmlc demoABC.asLoading configuration file C:sdkframeworksflex-config.xmlC:demoABC.as: Error: A file found in a source-path must have the same package structure '', as the definition's pa