I have a counter that counts down in a game. In normal testing it works. When opening a web browser the timer is zeroed from the beginning. Any ideas?
Printable View
I have a counter that counts down in a game. In normal testing it works. When opening a web browser the timer is zeroed from the beginning. Any ideas?
Can you upload an MFA so we can identify exactly whats not working in the flash runtime?
There are a couple different ways to do this type of counter/timer and I don't want to assume how your doing it.
Then I am sure it can get corrected pretty quickly.
Here you are. Try playing normally and with SWF.
Any updates ?
Not really.
Its going to be a little bit the bug will be investigated first and a fix produced and tested.
So if you need to do this right now you might have to switch to a counter and countdown via the events and not use the timer.
Well, I'm new to MMF. Just purchased it 5 days ago. Can you elaborate more on the counter method?
Put a counter on the screen
Start of frame set the counter to the value you want
Make an event -- Every second reduce the counter by 1
Make another event -- Test for the counter to be = to 0
Downside of this is it will only count the seconds -- Hopefully Francois can look into the other timer to see why its not working right.
Couldn't he also use the Every 00:02 seconds (for 20 milliseconds) for more precision?
HYPERMATTER, I would do:
* Every 00:02 seconds
- Add 0.02 to counter
* Counter - x <= 0 //X being the amount of seconds you want to wait
+ Only one action when event loops
- Do stuff
Sure and if he wants to display the partial seconds he will need to do a bit of event work.
This is great guys. Thanks for the help it worked. Although i found another bug. Text counters get cropped from below when exported to flash. You have to make the enclosing icon area wider from below thave it appear complete.
Yes, this is a known issue related to text display.