Flash Video Player

getBounds method

by admin on November 23, 2007 · 0 comments

in Flash CS3, Sintax, Tutorials

Did you notice that the new version of Actionscript has a new method: the getBounds?

This method is implemented in the DisplayObject Class and so, it can be used from the MovieClip and Sprite Class (as they inherit from the DisplayObject).

The method getBounds requires a parameter named targetCoordinateSpace that indicates which DisplayObject to use and defines the coordinates to be used (local or global).
It returns an instance of Rectangle with the properties x, y, width, height, left etc, etc… of the object associated to this method.

Often, it is required to position some objects in relation to the position of some other objects and it is then necessary to do some mathematical calculi.
In this case, the method getBounds will simplify our task to do so.

Let us see how to use it…

Read more

Share This Post

Related posts

{ 0 comments… add one now }

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="">

Older post: Elastic Gallery

Newer post: Instant Gallery