Animal Sound App

Page 1

Making Animal Sound App

to open MIT App Inventor App Inventor is a cloud-based tool, which means you can create apps for phones or tablets right in your web browser. Let’s see how to use MIT App inventor: 1. Go to Your web browser 2. Type in MIT App Inventor
Instruction

3. Click on the very first link.

4. Click on the Create Apps! Option on the top for getting started.

Animal Sound App

Objective : Learning use of buttons,Sounds, and event handling.

This lesson will explain you how to use the different components, the use of sound and button event handling concept, and how this animal sound App works.

to your MIT Platform and then create a new project and then click OK.
Getting Started Login

You will get to see this window:

: Changing App Screen
Select Screen1 in component list and find the title property on the right side and change it accordingly.
Step 1
title

Step 2: Adding Layout’s

Select Layout in the left and drag & drop 3 horizontal arrangements for the arranging components.

Step 3: Changing Properties

Select Horizontal arrangements and change it’s height and width to fill-parent.

Do the same for all the three layouts.

Step 4: Changing Background Color Select the Horizontal arrangements and change it’s background color as per your choice in the properties.
Adding Buttons
in this step we will drag 2 buttons in each horizontal arrangement from the User Interface palette.
Step 5:
Now
Changing Properties Change the properties for the button like - height, width and background color.
Step 6:
the
Step 7: Removing text Select each button and remove
text from the Text property.

Step 8: Adding Sound

On the left palette go to media and drag and drop six sound components on the viewer.

Step 9:

After adding six sound components, the layout should look like this:

Step 10 : Adding images to the button

Now in this step we will upload the animal and birds images whose sound we want to hear when we press the button. Selects the button one by one and upload images accordingly.

Step 11 : Naming buttons

Step 12: Uploading Sound Files

In every sound component we will upload the sound file of animals and birds ( format should be .mp3) then rename the sound components accordingly.

Note : To upload sound file you must have to download required sound file from the web.

Step 13: Add Stop button

In the bottom of the viewer we need to add a button as stop incase you want to stop the current sound which is played.

Step 14: Changing Properties

Select this button and change it’s size, text and background color. In the last rename this button.

Now we will code for this
Go to the Blocks Editor Click on the Right Top corner to go for the blocks.
Code It Let’s select the first button and drag and drop this block

Step 2 : Adding Sound block

When we click on the parrot button, we only want to play the parrot sound and the remaining sound will get stopped at that moment. We need to do the same for the remaining.

Step 3: Remaining Blocks

Step 4: Blocks for Stop button

When we click on the STOP button, every sound will get stopped at that moment.

Complete Blocks

Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.
Animal Sound App by bidyutedutech - Issuu