actionscript

Difference between stage.width and stage.stageWidth

醉酒当歌 提交于 2019-12-03 23:35:05
In actionscript 3 (as3) What is the difference between calling stage.width and stage.stageWidth This was something I remember I got confused about in the past (Adobe's api docs are an artform in obfuscation :) ). Thought I should post it on stackoverflow. Kejml stageWidth is basically width of the player window. You probably need this number if you want to know size of your scene. stage.width is calculated as any other width in actionscript. This means, it is width of bounding box around child objects of the stage. For example stage.width of empty.stage is 0. Or if you have only one small

AS3 not accepting constructor

我的梦境 提交于 2019-12-03 22:44:33
问题 Ok, I have raise these question a thousand times and so far no ones been able to help me. I am raising again because I discovered something new. In the past I haven't been able to create parameters for class objects, every time when I do so I get the following error 1136: Incorrect number of arguments. Expected 0. I notice that my classes that are subclasses to Movie Clip or Sprite are able to have constructor parameters, but my classes that are sub class to a subclass aren't. is there any

AS3 Components in Flash Designer

眉间皱痕 提交于 2019-12-03 22:15:51
In an ActionScript 2 project I can create a new MovieClip, right-click on it on the library and select "Component Definition" to add parameters that can be referenced inside the MovieClip. This parameters can be easily changed in the MovieClips's properties. Now, I'm working on an ActionScript 3 project but haven't been able to figure out a way to obtain the values passed in those parameters. I defined a parameter named "textToDisplay" but when I write the following in the Actions for the first frame I get an error: trace(textToDisplay); This is the error: 1120: Access of undefined property

Flex: Basic expectations from a flex(actionscript) developer

微笑、不失礼 提交于 2019-12-03 20:34:03
Knowledge has no limits but still in your opions, what are the basic requirements for an individual, where he can call himself a flex developer. To make it a bit concrete lets say after having a 2-3 years experience. In my perspective it should be something like below. It is a very (very) rough idea and please let me know your views and suggestions on this. BASIC: (1) Knowldge about basic GUI components like tab, vbox, etc. Their properties and the ability to decide which component suits better in a condition. (2) Knowledge to use services like HTTP, wsdl, remote objects, etc. (3) knowledge

As3 printing problem, blanks swf after print or cancel

人盡茶涼 提交于 2019-12-03 18:15:30
问题 ok back at another issues in as3 printing //Function to print entire screen function printFunction(event:MouseEvent):void { var myPrintJob:PrintJob = new PrintJob(); var oldScaleX:Number = root.scaleX; var oldScaleY:Number = root.scaleY; //Start the print job myPrintJob.start(); //Figure out the new scale var newScaleX:Number = myPrintJob.paperWidth/root.width; var newScaleY:Number = myPrintJob.paperHeight/root.height; //Shrink in both the X and Y directions by the same amount (keep the same

Pinless OAuth on Adobe AIR for Android

北战南征 提交于 2019-12-03 17:12:17
I got pinless OAuth working on Adobe AIR for Desktop, iOS, but not Android. For some reason, we're not getting the oauth_verifier (which contains the sha'd code) in StageWebView on an Android device. Any clue? Here's the debug for on desktop and on Droid 2; notice the 3rd line in the Droid 2 trace output which is missing all the OAuth variables after the callback URL. Desktop: AuthorizeTwitterService::onComplete, data: oauth_token=De2k4zANjzAhT3hXV4eqOfTVxJsshVIJjgsuwPMUg8&oauth_token_secret=s WsBzyS43nh6DDBwLaogaWpVftoDaiYTJDfBKQE&oauth_callback_confirmed=true --------------------

Disadvantages of a Flex project vs an Actionscript project?

大憨熊 提交于 2019-12-03 15:10:55
I've recently started making a game in FlexBuilder. The game is currently a Flex project. Is there any downside to using Flex as opposed to just Actionscript? A friend of a friend told me that Flex is slower than an Actionscript project. I've been unable to validate this on the internet; is there any truth to that claim? Thanks! If you're developing a game, you should be using an ActionScript project. Flex is to be used only for data driven applications and user interfaces. The flex compiler generates a lot of intermediate code to convert mxml files into actionscript (you can view those files

Actionscript: How do I rotate a text field?

放肆的年华 提交于 2019-12-03 15:05:50
How do you rotate a text field in actionscript 3.0? As soon as I change the rotation property of the text field, it does not display. for example: var txtFld:TextField = new TextField(); txtFld.x = 100; txtFld.y = 100; txtFld.width = 300; txtFld.height = 300; txtFld.text = "Test String"; txtFld.rotation = 90; addChild(txtFld); Some more info supporting Christophe Herreman : ActionScript - Rotating Text In order to see rotated text, you'll have to embed the font. an alternative is, to copy the textfield into a BitmapData using BitmapData::draw and then creating a Bitmap containing the result,

How can I modify my code to line through the bezier control points?

和自甴很熟 提交于 2019-12-03 14:15:07
问题 HI all - I am using anchor points and control points to create a shape using curveTo. It's all working fine, but I cannot figure out how to get my lines to go through the center of the control points (blue dots) when the line is not straight. Here is my code for drawing the shape: // clear old line and draw new / begin fill var g:Graphics = graphics; g.clear(); g.lineStyle(2, 0, 1); g.beginFill(0x0099FF,.1); //move to starting anchor point var startX:Number = anchorPoints[0].x; var startY

Why Sytem.totalMemory keeps increasing?

天涯浪子 提交于 2019-12-03 13:23:57
I have this blank project, just to check out System.totalMemory variable. As far as I can see, i get this values: 3076 3092 3096 3088 3092 3096 3100 3104 3108 3112 3117 3121 3125 3129 3133 3137 3141 3145 3149 ... And so on I had no Flash open, no Internet Browser, no other instance of flash. The project is blank, only one static text, and one dynamic text, called 'memory'. One *.as file, that contains this code: package{ import flash.display.Sprite; import flash.events.Event; import flash.system.System; import flash.text.TextField; public class Test extends Sprite { public function Test() {