{"id":1038,"date":"2010-03-09T09:59:38","date_gmt":"2010-03-09T16:59:38","guid":{"rendered":"https:\/\/onebitpixel.com\/aml\/?p=1038"},"modified":"2010-03-11T14:46:29","modified_gmt":"2010-03-11T21:46:29","slug":"flash-as3-flvplayback-component-oncomplete","status":"publish","type":"post","link":"https:\/\/onebitpixel.com\/aml\/?p=1038","title":{"rendered":"Flash AS3: FLVPlayback component, onComplete"},"content":{"rendered":"<p>\/\/ create an event listener for a FLV Playback Component<\/p>\n<p>\/\/ FLVPlayback component has an instance name of: myFLVplayer<br \/>\n\/\/ FLVPlayback component is located in a movieclip: myMovie_mc<\/p>\n<p>\/\/ listens for when the video has completed playing<br \/>\n\/\/ &#8220;rewinds&#8221; it to the beginning of the footage and plays it again&#8230;<\/p>\n<pre>import fl.video.*;\r\n<pre>\/\/import fl.video.FLVPlayback;<\/pre>\n<p>myMovie_mc.myFLVplayer.addEventListener(VideoEvent.COMPLETE, donePlaying);<\/p>\n<p>function donePlaying(e:VideoEvent):void {<\/p>\n<p>\/\/ trace(&#8220;myFLVplayer has stopped playing, rewinding video to beginning.&#8221;);<\/p>\n<p>myMovie_MC.myFLVplayer.seek(0);<br \/>\nmyMovie_MC.myFLVplayer.play();<br \/>\n}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\/\/ create an event listener for a FLV Playback Component \/\/ FLVPlayback component has an instance name of: myFLVplayer \/\/ FLVPlayback component is located in a movieclip: myMovie_mc \/\/ listens for when the video has completed playing \/\/ &#8220;rewinds&#8221; it [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[75],"tags":[4,114,113],"class_list":["post-1038","post","type-post","status-publish","format-standard","hentry","category-tutorials","tag-actionscript","tag-code","tag-flash"],"_links":{"self":[{"href":"https:\/\/onebitpixel.com\/aml\/index.php?rest_route=\/wp\/v2\/posts\/1038","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/onebitpixel.com\/aml\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/onebitpixel.com\/aml\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/onebitpixel.com\/aml\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/onebitpixel.com\/aml\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1038"}],"version-history":[{"count":5,"href":"https:\/\/onebitpixel.com\/aml\/index.php?rest_route=\/wp\/v2\/posts\/1038\/revisions"}],"predecessor-version":[{"id":1041,"href":"https:\/\/onebitpixel.com\/aml\/index.php?rest_route=\/wp\/v2\/posts\/1038\/revisions\/1041"}],"wp:attachment":[{"href":"https:\/\/onebitpixel.com\/aml\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1038"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/onebitpixel.com\/aml\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1038"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/onebitpixel.com\/aml\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1038"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}