Created
September 16, 2011 05:40
-
-
Save minodisk/1221284 to your computer and use it in GitHub Desktop.
NetStream.Seek.Notify で再生時間が期待した値で取得できない件
This file contains 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
var connection:NetConnection = new NetConnection(); | |
connection.connect(null); | |
var stream:NetStream = new NetStream(connection); | |
stream.client = {}; | |
stream.addEventListener(NetStatusEvent.NET_STATUS, netStatus); | |
stream.play('example.f4v'); | |
setTimeout(function ():void { | |
stream.seek(100); | |
}, 5000); | |
function netStatus(e:NetStatusEvent):void { | |
switch (e.info.code) { | |
case 'NetStream.Seek.Notify': | |
trace(stream.time); // 5.039 | |
setTimeout(function ():void { | |
trace(stream.time); // 99.666 | |
}, 0); | |
break; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment