as3 sound length and position

2011年5月10日 星期二 by Hu, Ching-Hsiang


var so:Sound = new Sound();
var sc:SoundChannel;
so = new Sound(new URLRequest("xxx.mp3"));
so.addEventListener(Event.COMPLETE, soundLoadComplete);
sc = so.play();
function soundLoadComplete(event:Event):void {

}
sc.position //song right now position
so.length //song total length

Filed under having  

0 意見: