Flylib.com

Books Software

 
 
 

Button._ymouse Property

ActionScript for Flash MX: The Definitive Guide, 2nd Edition
By Colin Moock
Chapter 18.  ActionScript Language Reference
Button._ymouse Property Flash 6

vertical location of mouse pointer, relative to the button's registration point read-only


theButton


._ymouse

Description

The floating-point _ymouse property indicates the vertical location of the mouse pointer's hotspot, relative to theButton 's registration point. To obtain a consistent _ymouse coordinate that is always measured relative to the Stage, use _root._ymouse .

See Also

Button ._xmouse , MovieClip ._ymouse

ActionScript for Flash MX: The Definitive Guide, 2nd Edition
By Colin Moock
Chapter 18.  ActionScript Language Reference
Button._yscale Property Flash 6

height of a button, as a percentage read/write


theButton


._yscale

Description

The floating-point _yscale property specifies the height of theButton , relative to its original height, expressed as a percentage. Its "original height" is the pixel height of its Library symbol. When the current height of theButton is the same as its original height, _yscale is 100. A _yscale of 300 triples theButton 's original height; a _yscale of 50 halves its original height.

Button ._yscale is directly analogous to MovieClip ._yscale ; see that property entry for full details.

Example

// Restore


sort_btn


to its original (Library symbol) size
sort_btn._yscale = 100;
sort_btn._xscale = 100;

See Also

Button ._height , Button ._xscale , MovieClip ._yscale

ActionScript for Flash MX: The Definitive Guide, 2nd Edition
By Colin Moock
Chapter 18.  ActionScript Language Reference
call( ) Global Function Flash 4

execute the script of a remote frame
call(


frameLabel


)
call(


frameNumber


)

Arguments

frameLabel

A string representing the label of the frame whose script should be executed.

frameNumber

The number of the frame whose script should be executed.

Description

The call( ) function executes the script attached to the frame at frameLabel or frameNumber . For example, the following code runs the script on frame 20 of the current timeline:

call(20);

In Flash 4, call( ) was used to create a crude kind of reusable subroutine (one that could not accept parameters or return a value). As of Flash 5, the function statement is the preferred way to define a function.

Note that in Flash 5 and later, when a script is executed remotely via call( ) , any variables declared with the var keyword are considered local to that execution and expire after the script completes. To create nonlocal variables in a remotely-executed script, omit the var keyword:

var x = 10;  // Local variable; dies after script completes
x = 10;      // Timeline variable; persists after script completes

To invoke call( ) on frames outside the current timeline, use the deprecated tellTarget( ) function. The following example executes the script on frame 10 of the box clip:

tellTarget ("box") {
  call(10);
}

See Also

Chapter 9; Appendix C

ActionScript for Flash MX: The Definitive Guide, 2nd Edition
By Colin Moock
Chapter 18.  ActionScript Language Reference
Capabilities Object Flash 6

information about the Flash Player and its host system

Properties

hasAccessibility

Indicates whether the Player supports accessibility (MSAA).

hasAudio

Indicates whether the Player supports audio playback.

hasAudioEncoder

Indicates whether the system can encode audio.

hasMP3

Indicates whether the Player supports MP3 sound playback.

hasVideoEncoder

Indicates whether the system can encode video.

input

The user input device for the system, such as a mouse (indicated by the word "point").

isDebugger

Indicates whether the Player is a debugging version.

language

The current language setting on the operating system.

manufacturer

The creator of the Player.

os

The operating system on which the Player is running.

pixelAspectRatio

The width-to-height ratio of a pixel on the screen.

screenColor

The color mode supported by the screen ( color , grayscale, or black and white).

screenDPI

The number of pixels per inch displayed by the screen.

screenResolutionX

The width of the screen, in pixels.

screenResolutionY

The height of the screen, in pixels.

serverString

All Capabilities property values, as a string of URL-encoded variables .

version

The Flash Player version.

Description

The Capabilities object represents the specifications of the Flash Player and the system on which the Player is running. It is stored as a property of the System object (i.e., System.capabilities ). Hence, references to Capabilities properties always start with the System object, as follows :

System.capabilities.


propertyName


For example, the following code displays the screen width in the Output window:

trace(System.capabilities.screenResolutionX);

The Capabilities object is used to write code that adapts a movie to its playback environment. It applies primarily to mobile devices, such as Pocket PCs and cell phones. For example, by querying the value of hasAudio , a movie playing on a handheld device can check if the device can play audio. If hasAudio is false , the movie can provide text subtitles .

All properties of Capabilities have corresponding short-form names and values that can be used to send the client-side Player abilities to a server-side script. For example, the screenColor property's short form is COL , with possible values of "color", "gray", and "bw". The capabilities.serverString property joins all short-form property name /value pairs into a URL-encoded string suitable for transmission to a server. A server can read this information and respond by sending the appropriate movie or data for the playback environment. See capabilities.serverString for details.

For information on authoring Flash movies for devices, see:

http://www.macromedia.com/software/flashplayer/resources/devices/
http://www.flashenabled.com/mobile/

For a list of devices that the Flash Player runs on, see:

http://www.macromedia.com/software/flashplayer/resources/devices/supported_devices/

Usage

Though the properties of Capabilities are writable, there is no practical reason to overwrite their system-assigned values. Doing so obscures the information they contain. Custom assignments to properties other than serverString are not reflected in the value of serverString .

See Also

The System object, the Stage object