|
-
Senior Member
I miss the old getBounds...
Hello,
I am trying to familiarize myself with the new actionscript.
Specifically I was trying to use the getBounds like actionscript 2.0. Then looked into it and found that like many other things, its different.
I've been looking for a way to detect walls. I don't know if any of you remember, but one of the older flash versions had a maze game in some sample files. It used the getBounds to determine xMin, xMax, yMin, and yMax, at certain values of x and y.
Here is how I have my movie set up. I have a square MC named "guy". I have an MC named "walls". The walls MC has a long rectangle going across the bottom of the stage and another long rectangle about a 4th the size halfway up the stage. Think sidescrolling platformer, mario.
Is there a way I can make this statement into a code. "What is the yMin of the MC walls(the top y value), on the MC guy's x value?"
I've been trying to figure it out for a little. Looked into hitTest a little, but it bases it off a rectangle or the MC. If my walls MC has different "platforms" in it at different levels, hitTest will come up true unless "guy" is above the top y value of the entire walls MC.
Hopefully some bright people out there can help me like I've been helped before. :P
Thanks,
~Bill
So many Ideas
So little Time
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|