
{"id":21,"date":"2006-05-12T22:09:07","date_gmt":"2006-05-12T21:09:07","guid":{"rendered":"http:\/\/www.matthijskamstra.nl\/blog\/?p=21"},"modified":"2007-12-24T17:15:45","modified_gmt":"2007-12-24T16:15:45","slug":"convert-swf-to-avi-swf2avi-or-swftoavi","status":"publish","type":"post","link":"https:\/\/www.matthijskamstra.nl\/blog\/2006\/05\/12\/convert-swf-to-avi-swf2avi-or-swftoavi\/","title":{"rendered":"Convert SWF to AVI (SWF2AVI or SWFtoAVI)"},"content":{"rendered":"<div class='highlight'><strong>Update: <\/strong> are you looking for a userfriendly, free SWF>>AVI converter? Read also my post about <a href=\"http:\/\/www.matthijskamstra.nl\/blog\/?p=370\">SWF>>AVI<\/a><\/div>\n<p>I was always under the assumption that you couldn&#8217;t export video with flash.<br \/>\nAnd yes I know &#8230;. there are couple ways to export video but they have some restrictions.<\/p>\n<p>To export from Flash to Quicktime (MOV) means that you SWF can&#8217;t be higher than Flash 5 and in the standard export setting AVI and MOV can&#8217;t contain script, so everything has to be animated on root timeline even animation in movieclips don&#8217;t work.<br \/>\nThere is also the possibility to export a sequence of images which has the same restriction&#8230;<\/p>\n<p><img decoding=\"async\" title=\"swf2avi main \" alt=\"swf2avi main \" src=\"http:\/\/www.pizzinini.net\/projects\/swf2avi\/images\/swf2avi_main.gif\" \/><\/p>\n<p>But since I use <a target=\"_blank\" href=\"http:\/\/www.pizzinini.net\/projects\/swf2avi\/\">swf2avi<\/a> I don&#8217;t have these restrictions no longer.<br \/>\nSwf2avi is very easy to use (what all programs with 1 aim should be). It&#8217;s quite intuitive! So no tutorial will be made by me, not even a small explanation.<br \/>\nSwf2avi will create a container (if necessary) to play your SWF frame-by-frame and creates screenshots of every frame in either BMP or JPG.<br \/>\nThis sequence can be translated afterwards to AVI with swf2avi (with the possibility of compression), an AVI can be <a href=\"http:\/\/www.matthijskamstra.nl\/blog\/?p=20\">converted to FLV<\/a> and play it with a <a href=\"http:\/\/www.matthijskamstra.nl\/blog\/?p=17\">flashVideoPlayer<\/a>.<\/p>\n<p><!--more--><br \/>\nThe only thing you have to remember that your script should be based upon frame-rate (fps) and not on time (milli-seconds).<br \/>\nThe next examples are based on a FLA with framerate of 25 fps<\/p>\n<p><strong>Example 1:<\/strong><\/p>\n<div class=\"showcode\">\n<pre>\/*\r\n\/\/ this code doesn't work (very well) because it is based on time (seconds)\r\nimport mx.transitions.Tween;\r\nvar myTween: Tween = new Tween (this.ball_mc, '_x', mx.transitions.easing.Elastic.easeOut, 0, 300, 5, true);\r\n*\/\r\n\/\/ this code will work: it's based on frames\r\nimport mx.transitions.Tween;\r\nvar myTween: Tween = new Tween (this.ball_mc, '_x', mx.transitions.easing.Elastic.easeOut, 0, 300, (5 * 25), false);\r\n<\/pre>\n<\/div>\n<p><strong>Example 2:<\/strong><\/p>\n<pre><code>\/*\r\n\/\/ timebased: doesn't work\r\nthis.onEnterFrame = function () {\r\n    this.time_txt.text = (getTimer ()\/1000) +  \" sec.\";\r\n};\r\n*\/ \r\n\/\/ based on framerate\r\nthis.onEnterFrame = function () {\r\n     this.time_txt.text = (_root._currentframe \/ 25) + \" sec.\";\r\n};\r\n<\/code><\/pre>\n<p>more information about mx.transitions: <a target=\"_blank\" href=\"http:\/\/livedocs.macromedia.com\/flash\/8\/main\/wwhelp\/wwhimpl\/common\/html\/wwhelp.htm?context=LiveDocs_Parts&#038;file=00004143.html\">macromedia<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Update: are you looking for a userfriendly, free SWF>>AVI converter? Read also my post about SWF>>AVI I was always under the assumption that you couldn&#8217;t export video with flash. And yes I know &#8230;. there are couple ways to export video but they have some restrictions. To export from Flash to Quicktime (MOV) means that [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20,3,7,6],"tags":[407,39,398,26,74,75,53,73,72],"class_list":["post-21","post","type-post","status-publish","format-standard","hentry","category-animation","category-flash","category-flash-video-player","category-open-source-freeware","tag-animation","tag-as2","tag-flash","tag-flv","tag-frame-by-frame","tag-framerate","tag-swf-to-avi","tag-swf2avi","tag-video"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.matthijskamstra.nl\/blog\/wp-json\/wp\/v2\/posts\/21","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.matthijskamstra.nl\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.matthijskamstra.nl\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.matthijskamstra.nl\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.matthijskamstra.nl\/blog\/wp-json\/wp\/v2\/comments?post=21"}],"version-history":[{"count":0,"href":"https:\/\/www.matthijskamstra.nl\/blog\/wp-json\/wp\/v2\/posts\/21\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.matthijskamstra.nl\/blog\/wp-json\/wp\/v2\/media?parent=21"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.matthijskamstra.nl\/blog\/wp-json\/wp\/v2\/categories?post=21"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.matthijskamstra.nl\/blog\/wp-json\/wp\/v2\/tags?post=21"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}