Making Animal Sound App







3. Click on the very first link.



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


3. Click on the very first link.
4. Click on the Create Apps! Option on the top for getting started.
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.
Select Layout in the left and drag & drop 3 horizontal arrangements for the arranging components.
Select Horizontal arrangements and change it’s height and width to fill-parent.
Do the same for all the three layouts.
On the left palette go to media and drag and drop six sound components on the viewer.
After adding six sound components, the layout should look like this:
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.
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.
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.
Select this button and change it’s size, text and background color. In the last rename this button.
Now we will code for this
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.
When we click on the STOP button, every sound will get stopped at that moment.