topical media & game development
actionscript-omr-lib-TonePlayer.ax
actionscript-omr-lib-TonePlayer.ax
[swf]
flex
package
{
import flash.media.*;
import flash.net.URLRequest;
//import myComponents.*;
public class @ax-actionscript-omr-lib-TonePlayer
{
private var mySound:Sound;
public function @ax-actionscript-omr-lib-TonePlayer(staff:actionscript_omr_lib_Staff)
{
}
public function play(pitch:actionscript_omr_lib_Pitch):void{
//fill a player queue
var noteName:String = pitch.getnoteName();
mySound = new Sound(new URLRequest("../assets/sound/samples/"+noteName+".mp3"));
mySound.play();
}
public function stop():void{
}
}
}
(C) Æliens
27/08/2009
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.