Height (Button._Height Property) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

Returns
- The depth of the button instance.
Number
Example
If you create
and
on the Stage, you can trace their depth using the
myBtn1_btn
myBtn2_btn
following ActionScript:
trace(myBtn1_btn.getDepth());
trace(myBtn2_btn.getDepth());
If you load a SWF file called buttonMovie.swf into this document, you could trace the depth
of a button,
, inside that SWF file using another button in the main SWF file:
myBtn4_btn
this.createEmptyMovieClip("myClip_mc", 999);
myClip_mc.loadMovie("buttonMovie.swf");
myBtn3_btn.onRelease = function(){
trace(myClip_mc.myBtn4_btn.getDepth());
};
You might notice that two of these buttons, one in the main SWF file and one in the loaded
SWF file, have the same depth value. This is misleading because buttonMovie.swf was loaded
at depth 999, which means that the button it contains will also have a depth of 999 relative to
the buttons in the main SWF file. You should keep in mind that each movie clip has its own
internal z-order, which means that each movie clip has its own set of depth values. The two
buttons may have the same depth value, but the values only have meaning in relation to other
objects in the same z-order. In this case, the buttons have the same depth value, but the values
relate to different movie clips. For example, the depth value of the button in the main SWF
file relates to the z-order of the main timeline, while the depth value of the button in the
loaded SWF file relates to the internal z-order of the
movie clip.
myClip_mc
See also
,
,
getDepth (MovieClip.getDepth method)
getDepth (TextField.getDepth method)

_height (Button._height property)

public _height : Number
The height of the button, in pixels.
Availability: ActionScript 1.0; Flash Player 6
Example
The following example sets the height and width of a button called
to a specified
my_btn
width and height.
my_btn._width = 500;
my_btn._height = 200;
358
ActionScript classes

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF