Error 1013 As3
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
Actionscript 3 Error 1013
this site About Us Learn more about Stack Overflow the company Business Learn 1013 the private attribute may be used 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 Flash AS3 Error: Line 48 1013: The private attribute may be used only on class property definitions up vote 0 down vote favorite I'm a beginner of the flash as3. I'm trying to create a game but in the beginning of my game project. A error comes. This is the error --> Line 48: 1013: The private attribute may be used only on class property definitions. I don't know what is the problem, is anyone else know what is this problem if anybody know please tell me. This is the code: package { import flash.display.Sprite; import flash.events.MouseEvent; public class Main extends Sprite { public function Main() { // variables and constants const NUMBER_OF_TILES:uint = 20; const TILES_PER_ROW:uint = 5; var tiles:Array=new Array(); var tile:tile_movieclip; // end of variables and constants for (var i:uint=0; i 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 http://stackoverflow.com/questions/22300305/flash-as3-error-line-48-1013-the-private-attribute-may-be-used-only-on-class-p million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up “The private attribute may be used only on class property definitions.” FlashDevelop + Adobe Flex SDK + Debug_nape.swc up vote 2 down vote favorite There's already a question on this, but it doesn't exactly answer my question, http://stackoverflow.com/questions/13481395/the-private-attribute-may-be-used-only-on-class-property-definitions-flashdev as I'm very new to flash. When I compile my code, it gives me an error on line 69+74, on the 'p' in the two 'private's. here's the code: private function destroyMouseJoint(e:MouseEvent):void { hand.active = false; } private function spawnBox():void { var block:Polygon = new Polygon(Polygon.box(50, 50)); var body:Body = new Body(BodyType.DYNAMIC); body.shapes.add(block); body.position.setxy(stage.stageWidth /2, stage.height / 2); body.space = space; } I'm not sure what I'm supposed to do. Thanks in advance :) actionscript-3 share|improve this question asked Nov 20 '12 at 20:18 Tommy Benson 133 add a comment| 1 Answer 1 active oldest votes up vote 1 down vote accepted It seems you might be putting you function outside the class definition. Make sure they are in something like the following: package { import flash.display.Sprite; public class YourClass extends Sprite { private var bg:Sprite; public function YourClass() { super(); } private function destroyMouseJoint(e:MouseEvent):void { hand.active = false; } private function spawnBox():void { var block:Polygon = new Polygon(Polygon.box(50, 50)); var body:Bod ElementsAdobe Dreamweaver Adobe MuseAdobe Animate CCAdobe Premiere ProAdobe After EffectsAdobe IllustratorAdobe InDesignView all communitiesExplore Menu beginsMeet the expertsLearn our productsConnect with your peersError: You don't have JavaScript enabled. This tool uses JavaScript and much of it will not work correctly without it enabled. Please https://forums.adobe.com/thread/794422 turn JavaScript back on and reload this page. Please enter a title. You http://flash.bigresource.com/ActionScript-3-0-Error-1013-for-Private-Functions--XyA8o1e86.html can not post a blank message. Please type your message and try again. More discussions in ActionScript 3 All CommunitiesAdobe Animate CC - HomeActionScript 3 2 Replies Latest reply on Feb 21, 2011 3:08 AM by YaNi21 1013: The private attribute may be used only on class property definitions. YaNi21 Feb 20, error 1013 2011 11:25 PM package{ import flash.events.Event; import flash.display.MovieClip; import flash.utils.getDefinitionByName; public class pakpak extends MovieClip { private var arrObj:Array = new Array( "wings"); private var enemy:Array = new Array(); private var mc:MovieClip; } public function pakpak():void{ produce(1); } private function produce(num:Number):void { for( var i:Number = 0; i < num; i++ ) { var ran:int = Math.random() * error 1013 as3 arrObj.length; mc = new (getDefinitionByName( arrObj[ran] ) as Class)(); mc.x = Math.random() * (stage.stageWidth - mc.width); switch( arrObj[ran] ) { case "wings": mc.velocityY = 10; break; } mc.addEventListener(Event.ENTER_FRAME, moveDownFunction, false, 0, true); enemy.push( mc ); mc.index = enemy.length-1; addChild( enemy[ enemy.length-1 ] ); } } }
person doing the tutorial never explains the errors they fix between videos. I received an Error 1013 and I just can't figure it out, even looking at other codes.Line 29 is the issue. ActionScript Code:[code].......... View 6 Replies Similar Posts: ActionScript 3.0 :: Get Error 1013 The Private Attribute May Be Used Only On Class Property Definitions Jan 6, 2011 I keep getting this error in my class file main.as this is a translator application. I was able to get the animations working at one point but now I am stuck with this error and I don't understand it.main.as:package {import flash.display.Sprite;import flash.events.KeyboardEvent;import flash.net.URLLoader;[code]..... View 1 Replies ActionScript 3.0 :: 1013: The Private Attribute May Be Used Only On Class Property Definitions Apr 7, 2011 This error is just making me wanna commit where have i gone wrong? Help would be awesomepackage classes[Code]... View 5 Replies ActionScript 3.0 :: Class Property Error #1013 May 8, 2010 I'm customizing a floating panel that I found on gotoAndLearn. View 2 Replies ActionScript 3.0 :: 1013 Error For Buttons Finding Cue Points Jul 27, 2009 Using the code below I get an error message 1013: The private attribute may be used only on class property definitions. View 4 Replies ActionScript 3.0 :: Coding Pattern To Test Private Functions Dec 11, 2011 I came up with a coding pattern to test private functions and variables out of necessity. Assume the project structure below for example. You have separate folders (packages) for your main production code and test code, and each has the folder for the utility for private member access (testabilityutil).[Code]...Then, you have PrivateAccessor.as as below in the testabilityutil in the test code side, and you can access to the private members through it in your test cases (MyClassTest.as). Note you can access to the instance members and class static members in the same syntax. (You may noti