Groups | Blog | Home
all groups > flash (macromedia) > may 2004 >

flash (macromedia) : timing system?


Space slag Zin
5/7/2004 10:14:51 PM
I need a delay system for a game I'm working on.

When two obejects collide a variable changes and they bounce off each other.
The problem is that the the objects don't react fast enough, and the variable
changes back and forth between the two objects. I think I need a delay system
so that after they touch, the function that changes the variable is stopped for
3 seconds.

Any help will be appreciated
Space slag Zin
5/7/2004 11:44:13 PM
here's my code:
function checkhit1() {
if (it == 1) {
if (player1.hitTest(player2)) {
if (it == 1){ _global.it = 2;}
dirSwitch = 1;
}

I think I need another function like this:
function tagback () {
if (player1.hitTest(player2)) {clearInterval (checkhit1)-for
three seconds???how do I do this?
AddThis Social Bookmark Button