Please go to the code at https://scratch.mit.edu/projects/263334488/ to try it yourself.
Going to add one more feature to experiment with getting objects to react to the motion. In this case to explode a button or change a button to a small ball by moving the finger onto the button. The motion on the sprite is used to do this.
Please try the code yourself at https://scratch.mit.edu/projects/266837380/
All opinions in this blog are the Author's and should not in any way be seen as reflecting the views of any organisation the Author has any association with. Twitter @scottturneruon