Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Flash player
- griffinclaw303
-
10 posts
Flash player
I am coding a game, but, one script always crashes the flash player on any computer that I'm using! How can I test my game if this happens?
- super_crazy
-
100+ posts
Flash player
Could you please share and add a link to the project in which the problem occurs so we can try fix the problem. 
Is the script which crashes a “define” block? If so then perhaps the problem is that it is set to “run without refresh” and is stuck in a loop. This causes it to forever loop through the code without refreshing the screen and therefore crashing flash player.

Is the script which crashes a “define” block? If so then perhaps the problem is that it is set to “run without refresh” and is stuck in a loop. This causes it to forever loop through the code without refreshing the screen and therefore crashing flash player.
- griffinclaw303
-
10 posts
Flash player
Your text to link here…
It does use a ‘define’ block, but that works. The script that crashes doesn't use one.
It does use a ‘define’ block, but that works. The script that crashes doesn't use one.
- super_crazy
-
100+ posts
Flash player
The problem lies in ‘sprite 1’. You are always creating a clone in the forever loop then the clone is also creating a clone before it deletes itself. This means the project is very quickly creating and deleting many clones causing the project to crash.
You do not need to forever create a clone but rather only once every few seconds then delete the clone once it reaches the top.
For Example:
This will stop it from crashing the project. I think this is what you were trying to achieve however if it isn't feel free to ask.
If you want the clones to spawn randomly along the bottom you can add this to the top of the “when I start as a clone” block:
Anyway, I hope that solved your problem
Super_crazy
You do not need to forever create a clone but rather only once every few seconds then delete the clone once it reaches the top.
For Example:
This will stop it from crashing the project. I think this is what you were trying to achieve however if it isn't feel free to ask.
If you want the clones to spawn randomly along the bottom you can add this to the top of the “when I start as a clone” block:
Anyway, I hope that solved your problem

Super_crazy
- Discussion Forums
- » Help with Scripts
-
» Flash player