<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4923301336938576815</id><updated>2011-05-15T20:11:51.071+09:00</updated><title type='text'>Open Source ActionScript</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://open-actionscript.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4923301336938576815/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://open-actionscript.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14143553035851316111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_jrsLvrxka08/R7wZTh3fy0I/AAAAAAAAAIM/eSd8wCmok54/S220/ernie-the-elf.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>15</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4923301336938576815.post-1867726632894680817</id><published>2008-05-26T17:16:00.006+09:00</published><updated>2009-05-06T16:02:45.182+09:00</updated><title type='text'>Sliders</title><content type='html'>Sliders allow users to select a value within a constrained range.  A common example is a volume bar.  This entry will demonstrate how to use the Slider ActionScript class.&lt;br /&gt;&lt;br /&gt;This class requires two images: slide bar and slide handle.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Right click and save this image (&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_jrsLvrxka08/SDpyozNHqVI/AAAAAAAAAOA/9VEgmrqSLoA/s1600-h/slider_bar.png"&gt;&lt;img style="cursor: pointer;" src="http://3.bp.blogspot.com/_jrsLvrxka08/SDpyozNHqVI/AAAAAAAAAOA/9VEgmrqSLoA/s400/slider_bar.png" alt="" id="BLOGGER_PHOTO_ID_5204598364645599570" border="0" /&gt;&lt;/a&gt;) as &lt;span style="font-style: italic;"&gt;slide_bar&lt;/span&gt;&lt;span style="font-style: italic;"&gt;.png&lt;/span&gt; in the &lt;span style="font-style: italic;"&gt;src&lt;/span&gt; directory.  On my machine, the full path is:&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/home/kca/workspace/hello_world/src/&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Right click and save this image (&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_jrsLvrxka08/SDpypDNHqWI/AAAAAAAAAOI/6ziYte6GW5Y/s1600-h/slider_handle.png"&gt;&lt;img style="cursor: pointer; width: 10px; height: 16px;" src="http://4.bp.blogspot.com/_jrsLvrxka08/SDpypDNHqWI/AAAAAAAAAOI/6ziYte6GW5Y/s400/slider_handle.png" alt="" id="BLOGGER_PHOTO_ID_5204598368940566882" border="0" /&gt;&lt;/a&gt;) as &lt;span style="font-style: italic;"&gt;slide_handle.png&lt;/span&gt; in the &lt;span style="font-style: italic;"&gt;src&lt;/span&gt; directory.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://docs.google.com/View?docid=dppxbdr_13drj93zfh&amp;amp;hl=en"&gt;Copy and paste this XML&lt;/a&gt; into &lt;span style="font-style: italic;"&gt;asset.xml&lt;/span&gt; in the &lt;span style="font-style: italic;"&gt;src&lt;/span&gt; directory&lt;/li&gt;&lt;li&gt;At the command prompt, run this command in the &lt;span style="font-style: italic;"&gt;src&lt;/span&gt; directory:&lt;br /&gt;&lt;pre&gt;swfmill simple asset.xml asset.swf&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;This will rebuild the asset library.  A new SWF file should now exist in the &lt;span style="font-style: italic;"&gt;src&lt;/span&gt; directory called &lt;span style="font-style: italic;"&gt;asset.swf&lt;/span&gt;.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Add a new ActionScript Class in the &lt;span style="font-style: italic;"&gt;oas2&lt;/span&gt; subfolder called &lt;span style="font-weight: bold;"&gt;Slider&lt;/span&gt;.  &lt;a href="http://docs.google.com/View?id=dppxbdr_146qqx2gkh"&gt;Copy and paste this code.&lt;/a&gt;  Save changes.&lt;/li&gt;&lt;li&gt;Double click source file &lt;span style="font-style: italic;"&gt;Application.as&lt;/span&gt; to edit&lt;/li&gt;&lt;li&gt;Above the class constructor:&lt;br /&gt;&lt;pre&gt;private var _slider_value_text_field:TextField ;&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;At the bottom of function &lt;span style="font-style: italic;"&gt;init&lt;/span&gt;, add this code:&lt;br /&gt;&lt;pre&gt;var my_slider:Slider = Slider.create(this, "my_slider", 150, 300 ,&lt;br /&gt;    "asset_slider_bar" , "asset_slider_handle") ;&lt;br /&gt;my_slider.set_maximum(150) ;&lt;br /&gt;my_slider.set_value(25) ;&lt;br /&gt;&lt;br /&gt;createTextField("_slider_value_text_field", getNextHighestDepth(), 225, 300, 325, 400) ;&lt;br /&gt;&lt;br /&gt;my_slider.onValueChange = function(value:Number) {&lt;br /&gt;&lt;br /&gt;instance._slider_value_text_field.text = "" + Math.round(value) ;&lt;br /&gt;&lt;br /&gt;} ;  // end my_slider.onValueChange = function(value:Number)&lt;br /&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;Save the file, and the SWF file is automatically rebuilt by Eclipse. Click to see the new slider.  Drag the slider to see the label update with the current slider value.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;&lt;embed pluginspage="http://www.macromedia.com/go/getflashplayer" src="http://kevinarpe.googlepages.com/Application-Slider.swf" type="application/x-shockwave-flash" width="640" height="480"&gt;&lt;/embed&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4923301336938576815-1867726632894680817?l=open-actionscript.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://open-actionscript.blogspot.com/feeds/1867726632894680817/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4923301336938576815&amp;postID=1867726632894680817' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4923301336938576815/posts/default/1867726632894680817'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4923301336938576815/posts/default/1867726632894680817'/><link rel='alternate' type='text/html' href='http://open-actionscript.blogspot.com/2008/05/sliders.html' title='Sliders'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14143553035851316111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_jrsLvrxka08/R7wZTh3fy0I/AAAAAAAAAIM/eSd8wCmok54/S220/ernie-the-elf.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_jrsLvrxka08/SDpyozNHqVI/AAAAAAAAAOA/9VEgmrqSLoA/s72-c/slider_bar.png' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4923301336938576815.post-3952428667188750191</id><published>2008-05-26T13:27:00.005+09:00</published><updated>2008-12-10T20:40:04.319+09:00</updated><title type='text'>Toggle Buttons</title><content type='html'>Toggle buttons are a common variation on simple buttons.  An easy example is a play button that changes to a pause button when clicked and vice versa.  From the previous post, the ActionScript class &lt;span style="font-style: italic;"&gt;SimpleButton&lt;/span&gt; already has toggle button capabilities.  This post will demonstrate how to use.&lt;br /&gt;&lt;br /&gt;A toggle button requires three additional states: toggled up, toggled over, and toggled down.  Three additional images will be supplied for the toggled state.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Right click and save this image (&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_jrsLvrxka08/SDo9XDNHqSI/AAAAAAAAANo/0finbo4VAhw/s1600-h/green_rect.png"&gt;&lt;img style="cursor: pointer;" src="http://4.bp.blogspot.com/_jrsLvrxka08/SDo9XDNHqSI/AAAAAAAAANo/0finbo4VAhw/s400/green_rect.png" alt="" id="BLOGGER_PHOTO_ID_5204539785586649378" border="0" /&gt;&lt;/a&gt;) as &lt;span style="font-style: italic;"&gt;green_rect.png&lt;/span&gt; in the &lt;span style="font-style: italic;"&gt;src&lt;/span&gt; directory.  This will be our "toggled up state".&lt;br /&gt;On my machine, the full path is:&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/home/kca/workspace/hello_world/src/&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Right click and save this image (&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_jrsLvrxka08/SDo9XTNHqTI/AAAAAAAAANw/6YlqxLSKIt0/s1600-h/light_green_rect.png"&gt;&lt;img style="cursor: pointer;" src="http://1.bp.blogspot.com/_jrsLvrxka08/SDo9XTNHqTI/AAAAAAAAANw/6YlqxLSKIt0/s400/light_green_rect.png" alt="" id="BLOGGER_PHOTO_ID_5204539789881616690" border="0" /&gt;&lt;/a&gt;) as &lt;span style="font-style: italic;"&gt;light_green_rect.png&lt;/span&gt; in the &lt;span style="font-style: italic;"&gt;src&lt;/span&gt; directory.  This will be our "toggled over state".&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Right click and save this image (&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_jrsLvrxka08/SDo9XTNHqUI/AAAAAAAAAN4/VMUOPr9X0cA/s1600-h/very_light_green_rect.png"&gt;&lt;img style="cursor: pointer;" src="http://1.bp.blogspot.com/_jrsLvrxka08/SDo9XTNHqUI/AAAAAAAAAN4/VMUOPr9X0cA/s400/very_light_green_rect.png" alt="" id="BLOGGER_PHOTO_ID_5204539789881616706" border="0" /&gt;&lt;/a&gt;) as &lt;span style="font-style: italic;"&gt;very_light_green_rect.png&lt;/span&gt; in the &lt;span style="font-style: italic;"&gt;src&lt;/span&gt; directory.  This will be our "toggled down state".&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://docs.google.com/View?docid=dppxbdr_12d4kb3cgn&amp;amp;hl=en"&gt;Copy and paste this XML&lt;/a&gt; into &lt;span style="font-style: italic;"&gt;asset.xml&lt;/span&gt; in the &lt;span style="font-style: italic;"&gt;src&lt;/span&gt; directory&lt;/li&gt;&lt;li&gt;At the command prompt, run this command in the &lt;span style="font-style: italic;"&gt;src&lt;/span&gt; directory:&lt;br /&gt;&lt;pre&gt;swfmill simple asset.xml asset.swf&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;This will rebuild the asset library.  A new SWF file should now exist in the &lt;span style="font-style: italic;"&gt;src&lt;/span&gt; directory called &lt;span style="font-style: italic;"&gt;asset.swf&lt;/span&gt;.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Double click source file &lt;span style="font-style: italic;"&gt;Application.as&lt;/span&gt; to edit&lt;/li&gt;&lt;li&gt;At the bottom of function &lt;span style="font-style: italic;"&gt;init&lt;/span&gt;, add this code:&lt;br /&gt;&lt;pre&gt;var my_button:SimpleButton =&lt;br /&gt;SimpleButton.create(this, "my_button", 25, 300,&lt;br /&gt;     "asset_red_rect", "asset_pink_rect", "asset_light_pink_rect") ;&lt;br /&gt;my_button.enable_toggle_button("asset_green_rect", "asset_light_green_rect", "asset_very_light_green_rect") ;&lt;br /&gt;var char_counter:Number = 1 ;&lt;br /&gt;var instance:Application = this ;&lt;br /&gt;&lt;br /&gt;my_button.onRelease = function() {&lt;br /&gt;&lt;br /&gt;if (my_button.is_toggled()) {&lt;br /&gt;&lt;br /&gt;instance._hello_world_text_field.text = hello_world_text.substring(0, char_counter).toLowerCase() ;&lt;br /&gt;&lt;br /&gt;}  // end if (my_button.is_toggled())&lt;br /&gt;&lt;br /&gt;else  // if (!my_button.is_toggled())&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;instance._hello_world_text_field.text = hello_world_text.substring(0, char_counter) ;&lt;br /&gt;&lt;br /&gt;}  // end else if (!my_button.is_toggled())&lt;br /&gt;&lt;br /&gt;++char_counter ;&lt;br /&gt;if (char_counter &gt; hello_world_text.length) {&lt;br /&gt;&lt;br /&gt;char_counter = 1 ;&lt;br /&gt;&lt;br /&gt;}  // end if (char_counter &gt; hello_world_text.length)&lt;br /&gt;&lt;br /&gt;} ;  // end my_button.onRelease = function()&lt;/pre&gt;Save the file, and the SWF file is automatically rebuilt by Eclipse. Click to see the new red button in the bottom left. Move the mouse over and the color changes to pink; press the mouse down and it becomes light pink.&lt;/li&gt;&lt;li&gt;Click the button to toggle to green.  The words "Hello, World!" spelled, one character for each click, but each toggle converts between lower case and mixed case.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;&lt;embed pluginspage="http://www.macromedia.com/go/getflashplayer" src="http://kevinarpe.googlepages.com/Application-ToggleButton.swf" type="application/x-shockwave-flash" width="640" height="480"&gt;&lt;/embed&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4923301336938576815-3952428667188750191?l=open-actionscript.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://open-actionscript.blogspot.com/feeds/3952428667188750191/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4923301336938576815&amp;postID=3952428667188750191' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4923301336938576815/posts/default/3952428667188750191'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4923301336938576815/posts/default/3952428667188750191'/><link rel='alternate' type='text/html' href='http://open-actionscript.blogspot.com/2008/05/toggle-buttons.html' title='Toggle Buttons'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14143553035851316111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_jrsLvrxka08/R7wZTh3fy0I/AAAAAAAAAIM/eSd8wCmok54/S220/ernie-the-elf.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_jrsLvrxka08/SDo9XDNHqSI/AAAAAAAAANo/0finbo4VAhw/s72-c/green_rect.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4923301336938576815.post-2138209348996958985</id><published>2008-05-25T22:28:00.011+09:00</published><updated>2008-12-10T20:40:04.759+09:00</updated><title type='text'>Simple Buttons</title><content type='html'>In theory, simple buttons should be simple to create in Open Source ActionScript.  Unfortunately, getting all the details right isn't that easy.  It took me a few hours to get this class to work exactly like modern GUIs -- Windows, GNOME, and KDE.&lt;br /&gt;&lt;br /&gt;This class allows for three images to be used as a button:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Up state: This is the initial image for a button, when the mouse is not over or pressed.&lt;/li&gt;&lt;li&gt;Over state: This is the image when the mouse is over the button.&lt;/li&gt;&lt;li&gt;Down state: This is the image when the mouse is pressed over the button.&lt;/li&gt;&lt;/ul&gt;This entry will demonstrate how to create a button with images and map an event when it is clicked.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Right click and save this image (&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_jrsLvrxka08/SDlrNjNHqPI/AAAAAAAAANQ/xPdeSlMizDw/s1600-h/red_rect.png"&gt;&lt;img style="cursor: pointer;" src="http://1.bp.blogspot.com/_jrsLvrxka08/SDlrNjNHqPI/AAAAAAAAANQ/xPdeSlMizDw/s400/red_rect.png" alt="" id="BLOGGER_PHOTO_ID_5204308724936059122" border="0" /&gt;&lt;/a&gt;) as &lt;span style="font-style: italic;"&gt;red_rect.png&lt;/span&gt; in the &lt;span style="font-style: italic;"&gt;src&lt;/span&gt; directory.  This will be our "up state".&lt;br /&gt;On my machine, the full path is:&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/home/kca/workspace/hello_world/src/&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Right click and save this image (&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_jrsLvrxka08/SDlrbjNHqQI/AAAAAAAAANY/Kv-ZytzREDQ/s1600-h/pink_rect.png"&gt;&lt;img style="cursor: pointer;" src="http://1.bp.blogspot.com/_jrsLvrxka08/SDlrbjNHqQI/AAAAAAAAANY/Kv-ZytzREDQ/s400/pink_rect.png" alt="" id="BLOGGER_PHOTO_ID_5204308965454227714" border="0" /&gt;&lt;/a&gt;) as &lt;span style="font-style: italic;"&gt;pink_rect.png&lt;/span&gt; in the &lt;span style="font-style: italic;"&gt;src&lt;/span&gt; directory.  This will be our "over state".&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Right click and save this image (&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_jrsLvrxka08/SDlrezNHqRI/AAAAAAAAANg/IdPyJLP1eIY/s1600-h/light_pink_rect.png"&gt;&lt;img style="cursor: pointer;" src="http://2.bp.blogspot.com/_jrsLvrxka08/SDlrezNHqRI/AAAAAAAAANg/IdPyJLP1eIY/s400/light_pink_rect.png" alt="" id="BLOGGER_PHOTO_ID_5204309021288802578" border="0" /&gt;&lt;/a&gt;) as &lt;span style="font-style: italic;"&gt;light_pink_rect.png&lt;/span&gt; in the &lt;span style="font-style: italic;"&gt;src&lt;/span&gt; directory.  This will be our "down state".&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://docs.google.com/View?docid=dppxbdr_11n9d5rwft&amp;amp;hl=en"&gt;Copy and paste this XML&lt;/a&gt; into &lt;span style="font-style: italic;"&gt;asset.xml&lt;/span&gt; in the &lt;span style="font-style: italic;"&gt;src&lt;/span&gt; directory&lt;/li&gt;&lt;li&gt;At the command prompt, run this command in the &lt;span style="font-style: italic;"&gt;src&lt;/span&gt; directory:&lt;br /&gt;&lt;pre&gt;swfmill simple asset.xml asset.swf&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;This will rebuild the asset library.  A new SWF file should now exist in the &lt;span style="font-style: italic;"&gt;src&lt;/span&gt; directory called &lt;span style="font-style: italic;"&gt;asset.swf&lt;/span&gt;.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Add a new ActionScript Class in the &lt;span style="font-style: italic;"&gt;oas2&lt;/span&gt; subfolder called &lt;span style="font-weight: bold;"&gt;SimpleButton&lt;/span&gt;.  &lt;a href="http://docs.google.com/View?docid=dppxbdr_10fx9bmpcx&amp;amp;hl=en"&gt;Copy and paste this code.&lt;/a&gt;  Save changes.&lt;/li&gt;&lt;li&gt;Add a new ActionScript Class in the &lt;span style="font-style: italic;"&gt;oas2&lt;/span&gt; subfolder called &lt;span style="font-weight: bold;"&gt;GlobalMouse&lt;/span&gt;.  &lt;a href="http://docs.google.com/View?docid=dppxbdr_9pwnzw7f6&amp;amp;hl=en"&gt;Copy and paste this code.&lt;/a&gt;  Save changes.&lt;br /&gt;This class contains utility mouse routines used by class &lt;span style="font-style: italic;"&gt;SimpleButton&lt;/span&gt;.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Double click source file &lt;span style="font-style: italic;"&gt;Application.as&lt;/span&gt; to edit&lt;/li&gt;&lt;li&gt;Above the class declaration:&lt;br /&gt;&lt;pre&gt;import oas2.SimpleButton ;&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;At the bottom of function &lt;span style="font-style: italic;"&gt;init&lt;/span&gt;, add this code:&lt;br /&gt;&lt;pre&gt;var my_button:SimpleButton =&lt;br /&gt;SimpleButton.create(this, "my_button", 25, 300,&lt;br /&gt; "asset_red_rect", "asset_pink_rect", "asset_light_pink_rect") ;&lt;br /&gt;var char_counter:Number = 1 ;&lt;br /&gt;var instance:Application = this ;&lt;br /&gt;&lt;br /&gt;my_button.onRelease = function() {&lt;br /&gt;&lt;br /&gt;instance._hello_world_text_field.text = hello_world_text.substring(0, char_counter) ;&lt;br /&gt;++char_counter ;&lt;br /&gt;if (char_counter &gt; hello_world_text.length) {&lt;br /&gt;&lt;br /&gt; char_counter = 1 ;&lt;br /&gt;&lt;br /&gt;}  // end if (char_counter &gt; hello_world_text.length)&lt;br /&gt;&lt;br /&gt;} ;  // end my_button.onRelease = function()&lt;br /&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;Save the file, and the SWF file is automatically rebuilt by Eclipse. Click to see the new red button in the bottom left.  Move the mouse over and the color changes to pink; press the mouse down and it becomes light pink.&lt;/li&gt;&lt;li&gt;Click the button to see the words "Hello, World!" spelled, one character for each click.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;&lt;embed pluginspage="http://www.macromedia.com/go/getflashplayer" src="http://kevinarpe.googlepages.com/Application-SimpleButton.swf" type="application/x-shockwave-flash" width="640" height="480"&gt;&lt;/embed&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4923301336938576815-2138209348996958985?l=open-actionscript.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://open-actionscript.blogspot.com/feeds/2138209348996958985/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4923301336938576815&amp;postID=2138209348996958985' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4923301336938576815/posts/default/2138209348996958985'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4923301336938576815/posts/default/2138209348996958985'/><link rel='alternate' type='text/html' href='http://open-actionscript.blogspot.com/2008/05/buttons.html' title='Simple Buttons'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14143553035851316111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_jrsLvrxka08/R7wZTh3fy0I/AAAAAAAAAIM/eSd8wCmok54/S220/ernie-the-elf.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_jrsLvrxka08/SDlrNjNHqPI/AAAAAAAAANQ/xPdeSlMizDw/s72-c/red_rect.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4923301336938576815.post-6361797695151601365</id><published>2008-05-22T22:10:00.003+09:00</published><updated>2008-05-26T17:15:45.157+09:00</updated><title type='text'>Streaming Sounds</title><content type='html'>One main disadvantage of sound assets is they are embedded within the final SWF file.  When employing large assets, this can cause the SWF file to grow large and delay loading.  Fortunately, streaming sounds are supported by ActionScript.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Double click source file &lt;span style="font-style: italic;"&gt;Application.as&lt;/span&gt; to edit&lt;/li&gt;&lt;li&gt;At the bottom of function &lt;span style="font-style: italic;"&gt;init&lt;/span&gt;, add this code:&lt;br /&gt;&lt;pre&gt;snd.loadSound("http://kevinarpe.googlepages.com/small_sample.mp3") ;&lt;br /&gt;snd.onLoad = function(success:Boolean) {&lt;br /&gt;if (success) {&lt;br /&gt; snd.start() ;&lt;br /&gt;}&lt;br /&gt;}&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;Save the file, and the SWF file is automatically rebuilt by Eclipse. Click to hear the MP3 play after the preloader finishes.&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;&lt;embed pluginspage="http://www.macromedia.com/go/getflashplayer" src="http://kevinarpe.googlepages.com/Application-StreamingSound.swf" type="application/x-shockwave-flash" width="640" height="480"&gt;&lt;/embed&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4923301336938576815-6361797695151601365?l=open-actionscript.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://open-actionscript.blogspot.com/feeds/6361797695151601365/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4923301336938576815&amp;postID=6361797695151601365' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4923301336938576815/posts/default/6361797695151601365'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4923301336938576815/posts/default/6361797695151601365'/><link rel='alternate' type='text/html' href='http://open-actionscript.blogspot.com/2008/05/streaming-sounds.html' title='Streaming Sounds'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14143553035851316111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_jrsLvrxka08/R7wZTh3fy0I/AAAAAAAAAIM/eSd8wCmok54/S220/ernie-the-elf.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4923301336938576815.post-637526424587784870</id><published>2008-05-22T21:58:00.005+09:00</published><updated>2008-05-26T17:16:07.822+09:00</updated><title type='text'>Sound Assets</title><content type='html'>There are two ways to play sounds in ActionScript: via assets and via streams.  This entry will demonstrate how to create and play sound assets.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://kevinarpe.googlepages.com/small_sample.mp3"&gt;Right click and save this MP3&lt;/a&gt; as &lt;span style="font-style: italic;"&gt;small_sample.mp3&lt;/span&gt; in the &lt;span style="font-style: italic;"&gt;src&lt;/span&gt; directory.  On my machine, the full path is:&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/home/kca/workspace/hello_world/src/&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://docs.google.com/View?id=dppxbdr_8gnpb9fgc"&gt;Copy and paste this XML&lt;/a&gt; into &lt;span style="font-style: italic;"&gt;asset.xml&lt;/span&gt; in the &lt;span style="font-style: italic;"&gt;src&lt;/span&gt; directory&lt;/li&gt;&lt;li&gt;At the command prompt, run this command in the &lt;span style="font-style: italic;"&gt;src&lt;/span&gt; directory:&lt;br /&gt;&lt;pre&gt;swfmill simple asset.xml asset.swf&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;This will rebuild the asset library.  A new SWF file should now exist in the &lt;span style="font-style: italic;"&gt;src&lt;/span&gt; directory called &lt;span style="font-style: italic;"&gt;asset.swf&lt;/span&gt;.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Double click source file &lt;span style="font-style: italic;"&gt;Application.as&lt;/span&gt; to edit&lt;/li&gt;&lt;li&gt;At the bottom of function &lt;span style="font-style: italic;"&gt;init&lt;/span&gt;, add this code:&lt;br /&gt;&lt;pre&gt;var snd:Sound = new Sound() ;&lt;br /&gt;snd.attachSound("asset_small_sample") ;&lt;br /&gt;snd.start() ;&lt;br /&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;Save the file, and the SWF file is automatically rebuilt by Eclipse. Click to hear the MP3 play after the preloader finishes.&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;&lt;embed pluginspage="http://www.macromedia.com/go/getflashplayer" src="http://kevinarpe.googlepages.com/Application-SoundAsset.swf" type="application/x-shockwave-flash" width="640" height="480"&gt;&lt;/embed&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4923301336938576815-637526424587784870?l=open-actionscript.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://open-actionscript.blogspot.com/feeds/637526424587784870/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4923301336938576815&amp;postID=637526424587784870' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4923301336938576815/posts/default/637526424587784870'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4923301336938576815/posts/default/637526424587784870'/><link rel='alternate' type='text/html' href='http://open-actionscript.blogspot.com/2008/05/sound-assets.html' title='Sound Assets'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14143553035851316111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_jrsLvrxka08/R7wZTh3fy0I/AAAAAAAAAIM/eSd8wCmok54/S220/ernie-the-elf.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4923301336938576815.post-5272670034843374336</id><published>2008-05-14T22:58:00.005+09:00</published><updated>2008-05-25T22:43:39.566+09:00</updated><title type='text'>Preloader</title><content type='html'>Complex Flash applications on the Web normally have preloaders.  These are short animations that display the load status (by bar graph or percent) of required data for the demo.&lt;br /&gt;&lt;br /&gt;Some Flash Websites provide tutorials on how to create preloaders using the timeline.  This is only available in Adobe Flash (developer studio).  I have never seen an Open Source solution.  I created a sample preloader class that can be called prior to drawing the main screen.&lt;br /&gt;&lt;br /&gt;Add a new ActionScript Class in the &lt;span style="font-style: italic;"&gt;oas2&lt;/span&gt; subfolder called &lt;span style="font-weight: bold;"&gt;Preloader&lt;/span&gt;.  &lt;a href="http://docs.google.com/View?docid=dppxbdr_6dd2nhdgz"&gt;Copy and paste this code.&lt;/a&gt;   Save changes.&lt;br /&gt;&lt;br /&gt;Open &lt;span style="font-style: italic;"&gt;Application.as&lt;/span&gt; and delete all code.  &lt;a href="http://docs.google.com/View?id=dppxbdr_7685b9kgj"&gt; Copy and paste this code.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In the previous version, the text, rectangle, and rotating star were placed in the constructor.  This code has been moved to a private function called init().  This routine is only called after the preloader is complete.&lt;br /&gt;&lt;br /&gt;Save the file (&lt;span style="font-style: italic;"&gt;Application.as&lt;/span&gt;), and the SWF file is automatically rebuilt by Eclipse. Click to see a preloader in the Flash demo.  When finished loading, the rotating star appears.&lt;br /&gt;&lt;br /&gt;The Preloader class has been built with a special mode to simulate real world loading.  Normally, SWF files are loaded instantly from a local disk.  Use the static function &lt;span style="font-style: italic;"&gt;Preloader.enable_download_simulator&lt;/span&gt; to enable this mode.&lt;br /&gt;&lt;br /&gt;&lt;embed pluginspage="http://www.macromedia.com/go/getflashplayer" src="http://kevinarpe.googlepages.com/Application-Preloader.swf" type="application/x-shockwave-flash" width="640" height="480"&gt;&lt;/embed&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4923301336938576815-5272670034843374336?l=open-actionscript.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://open-actionscript.blogspot.com/feeds/5272670034843374336/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4923301336938576815&amp;postID=5272670034843374336' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4923301336938576815/posts/default/5272670034843374336'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4923301336938576815/posts/default/5272670034843374336'/><link rel='alternate' type='text/html' href='http://open-actionscript.blogspot.com/2008/05/preloader.html' title='Preloader'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14143553035851316111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_jrsLvrxka08/R7wZTh3fy0I/AAAAAAAAAIM/eSd8wCmok54/S220/ernie-the-elf.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4923301336938576815.post-4046530802149607807</id><published>2008-05-12T23:40:00.004+09:00</published><updated>2008-05-25T22:42:16.895+09:00</updated><title type='text'>MovieClip Subclass with Asset</title><content type='html'>The star image from the previous post can be animated with a MovieClip subclass.&lt;br /&gt;&lt;br /&gt;Add a new ActionScript Class in the &lt;span style="font-style: italic;"&gt;oas2&lt;/span&gt; subfolder called &lt;span style="font-weight: bold;"&gt;RotatingStar&lt;/span&gt;.  &lt;a href="http://docs.google.com/View?id=dppxbdr_5c4kpt9dt"&gt;Copy and paste this code.&lt;/a&gt;  Save changes.&lt;br /&gt;&lt;br /&gt;Open the main class file, &lt;span style="font-weight: bold;"&gt;Application.as&lt;/span&gt;.  Two modifications are required.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Above the class declaration:&lt;br /&gt;&lt;pre&gt;import oas2.RotatingStar ;&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;At the bottom of the class constructor:&lt;br /&gt;&lt;pre&gt;var my_star2:RotatingStar = RotatingStar.create(this, "my_star2", 250, 100, 400) ;&lt;/pre&gt;&lt;/li&gt;&lt;/ol&gt;Save the file, and the SWF file is automatically rebuilt by Eclipse. Click to see a rotating star in the Flash demo.&lt;br /&gt;&lt;br /&gt;&lt;embed pluginspage="http://www.macromedia.com/go/getflashplayer" src="http://kevinarpe.googlepages.com/Application-RotatingStar.swf" type="application/x-shockwave-flash" width="640" height="480"&gt;&lt;/embed&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4923301336938576815-4046530802149607807?l=open-actionscript.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://open-actionscript.blogspot.com/feeds/4046530802149607807/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4923301336938576815&amp;postID=4046530802149607807' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4923301336938576815/posts/default/4046530802149607807'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4923301336938576815/posts/default/4046530802149607807'/><link rel='alternate' type='text/html' href='http://open-actionscript.blogspot.com/2008/05/movieclip-subclass-with-asset.html' title='MovieClip Subclass with Asset'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14143553035851316111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_jrsLvrxka08/R7wZTh3fy0I/AAAAAAAAAIM/eSd8wCmok54/S220/ernie-the-elf.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4923301336938576815.post-4891917075313092975</id><published>2008-05-12T22:37:00.007+09:00</published><updated>2008-12-10T20:40:04.864+09:00</updated><title type='text'>Placing Assets</title><content type='html'>To place an asset on the stage (display an image, video, or play music), an asset library must first be created.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Right click and save this image (&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_jrsLvrxka08/SChIY0on_uI/AAAAAAAAANI/BoiuNIr5JKY/s1600-h/star.png"&gt;&lt;img style="cursor: pointer;" src="http://1.bp.blogspot.com/_jrsLvrxka08/SChIY0on_uI/AAAAAAAAANI/BoiuNIr5JKY/s400/star.png" alt="" id="BLOGGER_PHOTO_ID_5199485361082334946" border="0" /&gt;&lt;/a&gt;) as &lt;span style="font-style: italic;"&gt;star.png&lt;/span&gt; in the &lt;span style="font-style: italic;"&gt;src&lt;/span&gt; directory.  On my machine, the full path is:&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/home/kca/workspace/hello_world/src/&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://docs.google.com/View?id=dppxbdr_4dsc82kdr"&gt;Copy and paste this XML&lt;/a&gt; into &lt;span style="font-style: italic;"&gt;asset.xml&lt;/span&gt; in the &lt;span style="font-style: italic;"&gt;src&lt;/span&gt; directory&lt;/li&gt;&lt;li&gt;At the command prompt, run this command in the &lt;span style="font-style: italic;"&gt;src&lt;/span&gt; directory:&lt;br /&gt;&lt;pre&gt;swfmill simple asset.xml asset.swf&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;If you have swfmill installed correctly, a new SWF file should now exist in the &lt;span style="font-style: italic;"&gt;src&lt;/span&gt; directory called &lt;span style="font-style: italic;"&gt;asset.swf&lt;/span&gt;.  This is the asset library.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Return to Eclipse and right click on your project name, e.g., &lt;span style="font-style: italic;"&gt;hello_world&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;  Select &lt;span style="font-style: italic;"&gt;Properties&lt;/span&gt;&lt;/li&gt;&lt;li&gt;On the left, select &lt;span style="font-style: italic;"&gt;AS2 Builder&lt;/span&gt;; on the right, select the entry for &lt;span style="font-style: italic;"&gt;Application&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Click &lt;span style="font-style: italic;"&gt;Edit&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Enter &lt;span style="font-weight: bold;"&gt;src/asset.swf&lt;/span&gt; in the&lt;span style="font-style: italic;"&gt; Input SWF&lt;/span&gt; box&lt;/li&gt;&lt;li&gt;Click &lt;span style="font-style: italic;"&gt;OK&lt;/span&gt; to return to the Properties dialog&lt;/li&gt;&lt;li&gt;Click &lt;span style="font-style: italic;"&gt;OK&lt;/span&gt; to return to the Eclipse editor&lt;/li&gt;&lt;li&gt;Double click source file &lt;span style="font-style: italic;"&gt;Application.as&lt;/span&gt; to edit&lt;/li&gt;&lt;li&gt;At the bottom of the class constructor, add this code:&lt;br /&gt;&lt;pre&gt;var my_star:MovieClip = attachMovie("asset_star", "my_star", this.getNextHighestDepth()) ;&lt;br /&gt;my_star._x = 250 ;&lt;br /&gt;my_star._y = 50 ;&lt;br /&gt;my_star._xscale = 400 ;&lt;br /&gt;my_star._yscale = 400 ;&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;Save the file, and the SWF file is automatically rebuilt by Eclipse. Click to see a star image in the top right of the Flash demo.&lt;/li&gt;&lt;/ol&gt;A few important notes:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Inside the &lt;span style="font-style: italic;"&gt;asset.xml&lt;/span&gt; file, the movie width, height, and framerate are inherited by the SWF file output by your project.  Some might call this a weakness of the Eclipse integration or MTASC.  This may change in the future, but be aware of it now.  This can be difficult to debug if you forget!&lt;/li&gt;&lt;li&gt;Assets are not limited to a single placement.  They may be placed zero, one, or many times.  Only the MovieClip name, e.g., &lt;span style="font-style: italic;"&gt;my_star&lt;/span&gt;, must be different for each instance.&lt;/li&gt;&lt;li&gt;Currently, MTASC is limited to one asset library, but it may be possible to merge multiple asset libraries using swfmill.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://osflash.org/swfmill"&gt;Read more about swfmill here.&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;embed pluginspage="http://www.macromedia.com/go/getflashplayer" src="http://kevinarpe.googlepages.com/Application-Star.swf" type="application/x-shockwave-flash" width="640" height="480"&gt;&lt;/embed&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4923301336938576815-4891917075313092975?l=open-actionscript.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://open-actionscript.blogspot.com/feeds/4891917075313092975/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4923301336938576815&amp;postID=4891917075313092975' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4923301336938576815/posts/default/4891917075313092975'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4923301336938576815/posts/default/4891917075313092975'/><link rel='alternate' type='text/html' href='http://open-actionscript.blogspot.com/2008/05/placing-assets.html' title='Placing Assets'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14143553035851316111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_jrsLvrxka08/R7wZTh3fy0I/AAAAAAAAAIM/eSd8wCmok54/S220/ernie-the-elf.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_jrsLvrxka08/SChIY0on_uI/AAAAAAAAANI/BoiuNIr5JKY/s72-c/star.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4923301336938576815.post-7130553307569103085</id><published>2008-05-12T21:56:00.007+09:00</published><updated>2008-05-25T22:43:04.147+09:00</updated><title type='text'>MovieClip Subclass without Asset</title><content type='html'>Nearly every example I see creating MovieClip subclasses involve an asset -- bitmap, video, or sound.   What if a class draws itself?  A few tricks are required for these classes to work correctly.&lt;br /&gt;&lt;br /&gt;Building on the earlier demo, add a subdirectory under &lt;span style="font-style: italic;"&gt;src&lt;/span&gt; called &lt;span style="font-style: italic;"&gt;oas2&lt;/span&gt; (for Open ActionScript 2.0).  Right click on the &lt;span style="font-style: italic;"&gt;src&lt;/span&gt; folder: New -&gt; Other...  Then: General -&gt; Folder.  When the dialog appears, enter &lt;span style="font-weight: bold;"&gt;oas2&lt;/span&gt; in the &lt;span style="font-style: italic;"&gt;Folder name&lt;/span&gt; box.  Click &lt;span style="font-style: italic;"&gt;Finish&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Add a new ActionScript Class in the &lt;span style="font-style: italic;"&gt;oas2&lt;/span&gt; subfolder called &lt;span style="font-weight: bold;"&gt;Rectangle&lt;/span&gt;.  &lt;a href="http://docs.google.com/View?id=dppxbdr_3dpbkv5tc"&gt;Copy and paste this code.&lt;/a&gt;  Save changes.&lt;br /&gt;&lt;br /&gt;Open the main class file, &lt;span style="font-weight: bold;"&gt;Application.as&lt;/span&gt;.  Two modifications are required.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Above the class declaration:&lt;br /&gt;&lt;pre&gt;import oas2.Rectangle ;&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;At the bottom of the class constructor:&lt;br /&gt;&lt;pre&gt;var my_rectangle:Rectangle = Rectangle.create(this, "my_rect", 50, 50, 25, 25) ;&lt;/pre&gt;&lt;/li&gt;&lt;/ol&gt;Save the file, and the SWF file is automatically rebuilt by Eclipse.  Click to see a grey rectangle in the top left of the Flash demo.&lt;br /&gt;&lt;br /&gt;&lt;embed pluginspage="http://www.macromedia.com/go/getflashplayer" src="http://kevinarpe.googlepages.com/Application-Rectangle.swf" type="application/x-shockwave-flash" width="640" height="480"&gt;&lt;/embed&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4923301336938576815-7130553307569103085?l=open-actionscript.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://open-actionscript.blogspot.com/feeds/7130553307569103085/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4923301336938576815&amp;postID=7130553307569103085' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4923301336938576815/posts/default/7130553307569103085'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4923301336938576815/posts/default/7130553307569103085'/><link rel='alternate' type='text/html' href='http://open-actionscript.blogspot.com/2008/05/movieclip-subclass-without-asset.html' title='MovieClip Subclass without Asset'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14143553035851316111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_jrsLvrxka08/R7wZTh3fy0I/AAAAAAAAAIM/eSd8wCmok54/S220/ernie-the-elf.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4923301336938576815.post-8251577154491188327</id><published>2008-05-12T18:58:00.004+09:00</published><updated>2008-05-12T19:50:32.203+09:00</updated><title type='text'>Open Source Project Structure</title><content type='html'>The structure of an Open Source Flash project is different than one developed inside Adobe Flash, the commercial development studio.  On the commercial side:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;A timeline is developed&lt;/li&gt;&lt;li&gt;Assets (images, video, and sounds) are created by drawing or recording or added by import&lt;/li&gt;&lt;li&gt;ActionScript is written to animate the timeline and assets&lt;/li&gt;&lt;li&gt;Projects are saved into a single FLA file&lt;/li&gt;&lt;li&gt;Flash files are generated.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;On the Open Source side:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Imported assets are added to a library&lt;br /&gt;&lt;/li&gt;&lt;li&gt;ActionScript is written to draw and animate assets, and simulate a timeline&lt;/li&gt;&lt;li&gt;Projects are saved into directory structure&lt;/li&gt;&lt;li&gt;Flash files are generated&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;An asset library is an additional SWF file that holds your images, video, and sounds with names.  ActionScript classes refer to these assets by their names.  When compiling, MTASC accepts an input SWF to supply assets to your code.  MTASC will resolve these references correctly.&lt;br /&gt;&lt;br /&gt;If you watch demonstration videos  (like I do) for Adobe Flash available on various Websites, you will notice users first create an image -- by drawing using vectors or loading a bitmap.  Second, they can convert the image to a MovieClip by double clicking.  ActionScript code can then be associated with this MovieClip.&lt;br /&gt;&lt;br /&gt;In Open Source ActionScript, there are two equivalent processes.&lt;br /&gt;&lt;br /&gt;If the image is a bitmap or video, an asset library must first be created.  In your ActionScript code, a subclass of MovieClip is created and associated with the asset name.  Each time a copy of the asset is placed, the associated class constructor is called.&lt;br /&gt;&lt;br /&gt;If the image is drawn using vectors, a pure ActionScript solution is possible.  A subclass of MovieClip is created.  In the constructor or method, the image is created with drawing functions.  A few coding tricks are required to create a subclass of MovieClip without an associated asset.  We'll show you how later.&lt;br /&gt;&lt;br /&gt;Finally, I have yet to figure out how to fully replicate the Adobe Flash timeline in Open Source ActionScript via gotoAndPlay() and its relatives.  Fortunately, there are ways to simulate this same abstract construct without depending upon frames and scenes.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4923301336938576815-8251577154491188327?l=open-actionscript.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://open-actionscript.blogspot.com/feeds/8251577154491188327/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4923301336938576815&amp;postID=8251577154491188327' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4923301336938576815/posts/default/8251577154491188327'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4923301336938576815/posts/default/8251577154491188327'/><link rel='alternate' type='text/html' href='http://open-actionscript.blogspot.com/2008/05/open-source-project-structure.html' title='Open Source Project Structure'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14143553035851316111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_jrsLvrxka08/R7wZTh3fy0I/AAAAAAAAAIM/eSd8wCmok54/S220/ernie-the-elf.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4923301336938576815.post-8201869317920693795</id><published>2008-05-12T18:07:00.000+09:00</published><updated>2008-05-12T18:38:14.872+09:00</updated><title type='text'>ActionScript 2.0 Documentation</title><content type='html'>Adobe publishes a very complete language reference for ActionScript 2.0 here.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.adobe.com/support/documentation/en/flash/"&gt;http://www.adobe.com/support/documentation/en/flash/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The LiveDocs versions are cool in theory, but take forever to load.  You are better off using the PDF versions, even if they are 500+ page documents.  PDFs are now very quick to search in new Open Source PDF viewers.&lt;br /&gt;&lt;br /&gt;I use these two the most.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://livedocs.adobe.com/flash/9.0/main/flash_as2_language_reference.pdf"&gt;ActionScript 2.0 Language Reference&lt;br /&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://livedocs.adobe.com/flash/9.0/main/flash_as2_learning.pdf"&gt;Learning ActionScript 2.0 in Flash&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4923301336938576815-8201869317920693795?l=open-actionscript.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://open-actionscript.blogspot.com/feeds/8201869317920693795/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4923301336938576815&amp;postID=8201869317920693795' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4923301336938576815/posts/default/8201869317920693795'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4923301336938576815/posts/default/8201869317920693795'/><link rel='alternate' type='text/html' href='http://open-actionscript.blogspot.com/2008/05/actionscript-documentation.html' title='ActionScript 2.0 Documentation'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14143553035851316111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_jrsLvrxka08/R7wZTh3fy0I/AAAAAAAAAIM/eSd8wCmok54/S220/ernie-the-elf.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4923301336938576815.post-5802327668724877854</id><published>2008-05-12T18:06:00.004+09:00</published><updated>2008-05-25T20:52:25.363+09:00</updated><title type='text'>Hello, World!</title><content type='html'>To demonstrate your new tools work correctly, create a Hello, World! Flash demo.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Launch Eclipse.&lt;/li&gt;&lt;li&gt;Close the Welcome screen with the small "x" icon.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Window -&gt; Open Perspective -&gt; Other...&lt;/li&gt;&lt;li&gt;Select &lt;span style="font-style: italic;"&gt;ActionScript2&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Click &lt;span style="font-style: italic;"&gt;OK&lt;/span&gt; &lt;/li&gt;&lt;li&gt;File -&gt; New -&gt; New ActionScript Project&lt;/li&gt;&lt;li&gt;Enter &lt;span style="font-weight: bold;"&gt;hello_world&lt;/span&gt; for the project name.&lt;/li&gt;&lt;li&gt;Keep default location, project layout settings, and SWF version.&lt;/li&gt;&lt;li&gt;Click &lt;span style="font-style: italic;"&gt;Next&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Click &lt;span style="font-style: italic;"&gt;Finish&lt;/span&gt;&lt;/li&gt;&lt;li&gt;On the left you should see the Navigator.  If not, Window -&gt; Show View -&gt; Navigator.&lt;/li&gt;&lt;li&gt;Expand the &lt;span style="font-style: italic;"&gt;hello_world&lt;/span&gt; project.&lt;/li&gt;&lt;li&gt;Right click the &lt;span style="font-style: italic;"&gt;src&lt;/span&gt; folder; select New -&gt; ActionScript Class&lt;/li&gt;&lt;li&gt;Enter &lt;span style="font-weight: bold;"&gt;Application&lt;/span&gt; in the &lt;span style="font-style: italic;"&gt;Name&lt;/span&gt; box&lt;/li&gt;&lt;li&gt;Enable checkbox &lt;span style="font-style: italic;"&gt;public static main()&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Click &lt;span style="font-style: italic;"&gt;Finish&lt;/span&gt;&lt;/li&gt;&lt;li&gt;The &lt;span style="font-style: italic;"&gt;Edit build element&lt;/span&gt; dialog will open.  Leave everything alone, and click &lt;span style="font-style: italic;"&gt;OK&lt;/span&gt;&lt;/li&gt;&lt;li&gt;The &lt;span style="font-style: italic;"&gt;Properties for hello_world&lt;/span&gt; dialog will open.  Leave everything along (again), and click &lt;span style="font-style: italic;"&gt;OK&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Double click on the source file &lt;span style="font-style: italic;"&gt;Application.as&lt;/span&gt; to edit.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Copy and paste &lt;a href="http://docs.google.com/View?id=dppxbdr_2fcrhs8cm"&gt;this ActionScript source code&lt;/a&gt;.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Enable from the menu: Project -&gt; Build Automatically&lt;br /&gt;This option will rebuild the resulting SWF file after each save.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;File -&gt; Save (Ctrl + S)&lt;/li&gt;&lt;li&gt;In your project binary output folder (&lt;span style="font-style: italic;"&gt;bin&lt;/span&gt;) you will find &lt;span style="font-style: italic;"&gt;Application.swf&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Double click it to run.&lt;/li&gt;&lt;li&gt;A tiny version (scaled down) of your Flash file will show "Hello, World!".&lt;/li&gt;&lt;li&gt;In the bottom half of your output window should be a second set of tabbed windows.  You may see &lt;span style="font-style: italic;"&gt;Problems&lt;/span&gt; (compiler output), &lt;span style="font-style: italic;"&gt;LuminicBox Log Viewer&lt;/span&gt;, and &lt;span style="font-style: italic;"&gt;Tasks&lt;/span&gt;.&lt;/li&gt;&lt;li&gt;If you do not see &lt;span style="font-style: italic;"&gt;LuminicBox Log Viewer&lt;/span&gt;, activate the view.  Window -&gt; Show View -&gt; Other...  Then: ASDT -&gt; LuminicBox Log Viewer&lt;/li&gt;&lt;li&gt;There is debugging output from your Flash file.  It should say: Application initialized: _level0&lt;/li&gt;&lt;/ol&gt;Congratulations!   You have built your first Flash application.&lt;br /&gt;&lt;br /&gt;&lt;embed pluginspage="http://www.macromedia.com/go/getflashplayer" src="http://kevinarpe.googlepages.com/Application-HelloWorld.swf" type="application/x-shockwave-flash" width="640" height="480"&gt;&lt;/embed&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4923301336938576815-5802327668724877854?l=open-actionscript.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://open-actionscript.blogspot.com/feeds/5802327668724877854/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4923301336938576815&amp;postID=5802327668724877854' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4923301336938576815/posts/default/5802327668724877854'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4923301336938576815/posts/default/5802327668724877854'/><link rel='alternate' type='text/html' href='http://open-actionscript.blogspot.com/2008/05/hello-world_12.html' title='Hello, World!'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14143553035851316111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_jrsLvrxka08/R7wZTh3fy0I/AAAAAAAAAIM/eSd8wCmok54/S220/ernie-the-elf.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4923301336938576815.post-3451139278705629028</id><published>2008-05-10T20:01:00.001+09:00</published><updated>2008-05-12T18:57:48.626+09:00</updated><title type='text'>FAMES Installation</title><content type='html'>As I said on earlier posts, there are many Web pages for beginning pure Open Source Flash development, but I'm going to walk you through the basics.  In one place.&lt;br /&gt;&lt;br /&gt;If you've done any reading on other Websites about Open Source Flash development, you'll know the expression "FAMES".  It is an acronym for the four tools frequently used.  FAMES equals:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Flashout Eclipse plug-in&lt;/li&gt;&lt;li&gt;ActionScript Development Tools Eclipse plug-in (ASDT)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Motion Twin ActionScript Compiler (MTASC)&lt;/li&gt;&lt;li&gt;Eclipse Integrated Development Environment&lt;/li&gt;&lt;li&gt;swfmill&lt;/li&gt;&lt;/ul&gt;I use everything above, except the Flashout plug-in.  I cannot get &lt;span style="font-style: italic;"&gt;Flashout&lt;/span&gt; to work on my Eclipse installation.  I have found similar debugging tools are available in the standard setup for ASDT.  (We will install it below.)&lt;br /&gt;&lt;br /&gt;Install Eclipse.  Honestly, this is easier said that done.  While I have years of programming experience, I had never used Eclipse and couldn't find a Website that could explain it.  In [&lt;span style="font-style: italic;"&gt;very&lt;/span&gt;] short, it is an integrated development environment (IDE), like KDevelop, emacs, or Microsoft Visual Studio, initially written by IBM, but now managed by the Open Source community.  What makes Eclipse different than many other IDEs: it is nearly language neutral.  Separate plug-ins allow for development using different platforms, e.g., PC vs. mobile, and different languages, e.g., C++ vs. Java.  A standalone installation of Eclipse can do very little.  You need plug-ins!&lt;br /&gt;&lt;br /&gt;Additionally, Eclipse is a Java application.  I know nothing about the Java programming language, except you need a Java virtual machine (VM) to run the applications. There are competing Java VMs all supporting a variety of Java versions.  Most C and C++ programmers never notice their "version" of language being used.  In Java, this is crucial for language features (templates, etc.) and libraries.  To make things one step worse, Open Source Java VMs, until recently, have been insufficient to run some Java applications.  Getting Eclipse to run on your Java VM may be a challenge.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;JRE&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;First, install a Java Runtime Environment.  There are at least three choices:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;OpenJDK (Open Source JRE lead by Sun Microsystems)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;IcedTea (fork of OpenJDK by RedHat)&lt;/li&gt;&lt;li&gt;GIJ-based (GNU Java bytecode interpreter)&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;All should work.  You can search for "java runtime" in Adept Manager to find these JREs.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Eclipse&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Second, install Eclipse.  My version is 3.2.2.  There will be hundreds of Eclipse plug-ins available in your Adept Manager.  You only need to select package "eclipse".&lt;br /&gt;&lt;br /&gt;Try to launch Eclipse after installation to prove your JRE and Eclipse are playing nicely.  No sense progressing without this completing this step.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;MTASC&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Third, install Motion Twin ActionScript Compiler (MTASC).  Mine is version 1.13.  You can find it in Adept Manager.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;swfmill&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Fourth, install swfmill.  Mine is version 0.2.12.  You can find it in Adept Manager.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;ASDT&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Fifth, install ActionScript Development Tools (ASDT).  This is a plug-in for Eclipse to facilitate ActionScript and Flash development.  The plug-in can be installed from Eclipse directly.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Launch Eclipse.&lt;/li&gt;&lt;li&gt;Help -&gt; Software Updates -&gt; Find and Install...&lt;/li&gt;&lt;li&gt;Select &lt;span style="font-style: italic;"&gt;Search for new features to install&lt;/span&gt; and click &lt;span style="font-style: italic;"&gt;Next&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Click &lt;span style="font-style: italic;"&gt;New Remote Site...&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Enter &lt;span style="font-weight: bold;"&gt;ASDT&lt;/span&gt; in the &lt;span style="font-style: italic;"&gt;Name&lt;/span&gt; box&lt;/li&gt;&lt;li&gt;Enter &lt;span style="font-weight: bold;"&gt;http://aseclipseplugin.sourceforge.net/updates&lt;/span&gt; in the &lt;span style="font-style: italic;"&gt;URL&lt;/span&gt; box&lt;/li&gt;&lt;li&gt;Select &lt;span style="font-style: italic;"&gt;ASDT&lt;/span&gt; and click &lt;span style="font-style: italic;"&gt;Finish&lt;/span&gt;&lt;/li&gt;&lt;li&gt;After installation is complete, restart your Eclipse.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;You now have all necessary tools installed to build Open Source Flash files.  In the next post, we will cover your first Flash demo.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4923301336938576815-3451139278705629028?l=open-actionscript.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://open-actionscript.blogspot.com/feeds/3451139278705629028/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4923301336938576815&amp;postID=3451139278705629028' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4923301336938576815/posts/default/3451139278705629028'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4923301336938576815/posts/default/3451139278705629028'/><link rel='alternate' type='text/html' href='http://open-actionscript.blogspot.com/2008/05/hello-world.html' title='&lt;i&gt;FAMES&lt;/i&gt; Installation'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14143553035851316111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_jrsLvrxka08/R7wZTh3fy0I/AAAAAAAAAIM/eSd8wCmok54/S220/ernie-the-elf.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4923301336938576815.post-690569543724867650</id><published>2008-05-07T00:57:00.001+09:00</published><updated>2008-05-10T21:03:53.353+09:00</updated><title type='text'>Why Flash?</title><content type='html'>This is a personal question, not one to start a holy war about "Rich Internet Application Platforms".  (Al Gore, no doubt, will next claim this his own.)&lt;br /&gt;&lt;br /&gt;I have a blog about &lt;a href="http://kevin-tokyo.blogspot.com/"&gt;life in Tokyo (and my travels in Asia)&lt;/a&gt; that I wanted to spice up with some Flash slide shows of my photographs.  I had seen "Audio Slide Shows" on the &lt;a href="http://www.nytimes.com/pages/multimedia/index.html"&gt;New York Times Website&lt;/a&gt; that I want to imitate.  Basically, I want a National Public Radio style narrative over a slide show with some text to explain photographs.&lt;br /&gt;&lt;br /&gt;I initially tried something called &lt;a href="http://www.openlaszlo.org/"&gt;OpenLaszlo&lt;/a&gt;, but there is trouble regarding its drive to be Open Source.  I get the feeling after trying for two months to create a stand-alone player that this project is Open Source and receives updates, but only when the group has a commercial contract to complete.  Otherwise, a "community" for support is non-existent.  Groups exist, but traffic is very low.  A bad sign where traffic very defines successful Open Source projects.  Imagine committing yourself to a proprietary Open Source technology on to have its primary project (and support base) die a slow death.&lt;br /&gt;&lt;br /&gt;Further exploration of "rich Internet application platforms" lead me to realise that many were trying copy Adobe Flex.  This is a juiced version of Flash that is built by writing XML files with some ActionScript sprinkled for effects.  It smells a lot like AJAX inside Flash.  What I need is less complex than these platforms cab support.  Technology from three years ago is more than sufficient for my needs.&lt;br /&gt;&lt;br /&gt;Also, there is an unspoken obstacle / hesitation in the Open Source community to support ActionScript 3.0, the most recent incarnation.  There is wide and excellent support (some might say better than Mother Adobe) for the previous version, ActionScript 2.0.  Instead of supporting version 3.0, many are writing their own new, similar languages.  There is an Open Source ActionScript compiler called &lt;a href="http://www.mtasc.org/"&gt;MTASC&lt;/a&gt; and GNU has targeted creating an Open Source Flash player as a &lt;span style="font-style: italic;"&gt;priority&lt;/span&gt; project.  (This is a big deal for GNU when Richard Stallman makes these declarations.)  The GNU player, called &lt;a href="http://www.gnu.org/software/gnash/"&gt;Gnash&lt;/a&gt;, is targeting Flash 7+ features.  Again, this is more than I need.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4923301336938576815-690569543724867650?l=open-actionscript.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://open-actionscript.blogspot.com/feeds/690569543724867650/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4923301336938576815&amp;postID=690569543724867650' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4923301336938576815/posts/default/690569543724867650'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4923301336938576815/posts/default/690569543724867650'/><link rel='alternate' type='text/html' href='http://open-actionscript.blogspot.com/2008/05/why-flash.html' title='Why Flash?'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14143553035851316111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_jrsLvrxka08/R7wZTh3fy0I/AAAAAAAAAIM/eSd8wCmok54/S220/ernie-the-elf.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4923301336938576815.post-5957738443292046227</id><published>2008-05-07T00:45:00.001+09:00</published><updated>2008-05-10T21:04:20.578+09:00</updated><title type='text'>Introduction</title><content type='html'>This is a blog for all those interested in Open Source ActionScript for the purpose of creating Flash demos.  There are many Websites that I find myself using, but no one seems to tie it together with soup-to-nuts instructions.&lt;br /&gt;&lt;br /&gt;This blog is targeted to readers like myself: disciplined as a pure programmer with little experience on Adobe Flash (the commercial animation studio tool).  If you are Perl programmer that wants to cut a few tricks for your homepage, this is the blog for you.&lt;br /&gt;&lt;br /&gt;Even if you are a "seasoned Flash architect" (not sure what that means, but it likely sells well on Monster.com), this may be a place to share tips and tricks.&lt;br /&gt;&lt;br /&gt;As of writing, I am a Kubuntu user.  This means I use KDE on the GNU/Linux operating system.  Windows users will need to modify setup procedures slightly.  Once your operating environment is running, pure ActionScript should be identical on any platform.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4923301336938576815-5957738443292046227?l=open-actionscript.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://open-actionscript.blogspot.com/feeds/5957738443292046227/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4923301336938576815&amp;postID=5957738443292046227' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4923301336938576815/posts/default/5957738443292046227'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4923301336938576815/posts/default/5957738443292046227'/><link rel='alternate' type='text/html' href='http://open-actionscript.blogspot.com/2008/05/introduction.html' title='Introduction'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/14143553035851316111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp3.blogger.com/_jrsLvrxka08/R7wZTh3fy0I/AAAAAAAAAIM/eSd8wCmok54/S220/ernie-the-elf.jpg'/></author><thr:total>0</thr:total></entry></feed>
