Sunday, March 7, 2010

Project 5

For my project, I added the 3 buttons. The play button has the movie clip, and it makes the little cassette in the corner jump around. When you hover over the button it removes the play text, and when you click, it calls the buttonclip_mc. For the stop button, I created this with 4 layers; text, background, sound and body. The body is the black square, test is stop, background is the red square, and the sound is on the hover, it is just a open hi hat symbol. For my link button, I linked to the mp3 album for KRS One and Buckshout ( the album with the robot song).
Here is my actionscript:
stop();
//this will be the function for stoping/starting the animation

function clickHandler(clickevent:MouseEvent):void
{
if (clickevent.target == btnplay)
{
play();
}
if (clickevent.target == btnstop)
{
stop();
}
}
function buyHandler(event:MouseEvent):void {
navigateToURL(new URLRequest("http://www.amazon.com/Survival-Skills-Explicit/dp/B002NHH4PW/ref=dm_cd_album_lnk?ie=UTF8&qid=1268006200&sr=8-3-fkmr0"));
}

btnplay.addEventListener(MouseEvent.CLICK, clickHandler);
btnstop.addEventListener(MouseEvent.CLICK, clickHandler);
btnbuy.addEventListener(MouseEvent.CLICK, buyHandler);

And here is the preview of my project:Click Here to see Project5

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.