Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Frozen script in player but works correctly in editor
- tbooker
- New to Scratch
2 posts
Frozen script in player but works correctly in editor
I have made a simple shopping cart programme, but unfortunately the behaviour is quite different in the player to the editor, and I am struggling to understand why.
http://scratch.mit.edu/projects/11950276/#player
In this project you add and remove items from your shopping cart by dragging them to the tick or cross. In the editor this all works correctly. However, in the player I can add items by dragging them to the tick, but when removing items my programme freezes and I loose all drag and drop behaviour. I have to refresh the page to get the programme working again.
Are there any known differences between the player and the edtiror? Specifically I am using a lot of cloning, and my drag and drop relies on a “wait until touching” loop. Are these known problems and is there an alternative?
http://scratch.mit.edu/projects/11950276/#player
In this project you add and remove items from your shopping cart by dragging them to the tick or cross. In the editor this all works correctly. However, in the player I can add items by dragging them to the tick, but when removing items my programme freezes and I loose all drag and drop behaviour. I have to refresh the page to get the programme working again.
Are there any known differences between the player and the edtiror? Specifically I am using a lot of cloning, and my drag and drop relies on a “wait until touching” loop. Are these known problems and is there an alternative?
- drmcw
- Scratcher
1000+ posts
Frozen script in player but works correctly in editor
The differences are that the editor allows you to drag and drop sprites but the player doesn't unless you check the allow drag in player checkbox for the sprite…which you have done. Personally I wouldn't rely on the built in drag and drop but use mouse down and go to mouse pointer blocks to do the same thing. It does look like a bug though as I think the player is detecting the sprites touching when dragging which then deletes the clone and then presumably gets the drag and drop code in a twist.
- tbooker
- New to Scratch
2 posts
Frozen script in player but works correctly in editor
Thanks for the advice. I have implemented my own drag and drop and this seems much more stable.
- Discussion Forums
- » Help with Scripts
- » Frozen script in player but works correctly in editor