Tuesday 25 October 2011

Adding sound to my IMP in Flash

Development work covered during lesson
In order to make my IMP more interactive and enjoyable I decided to add sound to my front end. Firstly I opened Flash and selected Action Script 3.0. I then opened up my front end by going to 'file', 'open' and then I found my document and selected open. Similar to when I linked my forms in my front end we were given a list of codes that we could use to help us create our front end. In order to add sound to my front end I first clicked on the code layer of my front end and then right clicked on the first frame of this layer and selected 'actions'. After this a white box appeared which already had a lot of codes in as I had already inserted codes in order to link the forms within my IMP and make the interactive features work correctly. I then went to the code library that was provided in the shared drive and I copied box 3 as this was the code that was relevant to the task that I was doing. Below is the code that I copied before I changed it to suit my front end:


var channel:SoundChannel
var snd:Sound = new Sound(new URLRequest("SubMenuMusic.mp3"));             
channel = snd.play(1000,3);//1000 ms after start of sound, 3 times

The only change that I needed to make to this code was the 'SubMenuMusic.mp3' section as this is where the mp3 file name that I want to play when the IMP opens goes. Before I could input a name to the code I needed to find a piece of music that I thought was suitable for my front end. I didn't want anything to overpowering however I wanted something that attracted the users attention and made them want to explore the IMP to find out more information. I  looked on youtube to see if I could find a good piece of background music which would suit my IMP and in the end I found an instrumental for a song that I liked called 'Starry Eyed' by Ellie Goulding and I thought this was a perfect piece of music to go with my IMP as it wasn't to overpowering. I used Youtube to mp3 converter to convert the file to an mp3 and I named it 'IMPmusic' and saved it in my project folder. Once I had done this I then changed my code so that the mp3 file would work on my IMP. This is what the code looked like after I changed it:


var channel:SoundChannel
var snd:Sound = new Sound(new URLRequest("IMPmusic.mp3"));             
channel = snd.play(1000,3);//1000 ms after start of sound, 3 times


After I had inserted and changed the code I tested my IMP by clicking CTRL + enter in order to make sure that I had done the code correctly and that my IMP was working the way I wanted it to. 


How the development work fitted into the client brief
The development work fitted into my client brief because introducing sound to my IMP makes it a lot more interesting and attracts the user to continue to explore my IMP. Below is the section of my client brief that the development work fits into:


' In my IMP I am going to try and create a well designed front end that mirrors the theme of the films/pictures by using backgrounds on each screen which are relevant to what my IMP is about and making sure that I provide extra information and advice on my chosen theme in order to extend the value of the message that I am trying to achieve.  I may also use sound effects in order to help portray the message of my IMP and give the reader a better understanding of what my IMP is about.'


New skills table reference number
11


No comments:

Post a Comment