App Inventor Resources and Tips Page

Attn Pioneer Students:

DropBall project code. Improve and modify the code.

Tip! Let’s first look at some important features of the Canvas component:

App Inventor assigns numbers to the four edges of the canvas, as shown in this diagram. These numbers are used to detect when the ball has hit the bottom edge (edge = -1). Also, notice how the ball’s and the sprite’s  heading property is defined:  a heading of 90 degrees means that the ball or sprite is aimed toward the top of the canvas.   A heading of 0 means that the ball is heading toward the right edge.Notice also that you can change the heading by the simple expression: (360 – heading):


Current Heading New Heading
90 360-90 = 270
240 360-240 = 120

Set the new headings and see how the ball bounces off the sprite. See below.




Working on Oh My Spikes Tutorial, download the barebone project

Watch the game video


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: