Tutorials Home
What's New
Top Rated
Submit
myTutes
Random!
The “get….Bounds?” Tutorial
Author: Polnareff
| Website: http://adment.ad.funpic.org |
There are 4 key terms that are associated with getBounds: xMin, xMax, yMin, and yMax. These 4 are used to determine the boundaries of the object you’re targeting.
In Flash, the center of the Cartesian plane begins in the top left corner, and is reversed, as going right and going downwards is positive. This means the right edge of the square in the diagram is its maximum, left edge it’s minimum, and the same for the top and bottom edges. When we use getBounds, we get these 4 values, and then, if using hitTest, compare them to the object that we want to target. So for example, if I had a 10x10 square, and I placed the square’s center point at: x=45 y=50, then the xMin=40, xMax=50, yMin=45, and yMax=55.
| » Level Intermediate |
|
|
Added: : 2006-01-04
Rating: 9.08 Votes: 13
Hits: 625
|
| » Author |
|
I have a passion for Actionscript.
|
| » Download |
|
Download the files used in this tutorial.
|
|
Download (0 kb)
|
|
Get conversion and unzipping tools
for PC and Mac here!
|
| » Forums |
|
More help? Search our boards for quick answers!
|
|
Please rate this tutorial, 10 is the top rating, you can also click the
comments link to read/write a review.
|
|
|