Error Package Cannot Be Nested
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 package cannot be nested as3 this site About Us Learn more about Stack Overflow the company Business packages cannot be nested flash Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask
1037 Packages Cannot Be Nested
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
Actionscript 3 Packages Cannot Be Nested
up What does “Packages cannot be nested” in AS3 mean? up vote 0 down vote favorite I got the complie error "Packages cannot be nested". What does it mean, and how do I fix it? actionscript-3 flash nested package share|improve this question asked Dec 19 '13 at 20:18 user3040958 125 add a comment| 1 Answer 1 active oldest votes up vote 0 down as3 packages vote While you can have more than one Class, you should only have a single Package in each of your .as files. Check your .as files to see if you have more than one instance of Package. Update based on OP's comments: You cannot use Packages or Classes on the timeline. You need to place that code in an external file and link to it either by making it your Document Class or by assigning it to a symbol in your library via the Class property in the properties panel. share|improve this answer edited Dec 21 '13 at 20:11 answered Dec 19 '13 at 21:11 Marcela 3,5231819 There was only one. I added the script directly to the file instead of importing/including. –user3040958 Dec 20 '13 at 17:06 What do you mean when you say you "added the script directly to the file"? Do you mean that you copied/pasted code? If so, it's possible that the file you created (depending on the IDE you're using) automatically created a package for you and when you pasted the code you added a second package
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 http://stackoverflow.com/questions/20690888/what-does-packages-cannot-be-nested-in-as3-mean them; it only takes a minute: Sign up Packages cannot be nested an error in flash cs6 up vote 0 down vote favorite It's my first time coding in flash, I am creating a login form wherein when user login in flash the record will automatically stored in the database. I am currently testing the button submit, but there http://stackoverflow.com/questions/30843681/packages-cannot-be-nested-an-error-in-flash-cs6 was an error saying "packages cannot be nested". Hope you could help me. package actions { import flash.display.MovieClip; import flash.events.*; public class main extends MovieClip { public function main ():void { submit_button.buttonMode = true; submit_button.addEventListener(MouseEvent.MOUSE_DOWN, checkLogin); username.text = ""; password.text = ""; } public function checkLogin (e:MouseEvent):void { trace("submission success"); } } } actionscript-3 flash share|improve this question edited Jun 15 '15 at 12:00 Vesper 14.9k22047 asked Jun 15 '15 at 11:11 LEE 205 add a comment| 1 Answer 1 active oldest votes up vote 0 down vote accepted "Packages cannot be nested" means that you have an AS file that literally includes two blocks marked package. An example of nesting: package a { ... package b { .... } } You need to revise your code so that no file contains nested package blocks. This isn't an error in programming, but rather a markup error (that potentially hides a lot of uneven braces or other types of copy&paste mixups). UPDATE: A timeline code is declared as being inside a package, so if you are try
Frames Image Optimizer FavIcon Generator FavIcon Editor new Animated Gif Email Riddler .htaccess Password .htaccess Banning Gradient Image Button Maker Ribbon Rules List Scrubber http://www.dynamicdrive.com/forums/showthread.php?30769-packages-cannot-be-nested-error-(1037) Tool DD Whois Service Register Help Remember Me? Advanced Search DD Home Forum New Posts FAQ Calendar Forum Actions Mark Forums Read Quick Links Today's Posts View Site Leaders What's New? Blogs https://www.experts-exchange.com/questions/26518046/ActionScript-Syntax-Error-Packages-Cannot-be-Nested.html Forum General Coding Flash packages cannot be nested error (1037) If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have cannot be 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 6 of 6 Thread: packages cannot be nested error (1037) Thread Tools Show Printable Version Subscribe to this Thread… Search Thread Advanced Search 03-25-2008,05:14 AM #1 evan View Profile View cannot be nested Forum Posts Private Message View Blog Entries Regular Coders Join Date Jan 2008 Location Near Chicago Posts 247 Thanks 105 Thanked 2 Times in 2 Posts packages cannot be nested error (1037) I am practicing from a book and places the script in a keyframe in a designated script layer I have gone over it a few times and can't figure out what 1037: packages cannot be nested means. here is the code: package { import flash.display.Sprite; import flash.events.Event; public class Velocity extends Sprite { private var _sprite:Sprite; private var _vx:Number = 3; public function Velocity () { _sprite =new Sprite(); _sprite.graphics.beginFill(0x0000ff, 100); _sprite.graphics.drawCircle(0, 0, 25); _sprite.graphics.endFill(); _sprite.x =50; _sprite.y =100; addChild (_sprite); addEventListener(Event.ENTER_FRAME, onEnterFrame); } public function onEnterFrame(event:Event):void{ _sprite.x += _vx; } } } If it works it will create a shape and animate it. Any suggestions? Reply With Quote 04-02-2008,03:34 AM #2 Medyman View Profile View Forum Posts Private Message View Blog Entries Elite Coders Join Date Mar 2007 Location Currently: New York/Philadelphia Posts 2,735 Thanks 3 Thanked 519 Times in 507 Posts Did you declare a package in the code on the Actions tab i
for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Ask a Question Ask for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Expand Search Submit Close Search Login Join Today Products BackProducts Gigs Live Careers Vendor Services Groups Website Testing Store Headlines Experts Exchange > Questions > ActionScript: Syntax Error/Packages Cannot be Nested Want to Advertise Here? Solved ActionScript: Syntax Error/Packages Cannot be Nested Posted on 2010-10-04 Adobe Flash 1 Verified Solution 3 Comments 675 Views Last Modified: 2013-11-11 I would like to use the attached ActionScript to encode and decode text. When I try to include the code I get two errors: Syntax Error Packages Cannot be Nested base62.fla base62.as 0 Question by:hankknight Facebook Twitter LinkedIn Google LVL 19 Best Solution bymoagrius you don't import like that... since the package has no package name, as long as it's in the same folder as the FLA, it'll be imported automatically. you also are declaring your variable name the Go to Solution 3 Comments LVL 19 Overall: Level 19 Adobe Flash 18 Message Expert Comment by:moagrius2010-10-04 you don't use #include for packages in AS3. remove that line from the timeline actions. normally, a class like that would use static members, but apparently that's not the case, so you'd just create an instance and use it's methods that way. var base62:Base62 = new Base62(); trace(base62.toNumber("whatever")); 0 LVL 16 Overall: Level 16 Adobe Flash 1 Message Author Comment by:hankknight2010-10-04 Thanks, but how should I include a packages in AS3? My code does not work. It should put the Base62 value for 'xyz' in the Dynamic Text named "encodedMessage" But I don't think that the ActionScript is even being loaded. import 'base62.as'; var Base62:Base62 = new Base62(); encodedMessage.text=Base62.toNumber("xyz"); Select all Open in new window 0 LVL 19 Overall: Level 19 Adobe Flash 18 Message Accepted Solution by:moagrius2010-10-04 you don't import like that... since the package has no package name, as long as it's in the same folder as the FLA, it'll be imported automatically. you also are declaring your variable name the same name as the class, which is illegal. use this: var base62:Base62 = new Base62(); encodedMessage.text=base62.toNumber("xyz"); notice the lowercase "b" will differentiate it from the class name itself.