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.

onPress (MovieClip.onPress h<strong>and</strong>ler)<br />

onPress = function() {}<br />

Invoked when the user clicks the mouse while the pointer is over a movie clip. You must<br />

define a function that executes when the event h<strong>and</strong>ler is invoked. You can define the in the<br />

library.<br />

Example<br />

The following example defines a function for the onPress method that sends a trace()<br />

action to the Output panel:<br />

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

trace ("onPress called");<br />

}<br />

onRelease (MovieClip.onRelease h<strong>and</strong>ler)<br />

onRelease = function() {}<br />

Invoked when the mouse button is released over a movie clip. You must define a function that<br />

executes when the event h<strong>and</strong>ler is invoked. You can define the function on the Timeline or in<br />

a class file that extends the MovieClip class or is linked to a symbol in the library.<br />

Example<br />

The following example defines a function for the onRelease method that sends a trace()<br />

action to the Output panel:<br />

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

trace ("onRelease called");<br />

}<br />

onReleaseOutside (MovieClip.onReleaseOutside<br />

h<strong>and</strong>ler)<br />

onReleaseOutside = function() {}<br />

Invoked when the mouse button is pressed inside the movie clip area <strong>and</strong> then released<br />

outside the movie clip area.<br />

You must define a function that executes when the event h<strong>and</strong>ler is invoked. You can define<br />

the function on the Timeline or in a class file that extends the MovieClip class or is linked to<br />

a symbol in the library.<br />

Note: This event h<strong>and</strong>ler is supported in Flash Lite only if System.capabilities.hasMouse<br />

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

458 ActionScript classes

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

Saved successfully!

Ooh no, something went wrong!