03.05.2013 Views

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - 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.

Availability: <strong>ActionScript</strong> 1.0; Flash Player 4<br />

Example<br />

The following code, placed in the main Timeline, stops the drag action on the movie clip<br />

instance my_mc when the user releases the mouse button:<br />

my_mc.onPress = function () {<br />

startDrag(this);<br />

}<br />

my_mc.onRelease = function() {<br />

stopDrag();<br />

}<br />

See also<br />

startDrag function, _droptarget (MovieClip._droptarget property), startDrag<br />

(MovieClip.startDrag method), stopDrag (MovieClip.stopDrag method)<br />

String function<br />

String(expression:Object) : String<br />

Returns a string representation of the specified parameter, as described in the following list:<br />

■ If expression is a number, the return string is a text representation of the number.<br />

■ If expression is a string, the return string is expression.<br />

■ If expression is an object, the return value is a string representation of the object<br />

generated by calling the string property for the object, or by calling Object.toString()<br />

if no such property exists.<br />

■ If expression is a Boolean value, the return string is "true" or "false".<br />

■ If expression is a movie clip, the return value is the target path of the movie clip in slash<br />

(/) notation.<br />

If expression is undefined, the return values are as follows:<br />

■ In files published for Flash Player 6 <strong>and</strong> earlier, the result is an empty string ("").<br />

■ In files published for Flash Player 7 <strong>and</strong> later, the result is undefined.<br />

Note: Slash notation is not supported by <strong>ActionScript</strong> <strong>2.0</strong>.<br />

Availability: <strong>ActionScript</strong> 1.0; Flash Player 4 - Behavior changed in Flash Player 7.<br />

Parameters<br />

expression:Object - An expression to convert to a string.<br />

Global Functions 109

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

Saved successfully!

Ooh no, something went wrong!