Saturday, November 8, 2008

Notes Class 8 November 5, 2008

Making the sound player with albums and sounds.

When you roll over it should play song. Text will always be there. Album and truck will hold all the code for this app. Truck can create new albums and probably move them left and right. Album knows all about the individual songs and their related data.

Look at the help for flash if you get confused about what is missing when you get an error message, go to flash help and look at the top of the page it says what package it needs which will be the “flash.name” and you can us “.*” after it to get all the parts of that package. That’s for a 1046 error.

\\added sound to the loadComplete function. Then add the mouse events to the screen from some other file from the database of sample files. Put them on the loadedImage image loader. Mouseover, mouseout and click.

Gives 1120 error message. No functions for the mouse listener so you need to wire them up. Do one first and then turn it off and do the second one.



Make a new function at the bottom of the class. No other class will be able to call this function. If we wanted another thing to start the sound we would use a public function but now only the rollover will play sound. A function always gets a open close parenthesis at the end even if there is nothing inside it.

Function needs a variable to hold the data that gets sent. Use e



Check out MAMP an application that allows you to create a web server with apache server, php environment and mysql database

AMF allows flash to speak with php and mysql
Droople can allow content mgmt system feed data to flash interface
Yahoo maps has a great api for flash. You need to email them and tell them you want to use it and they will give you access. Search yahoo actionscript 3 api.

Type api as3 and you will find all kinds of stuff for flash.

The ones you want are ones that return data in xlm format.

No comments: