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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Example<br />

The examples in this section use the parseInt() function to evaluate various types of<br />

numbers.<br />

The following example returns 3:<br />

parseInt("3.5")<br />

The following example returns NaN:<br />

parseInt("bar")<br />

The following example returns 4:<br />

parseInt("4foo")<br />

The following example shows a hexadecimal conversion that returns 1016:<br />

parseInt("0x3F8")<br />

The following example shows a hexadecimal conversion using the optional radix parameter<br />

that returns 1000:<br />

parseInt("3E8", 16)<br />

The following example shows a binary conversion <strong>and</strong> returns 10, which is the decimal<br />

representation of the binary 1010:<br />

parseInt("1010", 2)<br />

The following examples show octal number parsing <strong>and</strong> return 511, which is the decimal<br />

representation of the octal 777:<br />

parseInt("0777")<br />

parseInt("777", 8)<br />

See also<br />

NaN constant, parseFloat function<br />

play function<br />

play() : Void<br />

Moves the playhead forward in the Timeline.<br />

Example<br />

In the following example, there are two movie clip instances on the Stage with the instance<br />

names stop_mc <strong>and</strong> play_mc. The ActionScript stops the SWF file's playback when the<br />

stop_mc movie clip instance is clicked. Playback resumes when the play_mc instance is<br />

clicked.<br />

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

stop();<br />

Global Functions 71

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

Saved successfully!

Ooh no, something went wrong!