[FMX] Help please!

I’m making a flash game for my site and I’ve faced a problem…Actually, a few. I’ll list 'em. (it’s a surfing type of game, also my first flash game ever. @.@)
~~

  1. When you hit a shark or log, a message should appear. It used to appear, but for some reason it no longer does…The script for it looks somewhat like this:

if (_root.you, hitTest(_root.shark)) {
_root.error = “Idiot-you ran right into a shark!”;
_root.total = _root.total - 150;
} else {
_root.error = “”;
}
if (_root.you, hitTest(_root.log)) {
_root.error = “Stupid-you ran into a LOG!”;
_root.total = _root.total - 150;
} else {
_root.error = “”;
}

  1. Also, along with the log and shark thing, I would like it to only deduct points once(when you first hit it). Otherwise, it keeps deducting as long as you’re touching 'em…
  2. With the log, it doesn’t do random movement. The script is correct(I copied it off of what I used on the shark, which is on a different layer), but the log won’t move at all…
  3. When you do a trick, I have it load a movie for the trick. How can I get it to play once and then turn off? Otherwise it keeps playing…
  4. As with above, how can I get it to load in the spot where you are when you call for the trick?
    ~~
    Thanks to anywho who can help me out! :slight_smile:

[AS]
if (_root.you.hitTest(_root.shark)) {
_root.error = “Idiot-you ran right into a shark!”;
_root.total -= 150;
} else {
_root.error = “”;
}
if (_root.you.hitTest(_root.log)) {
_root.error = “Stupid-you ran into a LOG!”;
_root.total -= 150;
} else {
_root.error = “”;
}
[/AS]

  1. I made this game once, I had the same problem and fixed it somehow … gotta go lookin’ upstairs for that :slight_smile:

  2. Can you post that code ?

  3. See 2)

[AS]
_root.trick._x = _root.you._x;
_root.trick._y = _root.you._y;
_root.trick.gotoAndPlay(2);
[/AS]

This is where _root.trick’s first frame is a blank keyframe so you can’t see it at first.

if (_root.you.hitTest(_root.shark) && !hitShark) {
_root.error = "Idiot-you ran right into a shark!";
_root.total = _root.total - 150;
hitShark = true;
} else {
_root.error = "";
hitShark = false;
}