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

Create successful ePaper yourself

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

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

Example<br />

This example demonstrates how to hide the yellow rectangle around a specified movie clip<br />

instance in a SWF file when it has focus in a browser window. Create three movie clips called<br />

mc1_mc, mc2_mc, <strong>and</strong> mc3_mc, <strong>and</strong> add the following <strong>ActionScript</strong> on Frame 1 of the<br />

Timeline:<br />

mc1_mc._focusrect = true;<br />

mc2_mc._focusrect = false;<br />

mc3_mc._focusrect = true;<br />

mc1_mc.onRelease = traceOnRelease;<br />

mc3_mc.onRelease = traceOnRelease;<br />

function traceOnRelease() {<br />

trace(this._name);<br />

}<br />

Test the SWF file in a browser window by selecting File > Publish Preview > HTML. Give the<br />

SWF focus by clicking it in the browser window, <strong>and</strong> press Tab to focus each instance. You<br />

cannot execute code for this movie clip in the browser by pressing Enter or the Spacebar when<br />

_focusrect is disabled.<br />

Additionally, you can test your SWF file in the test environment. Select Control > Disable<br />

Keyboard Shortcuts from the main menu in the test environment. This allows you to view the<br />

focus rectangle around the instances in the SWF file.<br />

See also<br />

_focusrect property, _focusrect (Button._focusrect property)<br />

forceSmoothing (MovieClip.forceSmoothing<br />

property)<br />

public forceSmoothing : Boolean<br />

A Boolean value that determines whether images that are added through the loadMovie()<br />

method <strong>and</strong> are in the same hierarchy level as the movie clip are smoothed when scaled.<br />

Setting forceSmoothing to true decreases rendering performance. The default value is<br />

false.<br />

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

MovieClip 873

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

Saved successfully!

Ooh no, something went wrong!