03.05.2013 Views

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

See also<br />

clearInterval function<br />

setProperty function<br />

setProperty(target:Object, property:Object, expression:Object) : Void<br />

Changes a property value of a movie clip as the movie clip plays.<br />

Parameters<br />

target:Object - The path to the instance name of the movie clip whose property is to be set.<br />

property:Object - The property to be set.<br />

expression:Object - Either the new literal value of the property, or an equation that<br />

evaluates to the new value of the property.<br />

Example<br />

The following ActionScript creates a new movie clip <strong>and</strong> loads an image into it. The _x<strong>and</strong> _y<br />

coordinates are set for the clip using setProperty(). When you click the button called<br />

right_btn, the _x coordinate of a movie clip named params_mc is incremented by 20 pixels.<br />

this.createEmptyMovieClip("params_mc", 999);<br />

params_mc.loadMovie("http://www.helpexamples.com/flash/images/image1.jpg");<br />

setProperty(this.params_mc, _y, 20);<br />

setProperty(this.params_mc, _x, 20);<br />

this.right_btn.onRelease = function() {<br />

setProperty(params_mc, _x, getProperty(params_mc, _x)+20);<br />

};<br />

See also<br />

getProperty function<br />

startDrag function<br />

startDrag(target:Object [, lock:Boolean, left:Number, top:Number,<br />

right:Number, bottom:Number]) : Void<br />

Makes the target movie clip draggable while the movie plays. Only one movie clip can be<br />

dragged at a time. After a startDrag() operation is executed, the movie clip remains<br />

draggable until it is explicitly stopped by stopDrag() or until a startDrag() action for<br />

another movie clip is called.<br />

Note: This method is supported in Flash Lite only if System.capabilities.hasMouse is<br />

true or System.capabilities.hasStylus is true.<br />

Global Functions 77

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!