Object Properties

Object Properties
An object properties could be movieclip, button, graphic, sound, video, bitmap anc component. But, only movieclip, button and sound can entered with actionscript. Componet have build in action script, so that we can directly use, while bitmap and graphic can’t entered with actionscript. Every object that can entered with actionscript have several properties like x axis, y axis, width, height, active frame, color and others. Because movieclip is frequently used in flash, The following are some properties of a movieclip : 

  • _x
_x is the coordinate of x axis symbol in stage. In last post I explain thar calculation of x calculated from registration point of symbol, not from upper left corner of object that seen in symbol properties.


  • _y

_y is the coordinate of y axis symbol in stage. Calculation of y axis is same wit x axis which is calculate from registration point symbol.  See action script below:
onClipEvent(load){
_x = 100; // x axis
_y = 100; // y axis
}
Action script above will set the position of object(symbol) to coordinate (100,100) in stage when symbol shown at first time.

  • _xscale

_xscale is percentage of horizontal scale symbol against registration point.Default value of _xscale is 100. Object which have value under 100 have small size than original size, otherwise have large size than original.

  • _yscale

_yscale is percentage of verical scale symbol against registration point. example :
onClipEvent(load){
_xscale = 200; // twice enlargement in x axis
_yscale = 200; // twice enlargement in y axis
}
This action will enlarge object twice when object shown first time.

  • _visible

_visible is object properties that set visibility of object in stage. _visible = 1 for shown object and 0 for hide object.
example :
onClipEvent(load){
_visible = 0; // not visible
}
This action cause object not show in stage.

  • _alpha

_alpha is property of object that set alpha value (transparency). _alpha have value 0 to 100 where 0 mean that object is not shown (transparent) and 100 mean that object is shown (solid).
example :
onClipEvent(load){
_alpha = 50; // semi transparent
}
This action cause object have transparency 50%.

  • _rotation

_rotation is properties that indicate rotation position of object clockwise against registration point.
example :
onClipEvent(enterFrame){
_rotation += 10; // 10 degree clockwise rotation
}
This action cause object rotate 10 degree clockwise against registration point.

  • _currentframe

Value of _currentframe indicate active frame in movie or movie clip. More detail explanation I will post in nextpost.

Post a Comment

0 Comments

-------- MASUKAN KODE IKLAN 1 --------
-------- MASUKAN KODE IKLAN 2 --------
-------- MASUKAN KODE IKLAN 3 --------
To Top