HELP WITH FLASH ACTION SCRIPT

  • itslizk
  • Born
  • Born
  • itslizk
  • Posts: 2

Post 3+ Months Ago

HI guysss i need help desperately!

wat i need to do is move to a new frame when one object collides with another....its a game so the player controls a head using the keys and when the head hit a certain box i need them to move to a new frame......ne ideasss? please help!i know that it is some form of hit test but can't find the action script anywhere....need the action script pleaseeee!
  • IceCold
  • Guru
  • Guru
  • User avatar
  • Posts: 1254
  • Loc: Ro

Post 3+ Months Ago

u sound so desperate
so ... no ..., i wont help you :D

j/k
u have 2 choices:
1)
Code: [ Select ]
if (headMC.hitTest(wallMC)) { gotoAndPlay("frame");

2) box your head:
meaning :
Code: [ Select ]
if ( (headMC._x + headMC._width > wallMC._x) ||   // left to right movement test
 (headMC._x < wallMC._x + wallMC._width) ) // right to left movement test
{ gotoAndPlay("frame");
  1. if ( (headMC._x + headMC._width > wallMC._x) ||   // left to right movement test
  2.  (headMC._x < wallMC._x + wallMC._width) ) // right to left movement test
  3. { gotoAndPlay("frame");
  • itslizk
  • Born
  • Born
  • itslizk
  • Posts: 2

Post 3+ Months Ago

hah thanx heaps! much appreciated

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 4 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.