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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

trace(myBtn1_btn.getDepth());<br />

trace(myBtn2_btn.getDepth());<br />

If you load a SWF file called buttonMovie.swf into this document, you could trace the depth<br />

of a button, myBtn4_btn, inside that SWF file using another button in the main SWF:<br />

this.createEmptyMovieClip("myClip_mc", 999);<br />

myClip_mc.loadMovie("buttonMovie.swf");<br />

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

trace(myClip_mc.myBtn4_btn.getDepth());<br />

};<br />

You might notice that two of these buttons have the same depth value, one in the main SWF<br />

file <strong>and</strong> one in the loaded SWF file. This is misleading, because buttonMovie.swf was loaded<br />

at depth 999, which means that the button it contains will also have a depth of 999 relative to<br />

the buttons in the main SWF file. Keep in mind that each movie clip has its own internal zorder,<br />

which means that each movie clip has its own set of depth values. The two buttons may<br />

have the same depth value, but the values only have meaning in relation to other objects in the<br />

same z-order. In this case, the buttons have the same depth value, but the values relate to<br />

different movie clips: the depth value of the button in the main SWF file relates to the z-order<br />

of the main Timeline, while the depth value of the button in the loaded SWF file relates to<br />

the internal z-order of the myClip_mc movie clip.<br />

See also<br />

getDepth (MovieClip.getDepth method), getDepth (TextField.getDepth method),<br />

getInstanceAtDepth (MovieClip.getInstanceAtDepth method)<br />

_height (Button._height property)<br />

public _height : Number<br />

The height of the button, in pixels.<br />

Example<br />

The following example sets the height <strong>and</strong> width of a button called my_btn to a specified<br />

width <strong>and</strong> height.<br />

my_btn._width = 500;<br />

my_btn._height = 200;<br />

_highquality (Button._highquality property)<br />

public _highquality : Number<br />

Deprecated since Flash Player 7. This property was deprecated in favor of Button._quality.<br />

Button 259

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

Saved successfully!

Ooh no, something went wrong!