How to avoid ImageSprite cannibalism

1,135 views
Skip to first unread message

Scott Ferguson

unread,
Dec 7, 2015, 8:48:01 AM12/7/15
to app-inventor-de...@googlegroups.com
Update 2015/12/07: The extra ImageSprite is not needed. Just assign an empty text block to CurrentISP instead of using PlaceholderISP in the TouchUp blocks 


When more than one ImageSprite can be dragged on a Canvas, unless precautions are taken beforehand they may get 'stuck' together.
This is referred to as ImageSprite cannibalism.
This App Inventor project demonstrates a simple method to prevent this from happening using an ice hockey rink example.

A global variable, an extra ImageSprite and a couple of if blocks enable only one of two ImageSprites to be dragged at a time:




ImageSpriteCannibalism.aia
Reply all
Reply to author
Forward
Message has been deleted
0 new messages