Tuesday, September 06, 2005

Flash Lite [11] setProperty

Flash Lite only allow to use the Instance Name of MovieClip, if you would like to control it's property. You can use slash or dot syntax. If there is a MovieClip named Cube in the stage, and you would like to control it move up when you press "Up" button. You can write as below,

on (keyPress "<Up>") {
setProperty("/cube", _y, _root.cube._y-10);
}

or

on (keyPress "<Up>") {
_root.cube._y=_root.cube._y-10;
}


or

on (keyPress "<Up>") {
_root.cube._y-=10;
}

The property you can use include,
_alpha
_currentframe
_droptarget
_focusrect
_framesloaded
_height
_name
_rotation
_soundbuftime
_target
_totalframes
_url
_visible
_width
_x
_xscale
_y
_yscale

0 Comments:

Post a Comment

<< Home