|
-
[CS3] actionscript help with my stupid game
Hi, all.
I've put together this little game using drag and drop actions.
I mostly put it together to learn. But I am just getting frustrated.
Here is the URL
http://dfduran.com/game/pitstop_game.html
I want to have drag the top four icons to the correct position on the car while having the oil slicks, toolbox, and stack of tires (as well as the logo) as obstacles. I would like to have it so that if the user drags over the obstacles, the item being dragged goes back to the starting position.
All this by timing the user. I would like a stop button that records the time to a file or email.
As you can see, I have all the basic elements up, but have no idea on how to finish the game.
Any help given would be so appreciated.
I have the flash code here:
http://dfduran.com/game/pitstop_game.fla
Thanks in advance for any help.
dfd
-
You could try using the hitTest method.
Yours could be like this:
Code:
tyre1_mc.onEnterFrame = function() {
if (this.hitTest(obstacle1_mc)){
stopDrag();
// Return tyre to original position
}
}
-
thanks a billion, funkage. I finally got that to work.
Now I am moving on to the timer.
I am going to ask this as a new questions, but maybe you can help. How can I get a stop button to appear only when all four items have been properly placed?
Then I want to record the time and email it.
Again, thanks.
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
|