views:

35

answers:

2

Is there a way to output in the text filed a number of how many times the video looped? (how many times it has played)

Thanks, Yan

+1  A: 

You can use the events dispatched by the FLVPlayback class to increment the number of times played , then that value can be converted to a String for output in a TextField. You will need some form of PHP script if you need to retain that value though.

PatrickS
I agree. you can listen for VideoEvent.COMPLETE to determine when the video has reached the end, then increment your counter by 1.http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/fl/video/VideoEvent.html
turkeyburger
A: 
Eugene
I get error on the page "protected function videoplayer1_completeHandler(event:TimeEvent):void"1046: Type was not found or was not a compile-time constant: TimeEvent.
Yan
updated, if you'll get again this error, put your cursor at the end of TimeEvent and press Ctrl+Space
Eugene
forgot to import - import org.osmf.events.TimeEvent;
Yan
you are welcome)
Eugene