With ActionScript class definitions, you can mark all the class's properties as bindable with a single instance of the [Bindable] metadata tag placed before the class declaration.
####page.256 23:22 2010-3-17
Navigator containers : Move from one view to another.
View states: change an existing view.
NOTE:
Q&A
Q:How to handling navigator container sizing?
A:3 ways:
1.Set the Set the navigator container's dimensions to specific pixel or percentage dimensions, and then set the nested container sizes to 100 percent height and width.Each of the nested view containers then resizes to fill the available space in the navigator container.
2.Set the nested containers to specific pixel dimensions, and set the navigator container's 'resizeToContent' property to true.
CAUTION:
Setting resizeToContent to true forces the navigator container to re-measure and
re-draw itself as the user navigates through the application. This can cause interesting
and unintended visual effects, particularly when the navigator container has a visible border or
background.
Do not usint backslash character '\' as separator in the path to an application asset, you should always using forwardslash character '/' as separator.
ActionScript: '\n'
MXML : " "
public
private
protected class and it subclass, note this is different from Java, which is allowed access in same package.
internal the default access specifier that allowed all other class which in the same package can access it.
BUT, if above default namespace is not suit for you, you can create your namespace.
DataType | Value |
Boolean | false |
int | 0 |
uint | 0 |
Numbwer | NaN |
* | undefined |
Object | null |
String | null |
All Other Class | null |
is : can check an object is an instance of an class or an inherit from some class or it is implement of some interface.
instanceof: as well as 'is' but will be return false if using check an interface.
as : is return an string or null, to check an object is a member of a given data type.
e.g,:
var a:Sprite = new Sprite();
trace( a as Sprite); //[Object Sprite]
trace( a as IEDispatch); //[Object Sprite]
trace( a as Number); //null
Dynamic class is a class which it's object can add method or variable at runtime. This is like javascript prototype but more strict.
But method added by this way is not have the ability to access the private variable.(NEED CHECKED!)
####page 83,proAS_Flex3 23:36 2010-3-23
Thinking following example:
class MaiZoo{
var maiFunc = function(){};
function maiStateFunc(){};
}
var maiZoo:MaiZoo = new MaiZoo();
maiZoo.maiFunc(); //Error in 'Strick' mode;Ok in standard mode
maiZoo.maiStateFunc(); // Works fine in both mode.
If you wanna call an expression function in strick mode, the workaround way is:
maiZoo['maiFunc'](); //Guess what? like EL hah? And this is real a javascript way:)
Both satuation above code works fine.
Second way, you can declare whole class as 'dynamic',this way allow you call function express in strick mode, but this way will sacrifice the strick checking and if you attempt to access an undefined property for an instance,the compiler will not generate an error.(?)
The different between function expression and function statement is that the function statement is exist throughtout the scope in which they are defined, INCLUDING IN THE STATEMENTS THAT APPEAR BEFORE THE FUNCTION STATEMENT!!!
But the function expression is not. So the following code will generate an error:
expressionFunc(); //Runtime Error
var expressionFunc:Function= function(){};
and if we using:
statementFunc(); //OK
function statementFunc():void{};
dynamic class Obj{};
var myObj:Obj = new Obj();
myObj.expressionFunc = function(){};
delete myObj.expressionFunc;
myObj.expressionFunc(); //Error; cause the function is 'anonymous', it's just GONE!
//BUT..
function stateFunc():void{}
myObj.stateFunc = stateFunc;
delete stateFunc; //No effect.
stateFunc(); //Still working, lalala~
delete myObj.stateFunc;
myObj.steteFunc(); // Error!
stateFunc(); //Haha, Nondead!
All thing is object, so all the function call is pass by refrence, BUT, for primer type, they works as if pass by value.
Have fixed argument(s) function has an imply object called 'arguments'
1. arguments is an array that contain all actual arguments the function be passed.
2. arguments.length
3. arguments.callee is an refrence to the function itself. so if you are using an anonymous function, you know how to do if you want do a recursion.
4. if you named your parameter 'arguments', it will overwrite the arguments, so you cry means nothing!
...(rest)
this is an way to define an function that not have the fixed but variable arguments.
e.g,:
function doX(... args):void{}
also, you can using (rest) as the way 'arguments' do in normal function, but they DONT HAVE an 'callee' attribute.
####page 101,proAS_Flex3 23:36 2010-3-23 22:19 2010-3-24
If this setting works fine, I’ll see the result porperly.
The web service of metaBlogAPI is:
http://yourname.blogjava.net/services/metaweblog.aspx
and next next next…
Ok, whether this time is the right time I don’t know, but I just need reload myself. Every time when I thinking why I’m here and what I’ll do the answer is always “Keep going boy, never look back because you are the man who will control every situation that hardest in before but now it is nothing and easy to passed by. In another way of saying, it means I’ll success vanquish my fear today in tomorrow that I faced again.” Now, those words will be added some thing new, which is “whatever I was fear is, I’ll solve it NOW, never to waiting it appear again. I’ll destroy it just now, not tomorrow.” I find my location myself, I set my axis myself, and I’ll keep my road to be the best man myself. Never to wait someone’s helped, never to beg someone’s sympathy. You are the ONE who not stronger, you’ll ever worth to be helped. We don’t need only help; we just need help each other. Everything can be getting by exchanged, if you have the things that other needing.
Never lose you faith. You are the man. Keep going!
Another thing is, just as is, I must make myself know how to balance work and rest. Life is gift, can’t waste valueless.
I know I’m stupid enough. I thought in past I do a lot bad thing and waste a lot of time doing so I’m here and feel sadly some time. But fun thing is I still can found things make me happy, a lots of time at least, I know, that means I still know what love is. If I keep my heart open and share my knowledge, I can get new friend that also simple in some area and kind to other like me, is that true or not? Hehe, you judge it. Life is a gift, what I seeking for? This is a big question, a big subject for everybody, so some time I was tired for finding that question which never can be answered, and choose a best question that can make me simple and simple again.
This area is just a place that keeps my note and, as you see, puts my complaint. I’m the king here, but god is still over my head. So look out your mouth, my friend.