Flex wise remark of an experienced person

Recommended for you: Get network issues from WhatsUp Gold. Not end users.
Remove all trace and logger information of 1 release, or affect the performance
2 if the newspaper can not access the local file or SWF write -use-network=false in compile.
3 implementation of component real hidden in addition to set the visible=false also need to set includeInLayout = false
4 let the hand sometimes out of buttonMode= "true" useHandCursor= "true" also let mouseChildren="false"
Use 5 for loops
var len:int = array.length;
for(var i:int = 0; i<len; i++)

{

    //I don't number, len variables.

}



In the reverse order of while cycle rate than the positive cycle:
var i:int = myArray.length;
while (--i > -1)
{
}


6 IE FLASH link regional mouse flash, plus the properties of parameter FLASH in any following two in a sentence can solve

<param name="wmode" value="opaque">

<param name="wmode" value="transparent">


7 using i> > 1 instead of I/2

8 to create Object var obj:Object = {} instead of VaR obj:Object = new Object (1.5 times faster);

Create a Array var arr:Array = [] instead of VaR arr:Array = new Array (3.5 times faster);

The creation of ArrayCollection is very slow, time-consuming is roughly 100 times the size of VaR arr:Array = []

The 9 loop, constant to be mentioned, for example:

var constant:String= MouseEvent.CLICK               

for(var i:Number=0; i<100000; i++)               

{                  

    tmpVar = constant,          

}


10 flex after loading module, module inside. If you are using flash components, can appear sometimes components of flash do not display, call validateNow()

11 air project, a custom alert and flex projects are not the same, flex Application.application.addChild (ALERT), air to Window.getWindow in a multi form (obj).AddChild (ALERT), obj is the current object came in.

12 external read text to consider the escape character problems (such as line \n will become \n to replace)

The borderStyle property of 13 Container is set to solid, cornerRadius will have effect.

14 the.ActionScriptProperties file used to configure the compiler attributes, may have a look the file appears to be rather baffling problem.


15 as far as possible to avoid using the bracket operator.

currentSprite = arraySprite[i];
currentSprite.x = Math.random()*stage.stageWidth;
currentSprite.y = Math.random()*stage.stageHeight;

16 please as far as possible outside the text field update cycle.

for (var i:int = 0; i<1500; i++ )
{
content += "ActionScript 3";
}
myTextField.text = content;

17 do not use the alpha attribute
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download

Posted by Anthony at December 01, 2013 - 1:35 PM