Posts Tagged ‘code’
Flash AS3: FLVPlayback component, onComplete
// create an event listener for a FLV Playback Component // FLVPlayback component has an instance name of: myFLVplayer // FLVPlayback component is located in a movieclip: myMovie_mc // listens for when the video has completed playing // “rewinds” it […]
Flash AS3: Switch/Case
// call switchCase(), pass in one number to execute a set of // other functions or lines of code based on that number. // limited error detection function switchCase(num:Number=NaN) { var num:Number=num; if (isNaN(num)) { throw new Error(â€no value definedâ€); […]
Flash AS3: Random Low/High
//call this function, pass it two numbers (low number, high number) // should return a random number between lo and high number // some error checking, checks to see if low number < high number function randomNumber(low:Number=NaN, high:Number=NaN):Number { var […]