We’d like to remind Forumites to please avoid political debate on the Forum.
This is to keep it a safe and useful space for MoneySaving discussions. Threads that are – or become – political in nature may be removed in line with the Forum’s rules. Thank you for your understanding.
📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!
Flash actionscript problem
tincat
Posts: 935 Forumite
in Techie Stuff
Hi all,
This is a bit obscure.
I am working on a game. It is 20 seconds long, and the player has to hit as many moving objects as he can. There are two types of objects, one that scores 1 point(z) and one that scores 5 points(n).
the variables are :
If I change the time in the variables to 61 or 37 or whatever, it will only show : blank, 1, 6, 16, 61 or blank, 3, 7, 37.
Can anyone shed any light on this? If you need the source fla I would be happy to email it to you.
Thanks
This is a bit obscure.
I am working on a game. It is 20 seconds long, and the player has to hit as many moving objects as he can. There are two types of objects, one that scores 1 point(z) and one that scores 5 points(n).
the variables are :
The scores are set as follows:z=0;
n=0;
speedz=4;
speedn=8;
intervalz=12;
intervaln=24;
hitz=0;
hitn=0;
score=0;
missed=0;
time=20;
However, when the game plays, the only scores that show up are one of the following: blank, 0, 2, 20, 22. Basically any combination of 2 and 0 or a blank space where the score should be.Z
on (press) {
gotoAndPlay(2);
_root.score++;
}
N
on (press) {
gotoAndPlay(2);
_root.score+=5;
}
If I change the time in the variables to 61 or 37 or whatever, it will only show : blank, 1, 6, 16, 61 or blank, 3, 7, 37.
Can anyone shed any light on this? If you need the source fla I would be happy to email it to you.
Thanks
0
Comments
-
Perhaps the time variable is being used twice somewhere, and is being interpreted as text. Can you 'strong type' in actionscript? If so, try changing the variable name to timeCountDown or something, and type is as a tiny integer?0
This discussion has been closed.
Confirm your email address to Create Threads and Reply
Categories
- All Categories
- 352.5K Banking & Borrowing
- 253.7K Reduce Debt & Boost Income
- 454.5K Spending & Discounts
- 245.5K Work, Benefits & Business
- 601.5K Mortgages, Homes & Bills
- 177.6K Life & Family
- 259.5K Travel & Transport
- 1.5M Hobbies & Leisure
- 16K Discuss & Feedback
- 37.7K Read-Only Boards