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

Create successful ePaper yourself

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

this.gotoAndStop(3);<br />

}<br />

Place your content on or after Frame 3. Then add the following code to Frame 3:<br />

stop();<br />

See also<br />

MovieClipLoader<br />

getBounds (MovieClip.getBounds method)<br />

public getBounds(bounds:Object) : Object<br />

Returns properties that are the minimum <strong>and</strong> maximum x <strong>and</strong> y coordinate values of the<br />

movie clip, based on the bounds parameter.<br />

Note: Use MovieClip.lcalToGlobal() <strong>and</strong> MovieClip.globalToLocal() to convert the<br />

movie clip's local coordinates to Stage coordinates, or Stage coordinates to local coordinates,<br />

respectively.<br />

You can extend the methods <strong>and</strong> event h<strong>and</strong>lers of the MovieClip class by creating a subclass.<br />

Parameters<br />

bounds:Object - The target path of the Timeline whose coordinate system you want to use<br />

as a reference point.<br />

Returns<br />

Object - An object with the properties xMin, xMax, yMin, <strong>and</strong> yMax.<br />

Example<br />

The following example creates a movie clip called square_mc. The code draws a square for<br />

that movie clip <strong>and</strong> uses MovieClip.getBounds() to display the coordinate values of the<br />

instance in the Output panel.<br />

this.createEmptyMovieClip("square_mc", 1);<br />

square_mc._x = 10;<br />

square_mc._y = 10;<br />

square_mc.beginFill(0xFF0000);<br />

square_mc.moveTo(0, 0);<br />

square_mc.lineTo(100, 0);<br />

square_mc.lineTo(100, 100);<br />

square_mc.lineTo(0, 100);<br />

square_mc.lineTo(0, 0);<br />

square_mc.endFill();<br />

var bounds_obj:Object = square_mc.getBounds(this);<br />

MovieClip 425

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

Saved successfully!

Ooh no, something went wrong!