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.

If your SWF file includes a version 2 component, use the version 2 components'<br />

DepthManager class instead of the MovieClip.getNextHighestDepth() method, which is<br />

used in this example.<br />

See also<br />

Button, ContextMenu, ContextMenuItem, MovieClip<br />

mouseWheelEnabled<br />

(TextField.mouseWheelEnabled property)<br />

public mouseWheelEnabled : Boolean<br />

A Boolean value that indicates whether Flash Player should automatically scroll multiline text<br />

fields when the mouse pointer clicks a text field <strong>and</strong> the user rolls the mouse wheel. By<br />

default, this value is true. This property is useful if you want to prevent mouse wheel<br />

scrolling of text fields, or implement your own text field scrolling.<br />

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

Example<br />

The following example creates two text fields. The scrollable_txt field has the<br />

mouseWheelEnabled property set to true, so scrollable_txt scrolls when you click the field<br />

<strong>and</strong> roll the mouse wheel. The nonscrollable_txt field does not scroll if you click the field<br />

<strong>and</strong> roll the mouse wheel.<br />

var font_array:Array = TextField.getFontList().sort();<br />

this.createTextField("scrollable_txt", this.getNextHighestDepth(), 10, 10,<br />

240, 320);<br />

scrollable_txt.border = true;<br />

scrollable_txt.wordWrap = true;<br />

scrollable_txt.multiline = true;<br />

scrollable_txt.text = font_array.join("\n");<br />

this.createTextField("nonscrollable_txt", this.getNextHighestDepth(), 260,<br />

10, 240, 320);<br />

nonscrollable_txt.border = true;<br />

nonscrollable_txt.wordWrap = true;<br />

nonscrollable_txt.multiline = true;<br />

nonscrollable_txt.mouseWheelEnabled = false;<br />

nonscrollable_txt.text = font_array.join("\n");<br />

If your SWF file includes a version 2 component, use the version 2 components'<br />

DepthManager class instead of the MovieClip.getNextHighestDepth() method, which is<br />

used in this example.<br />

TextField 1211

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

Saved successfully!

Ooh no, something went wrong!