Part of Lesson Plan: Flash Apps: Building an Embeddable Sound Player Part 2 of 5
Activity Overview / Details
Intro to XML Worksheet
Prior to introducing the content below, download and extract these three worksheets:
- Gather students into pairs and explain that 2 worksheets will be handed out. One person in the pair will read the worksheet titled "Introduction to XML".
- Meanwhile the other person will listen to what their group member is saying and fill in the blanks of the 2ndworksheet
- Hand out both worksheets to each group. The worksheet titled "Introduction to XML" and the worksheet titled "Introduction to XML(fill in the blanks)"
- Give students ample time to completely fill in all the blanks of their team's worksheet.
Explain that we will be making an XML Document today to store our playlist for our music player. Then during our next lesson, our XML playlist file will contain all necessary song details in it.
Before Making Our XML Document, We Will Need to Set Up our Files
Preparing External Assets
These are the songs we use in this lesson download them here
- Tilte: "Party Rock
Anthem" Artist: LMFAO
track2 - Title: "Bust a Move" Artist: Young MC
track3 - Title: "I Love College Dance REMIX Instrumental" Artist: Asher Roth
The teacher explains...
"Now, we will all need to have some .mp3 files at hand.
For future reference, just know we can also use any .mp3 file we have on your machine, but make sure that it is in .mp3 format and no other as Flash can only play this format."
- Have each student download and extract these 3 .mp3 files.
- Once each student has their .mp3 files, have them start off by creating a folder for this project somewhere on their computer. Title this folder "sound_player"
- Inside this folder have them create a new folder to host their .mp3 files.
- Have students name this folder audio.
- Inside the audio folder, have students place their three .mp3 files.
- To make this easier and to minimize the risk of typos, make sure all students rename their mp3 files to track1, track2, and track3.
Their .mp3 files are now ready...
Preparing the XML Playlist file
"We will create our XML file now. The XML file will play the role of a playlist as it will have the details of the tracks that we want to play. Again, an XML file is essentially a text file with user-defined structured coding. We may use any simple text editor to create our XML file, but today, we will use notepad."
- Have students open the notepad program and save a blank file as playlist.xml in their project folder along with your audio folder.
"In the next lesson, we are going to edit our XML playlist file with the information that we need to run our player. Our XML file will have the details of our songs, specifically:
- The URL of the song file.
- The title of the song.
- The name of the artist singing the song.
These will translate into the XML code shown below:"
Just show the students this code, do not have them type or add the code until the next lesson
<?xml version="1.0" encoding="utf-8"?>