Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
| Subject: | Re: FLASH: Flash4: Variables |
| From: | John Croteau |
| Date: | Wed, 28 Jul 1999 04:45:06 +0100 |
Hi Ed,
> I am tracking a ball, so that when it reaches a certain spot on the screen
> it snaps into place and adds one to your score.
> Set Variable: "score" = 0
> IF (GetProperty ("/ball", _x) >= 96 and GetProperty ("/ball",_y) >= 164 and GetProperty ("/ball", _x ) <= 178 and GetProperty ("/ball",_y) <= 243)
> Set Variable: "score" = score + 1
> end if
> Can anyone tell me why the score stays at 0.
Set Variable: "score" = 0
Set Variable: "Xpos" = GetProperty ("/ball", _x)
Set Variable: "Ypos" = GetProperty ("/ball", _y)
If ( (Xpos >= 178) and (Xpos <= 178) and (Ypos >= 164) and (Ypos <=
243))
Set Variable: "score" = score + 1
end if
In the code above, with the separation of Get Property and addition of
parentheses, you can be sure the script is understood. Most likely the
original script you supplied will work but with mine you can now check
Xpos and Ypos and make troubleshooting much easier.
The major problem is how you are using this code I think.
----------- -----------------------
John Croteau croteau
------------- -------------------------
FlashTek (Advanced Websites with Flash) http://www.FlashTek.com/
Flash Bible (Fast track to good Flash) http://www.FlashBible.com/
Flash Central(The Universe Starts Here) http://www.FlashCentral.com/
The Flash Tech Resource (Tech Notes) http://www.FlashCentral.com/tech/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
------------------------------------------------------------------------
To UNSUBSCRIBE send: unsubscribe flasher in the body of an
email to list-manager
N.B. Email address must be the same as the one you used to subscribe.
For info on digest mode send: info flasher to list-manager
Replies
FLASH: Flash4: Variables, Ed Harvey
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]

