Be a Supporter!

AS question (i need help)

  • 415 Views
  • 6 Replies
New Topic Respond to this Topic
Inglor
Inglor
  • Member since: Jan. 26, 2003
  • Offline.
Forum Stats
Member
Level 17
Blank Slate
AS question (i need help) 2004-09-29 05:34:38 Reply

hello fellow actionscripters, is there any way to check hitTest of an entire leyer or a group of object? (just one hitTest)

Inglor
Inglor
  • Member since: Jan. 26, 2003
  • Offline.
Forum Stats
Member
Level 17
Blank Slate
Response to AS question (i need help) 2004-09-29 05:36:19 Reply

doesn't have to be a leyer, as long as it's an hittest of an object that does not include all the blank spaces within

Edvin
Edvin
  • Member since: Feb. 3, 2004
  • Offline.
Forum Stats
Member
Level 12
Blank Slate
Response to AS question (i need help) 2004-09-29 11:06:30 Reply

At 9/29/04 05:34 AM, Inglor wrote: hello fellow actionscripters, is there any way to check hitTest of an entire leyer or a group of object? (just one hitTest)

Make the whole thing a Movie Clip and make a regular hitTest ! That's wut I would do !

Afro-Ninja
Afro-Ninja
  • Member since: Mar. 2, 2002
  • Offline.
Forum Stats
Moderator
Level 44
Game Developer
Response to AS question (i need help) 2004-09-29 14:24:56 Reply

At 9/29/04 05:36 AM, Inglor wrote: doesn't have to be a leyer, as long as it's an hittest of an object that does not include all the blank spaces within

hmm... if you put them altogether in one MC and then use use hitTest with the shape detection I think that might work

if(_root.something.hitTest(_root.groupOfThings,true))//actions

adding the "true" parameter should make flash ignore all the blank space in between. But I've never used it myself so I don't know how good it works.

or if that was even what you were asking...


BBS Signature
Amish
Amish
  • Member since: Mar. 13, 2003
  • Offline.
Forum Stats
Member
Level 16
Blank Slate
Response to AS question (i need help) 2004-09-29 14:59:29 Reply

you could store them all in the array and hittest in the arry. its not that hard really. if you want t knwo how. IM me on MSN.

Deathcon7
Deathcon7
  • Member since: Oct. 1, 2003
  • Offline.
Forum Stats
Member
Level 21
Writer
Response to AS question (i need help) 2004-09-29 17:20:47 Reply

Er, couldn't you use the good ol' for loop? What type of objects are you working with?

GeoffCLogan
GeoffCLogan
  • Member since: Apr. 25, 2004
  • Offline.
Forum Stats
Member
Level 11
Blank Slate
Response to AS question (i need help) 2004-09-29 17:28:14 Reply

Shapeflag...however that restricts it to only being able to detect a mass hitting against a single registration point(ala the players feet in a platform game)

To use shapeflag you would do something like

_root.groundMC.hitTest(_root.player._x,_root.player._y,true) which would test to see if the player mc's registration point hitTests the large mass.

Bah, you probably already know of this though.