Created
January 14, 2012 00:52
-
-
Save mmurray/1609647 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package { | |
import flash.display.MovieClip; | |
import flash.external.ExternalInterface; | |
public class AudioPlayer extends MovieClip { | |
public function AudioPlayer():void { | |
if(ExternalInterface.available) { | |
ExternalInterface.call( "Mozart.log" , "> mozart - flash audio player initialized <"); | |
ExternalInterface.addCallback("playFlash", playTrack); | |
ExternalInterface.addCallback("pauseFlash", pauseTrack); | |
} | |
} | |
public function playTrack():void { | |
ExternalInterface.call( "> mozart - playTrack <"); | |
} | |
public function pauseTrack():void { | |
ExternalInterface.call( "> mozart - pauseTrack <"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment