<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>homer gaines &#187; ActionScript 2.0</title>
	<atom:link href="http://www.homergaines.com/blog/category/flash/actionscript-20/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.homergaines.com/blog</link>
	<description>Freelance Web Designer &#38; Flash Developer</description>
	<lastBuildDate>Fri, 04 Jun 2010 16:39:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>Passing Variables to A Function in ActionScript 3</title>
		<link>http://www.homergaines.com/blog/2008/11/passing-varibles-to-a-function-in-as3/</link>
		<comments>http://www.homergaines.com/blog/2008/11/passing-varibles-to-a-function-in-as3/#comments</comments>
		<pubDate>Fri, 07 Nov 2008 21:36:53 +0000</pubDate>
		<dc:creator>homer</dc:creator>
				<category><![CDATA[ActionScript 2.0]]></category>
		<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[addEventListener]]></category>
		<category><![CDATA[as2]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[homergaines]]></category>
		<category><![CDATA[variable]]></category>
		<category><![CDATA[xirclebox]]></category>

		<guid isPermaLink="false">http://www.homergaines.com/blog/?p=320</guid>
		<description><![CDATA[I have asked and have been asked, &#8220;How do I pass a variable to a function when using the addEventListener to call a function in ActionScript 3?&#8221; Passing a variable to a function in ActionScript 2 was a fairly simple task. However, it is not so easy using ActionScript 3. There are a few more [...]]]></description>
			<content:encoded><![CDATA[<p>I have asked and have been asked, &#8220;How do I pass a variable to a function when using the addEventListener to call a function in ActionScript 3?&#8221;</p>
<p>Passing a variable to a function in ActionScript 2 was a fairly simple task. However, it is not so easy using ActionScript 3. There are a few more things you must do first.</p>
<p>In ActionScript 2, passing a string variable looked like this.</p>
<blockquote><p><code>my_btn.onRelease = function(){<br />
doThis("whatever variable you want goes here");<br />
}</code></p>
<p><code>function doThis(a:String){<br />
trace(a);<br />
}</code></p></blockquote>
<p>In ActionScript 3, this is what I need to do to get the same results.  I initially wrote the example below thinking at some point, I will have several buttons that the user will interact with such as a navigation menu.</p>
<blockquote><p><code>var b:Array = [b1_btn, b2_btn, b3_btn];<br />
var a:Array = ["zero","one","two"];</code></p>
<p><code>for (var i:int = 0; i&lt;b.length; i++) {</code><br />
<code><br />
b[i].addEventListener(MouseEvent.CLICK, clickedOne);<br />
function clickedOne(e:MouseEvent):void {<br />
for (var j:int = 0; j&lt;a.length; j++) {<br />
if (e.currentTarget.name == b[j].name) {<br />
doThis(a[j])<br />
}<br />
}<br />
}<br />
}</code></p>
<p><code>function doThis(v:String):void {<br />
trace(v);<br />
}</code></p></blockquote>
<p><a href="http://www.homergaines.com/blog/wp-content/uploads/2008/11/hg_passingvars.zip">Get the source fla file here.</a></p>
<p>If you have any questions just drop me a line.</p>
<p>UPDATE!!!</p>
<p><strong>There&#8217;s more than one way to solve this problem.</strong></p>
<p>Thanks to <a href="mailto:kidneycreation@hotmail.com">kcreation</a> for this solution.</p>
<blockquote><p>var btns:Array = [b1_btn, b2_btn, b3_btn];<br />
var a:Array = ["zero","one","two"];</p>
<p>for (var b in btns) {<br />
btns[b].name = b;<br />
btns[b].addEventListener(MouseEvent.CLICK, clickedOne);<br />
}</p>
<p>function clickedOne(e:MouseEvent):void {<br />
var b:int = int(event.currentTarget.name);<br />
doThis(a[b]);<br />
}</p>
<p>function doThis(v:String):void {<br />
trace(v);<br />
}</p></blockquote>
<p>Thanks to <a href="http://www.as3errors.com/" target="_blank"><span>Mykola Bilokonsky</span></a> for this solution.</p>
<blockquote><p>var buttons:Array = [b1_btn, b2_btn, b3_btn];</p>
<p>var dict:Dictionary = new Dictionary();<br />
dict[b1_btn] = &#8220;String Argument&#8221;;<br />
dict[b2_btn] = new MySampleMovieClip();<br />
dict[b3_btn] = 7</p>
<p>for each (var b:MovieClip in buttons) {<br />
b.buttonMode = true;<br />
b.addEventListener(MouseEvent.CLICK, myHandler);<br />
}</p>
<p>function myHandler(e:MouseEvent):void {<br />
var myVariable = dict[e.currentTarget];<br />
}</p></blockquote>
<div id='retweet_button' style='float:left;margin-left: 10px;'><a class="addthis_button" addthis:url="http://www.homergaines.com/blog/2008/11/passing-varibles-to-a-function-in-as3/" href="http://www.addthis.com/bookmark.php?v=250&amp;pub=xa-4a9a4e0e5333be83"><img src="http://s7.addthis.com/static/btn/sm-share-en.gif" width="83" height="16" alt="Bookmark and Share" style="border:0;margin-bottom: 4px; margin-right: 8px;"/></a><script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js?pub=xa-4a9a4e0e5333be83"></script><script type="text/javascript">url='http://www.homergaines.com/blog/2008/11/passing-varibles-to-a-function-in-as3/';size='small';</script><script type="text/javascript" src="http://www.retweet.com/static/retweets.js"></script></div>]]></content:encoded>
			<wfw:commentRss>http://www.homergaines.com/blog/2008/11/passing-varibles-to-a-function-in-as3/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Tween.onMotion Methods</title>
		<link>http://www.homergaines.com/blog/2008/10/tweenonmotion-methods/</link>
		<comments>http://www.homergaines.com/blog/2008/10/tweenonmotion-methods/#comments</comments>
		<pubDate>Tue, 14 Oct 2008 15:36:46 +0000</pubDate>
		<dc:creator>homer</dc:creator>
				<category><![CDATA[ActionScript 2.0]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[actionscript 2]]></category>
		<category><![CDATA[as2]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[reference]]></category>
		<category><![CDATA[tween]]></category>

		<guid isPermaLink="false">http://www.homergaines.com/blog/?p=271</guid>
		<description><![CDATA[Pulled these out of the Flash Help section and figured I post them here as a reference. AS2 Method Description Tween.continueTo() Instructs the tweened animation to continue from its current value to a new value. Tween.fforward() Forwards the tweened animation directly to the end of the animation. Tween.nextFrame() Forwards the tweened animation to the next [...]]]></description>
			<content:encoded><![CDATA[<p>Pulled these out of the Flash Help section and figured I post them here as a reference. </p>
<h2><strong>AS2</strong></h2>
<p><strong>Method Description </strong></p>
<blockquote><p><strong>Tween.continueTo()</strong><br />
Instructs the tweened animation to continue from its current value to a new value.</p>
<p><strong>Tween.fforward()</strong><br />
Forwards the tweened animation directly to the end of the animation.</p>
<p><strong>Tween.nextFrame()</strong><br />
Forwards the tweened animation to the next frame.<br />
<strong><br />
Tween.prevFrame()</strong><br />
Directs the tweened animation to the frame previous to the current frame.</p>
<p><strong>Tween.resume()</strong><br />
Resumes a tweened animation from its stopped point in the animation.</p>
<p><strong>Tween.rewind()</strong><br />
Rewinds a tweened animation to the beginning of the tweened animation.</p>
<p><strong>Tween.start()</strong><br />
Starts the tweened animation from the beginning.</p>
<p><strong>Tween.stop()</strong><br />
Stops the tweened animation at its current position.</p>
<p><strong>Tween.toString()</strong><br />
Returns the class name, &#8220;[Tween]&#8220;.</p>
<p><strong>Tween.yoyo()</strong><br />
Instructs the tweened animation to play in reverse from its last direction of tweened property increments.</p></blockquote>
<p><strong>Event Description </strong></p>
<blockquote><p><strong>Tween.onMotionChanged</strong><br />
Event handler; invoked with each change in the tweened object&#8217;s property that is being animated.</p>
<p><strong>Tween.onMotionFinished</strong><br />
Event handler; invoked when the Tween object finishes its animation.</p>
<p><strong>Tween.onMotionResumed</strong><br />
Event handler; invoked when the Tween.resume() method is called, causing the tweened animation to resume.</p>
<p><strong>Tween.onMotionStarted</strong><br />
Event handler; invoked when the Tween.start() method is called, causing the tweened animation to start.</p>
<p><strong>Tween.onMotionStopped</strong><br />
Event handler; invoked when the Tween.stop() method is called, causing the tweened animation to stop.</p></blockquote>
<h2><strong>AS3</strong></h2>
<p><strong>Method Description </strong></p>
<blockquote><p><strong>Tween(obj:Object, prop:String, func:Function, begin:Number, finish:Number, duration:Number, useSeconds:Boolean = false)</strong><br />
Creates an instance of the Tween class.</p>
<p><strong>continueTo(finish:Number, duration:Number):void </strong><br />
Instructs the tweened animation to continue tweening from its current animation point to a new finish and duration point.</p>
<p><strong>fforward():void </strong><br />
Forwards the tweened animation directly to the final value of the tweened animation.</p>
<p><strong>nextFrame():void </strong><br />
Forwards the tweened animation to the next frame of an animation that was stopped.</p>
<p><strong>prevFrame():void </strong><br />
Plays the previous frame of the tweened animation from the current stopping point of an animation that was stopped.</p>
<p><strong>resume():void </strong><br />
Resumes the play of a tweened animation that has been stopped.</p>
<p><strong>rewind(t:Number = 0):void </strong><br />
Moves the play of a tweened animation back to its starting value.</p>
<p><strong>stop():void </strong><br />
Stops the play of a tweened animation at its current value.</p>
<p><strong>yoyo():void </strong><br />
Instructs the tweened animation to play in reverse from its last direction of tweened property increments.</p></blockquote>
<p><strong>Event Description </strong></p>
<blockquote><p><strong>TweenEvent.motionChange</strong><br />
Indicates that the Tween has changed and the screen has been updated. </p>
<p><strong>TweenEvent.motionFinish</strong><br />
Indicates that the Tween has reached the end and finished. </p>
<p><strong>TweenEvent.motionLoop</strong><br />
Indicates that the Tween has restarted playing from the beginning in looping mode. </p>
<p><strong>TweenEvent.motionResume</strong><br />
Indicates that the Tween has resumed playing after being paused. </p>
<p><strong>TweenEvent.motionStart</strong><br />
Indicates that the motion has started playing. </p>
<p><strong>TweenEvent.motionStop</strong><br />
Indicates that the Tween has been stopped with an explicit call to Tween.stop().</p></blockquote>
<div id='retweet_button' style='float:left;margin-left: 10px;'><a class="addthis_button" addthis:url="http://www.homergaines.com/blog/2008/10/tweenonmotion-methods/" href="http://www.addthis.com/bookmark.php?v=250&amp;pub=xa-4a9a4e0e5333be83"><img src="http://s7.addthis.com/static/btn/sm-share-en.gif" width="83" height="16" alt="Bookmark and Share" style="border:0;margin-bottom: 4px; margin-right: 8px;"/></a><script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js?pub=xa-4a9a4e0e5333be83"></script><script type="text/javascript">url='http://www.homergaines.com/blog/2008/10/tweenonmotion-methods/';size='small';</script><script type="text/javascript" src="http://www.retweet.com/static/retweets.js"></script></div>]]></content:encoded>
			<wfw:commentRss>http://www.homergaines.com/blog/2008/10/tweenonmotion-methods/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Tween Import : AS2 and AS3</title>
		<link>http://www.homergaines.com/blog/2008/09/tween-import/</link>
		<comments>http://www.homergaines.com/blog/2008/09/tween-import/#comments</comments>
		<pubDate>Fri, 26 Sep 2008 20:15:41 +0000</pubDate>
		<dc:creator>homer</dc:creator>
				<category><![CDATA[ActionScript 2.0]]></category>
		<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[homergaines]]></category>
		<category><![CDATA[import]]></category>
		<category><![CDATA[tween]]></category>
		<category><![CDATA[xirclebox]]></category>

		<guid isPermaLink="false">http://www.homergaines.com/blog/?p=223</guid>
		<description><![CDATA[I like to use code to handle basic animations like fades and sliding assets in. When you want to use the Tween class to add scripted motion to your projects, you&#8217;ll need to import these first. Actionscript 2 import mx.transitions.Tween; import mx.transitions.easing.*; Actionscript 3 import fl.transitions.Tween; import fl.transitions.easing.*; For tween methods click here. url='http://www.homergaines.com/blog/2008/09/tween-import/';size='small';]]></description>
			<content:encoded><![CDATA[<p>I like to use code to handle basic animations like fades and sliding assets in.  When you want to use the Tween class to add scripted motion to your projects, you&#8217;ll need to import these first.</p>
<h2><strong>Actionscript 2</strong></h2>
<blockquote><p><code>import mx.transitions.Tween;<br />
import mx.transitions.easing.*;</code></p></blockquote>
<h2><strong>Actionscript 3</strong></h2>
<blockquote><p><code>import fl.transitions.Tween;<br />
import fl.transitions.easing.*;</code></p></blockquote>
<p>For tween methods <a title="Tween Methods" href="http://www.homergaines.com/blog/2008/10/tweenonmotion-methods/">click here</a>.</p>
<div id='retweet_button' style='float:left;margin-left: 10px;'><a class="addthis_button" addthis:url="http://www.homergaines.com/blog/2008/09/tween-import/" href="http://www.addthis.com/bookmark.php?v=250&amp;pub=xa-4a9a4e0e5333be83"><img src="http://s7.addthis.com/static/btn/sm-share-en.gif" width="83" height="16" alt="Bookmark and Share" style="border:0;margin-bottom: 4px; margin-right: 8px;"/></a><script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js?pub=xa-4a9a4e0e5333be83"></script><script type="text/javascript">url='http://www.homergaines.com/blog/2008/09/tween-import/';size='small';</script><script type="text/javascript" src="http://www.retweet.com/static/retweets.js"></script></div>]]></content:encoded>
			<wfw:commentRss>http://www.homergaines.com/blog/2008/09/tween-import/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Serenity Now Button</title>
		<link>http://www.homergaines.com/blog/2008/09/serenity-now-button/</link>
		<comments>http://www.homergaines.com/blog/2008/09/serenity-now-button/#comments</comments>
		<pubDate>Fri, 19 Sep 2008 19:28:09 +0000</pubDate>
		<dc:creator>homer</dc:creator>
				<category><![CDATA[ActionScript 2.0]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Lab]]></category>
		<category><![CDATA[button]]></category>
		<category><![CDATA[homer gaines]]></category>
		<category><![CDATA[playing]]></category>
		<category><![CDATA[stress]]></category>
		<category><![CDATA[toy]]></category>
		<category><![CDATA[xirclebox]]></category>

		<guid isPermaLink="false">http://www.homergaines.com/blog/?p=208</guid>
		<description><![CDATA[A couple of the girls in the office were having a tough week and kept say &#8220;Serenity Now!!!&#8221; when their frustration levels were reaching critical.  They borrowed the saying from old Seinfeld episodes and even found a &#8220;Serenity Now!&#8221; montage on youtube.  Afterwards, instead of yelling out, someone would just play the video. That&#8217;s when [...]]]></description>
			<content:encoded><![CDATA[<p>A couple of the girls in the office were having a tough week and kept say &#8220;Serenity Now!!!&#8221; when their frustration levels were reaching critical.  They borrowed the saying from old Seinfeld episodes and even found a <a title="Serenity Now Montage" href="http://www.youtube.com/watch?v=5513mXmQbw4" target="_blank">&#8220;Serenity Now!&#8221; montage on youtube</a>.  Afterwards, instead of yelling out, someone would just play the video. That&#8217;s when I decided to make a button they could run on their desktop and hit when need be.</p>
<p>So if you too are having one of those days, feel free to <a title="serenitybutton.zip" href="http://www.homergaines.com/serenitybutton.zip">download </a>the <a title="serenitybutton.zip" href="http://www.homergaines.com/serenitybutton.zip">zip</a> file.  The zip contains the exe, swf and app file types. I&#8217;ll be converting it to an AIR app soon and adding other mood appropriate sayings to the mix.</p>
<div id='retweet_button' style='float:left;margin-left: 10px;'><a class="addthis_button" addthis:url="http://www.homergaines.com/blog/2008/09/serenity-now-button/" href="http://www.addthis.com/bookmark.php?v=250&amp;pub=xa-4a9a4e0e5333be83"><img src="http://s7.addthis.com/static/btn/sm-share-en.gif" width="83" height="16" alt="Bookmark and Share" style="border:0;margin-bottom: 4px; margin-right: 8px;"/></a><script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js?pub=xa-4a9a4e0e5333be83"></script><script type="text/javascript">url='http://www.homergaines.com/blog/2008/09/serenity-now-button/';size='small';</script><script type="text/javascript" src="http://www.retweet.com/static/retweets.js"></script></div>]]></content:encoded>
			<wfw:commentRss>http://www.homergaines.com/blog/2008/09/serenity-now-button/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ForceSmoothing in ActionScript 2</title>
		<link>http://www.homergaines.com/blog/2008/08/forcesmoothing-in-actionscript-2/</link>
		<comments>http://www.homergaines.com/blog/2008/08/forcesmoothing-in-actionscript-2/#comments</comments>
		<pubDate>Fri, 29 Aug 2008 21:09:36 +0000</pubDate>
		<dc:creator>homer</dc:creator>
				<category><![CDATA[ActionScript 2.0]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[forceSmoothing]]></category>
		<category><![CDATA[homergaines]]></category>
		<category><![CDATA[xirclebox]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.homergaines.com/blog/2008/08/forcesmoothing-in-actionscript-2/</guid>
		<description><![CDATA[I&#8217;m working on this project where I need to import images listed in a XML file into the application. Each image goes through a series of size variations depending on where you are in the application. Now they could have shot different sized images for me to use but to save on cost I&#8217;m working [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m working on this project where I need to import images listed in a XML file into the application.  Each image goes through a series of size variations depending on where you are in the application.  Now they could have shot different sized images for me to use but to save on cost I&#8217;m working with one larger image and scaling it as needed.  So  if you have worked with Flash before and have scaled images down, you&#8217;ll know that the image being scaled doesn&#8217;t render as smooth as you would like.  Especially when the images have detailed patterns and or colors all over the place.</p>
<p>To get around the rending issue when you drop an image on the stage I could set &#8220;Allow smoothing&#8221; in the properties menu of the image within the flash library. but since these image are dynamic, that won&#8217;t work.</p>
<p>Flash has the ability to smooth images that are loaded via loadMovie by using &#8220;forceSmoothing&#8221; but from what I have seen online, many people don&#8217;t see a difference when using it.</p>
<p>After messing around with it, I did manage to get it to work.</p>
<p>First I tried to apply forceSmoothing to the clip from my actions layer.</p>
<blockquote><p><span style="font-family: Courier New;">emptyClip.forceSmoothing = true</span></p></blockquote>
<p>this failed!</p>
<p>I had to place the code on the movieClip itself, something I try not do ever but for this project, it worked but was not 100%.</p>
<blockquote><p><span style="font-family: Courier New;">onClipEvent (load) {<br />
this.forceSmoothing = true;<br />
}<br />
</span></p></blockquote>
<p>To reach the goal I had to add &#8220;_quality = &#8220;BEST&#8221;;&#8221; to the mix.</p>
<blockquote><p>_quality = &#8220;BEST&#8221;;</p></blockquote>
<p>This told the flash to render the movie at a higher quality than the default rendering setting.  I did test this to see if it would work without the onClipEvent and it failed.</p>
<p>So in conclusion, in order to have larger images scaled down render smoothly, you will need to use &#8220;forceSmoothing&#8221; and &#8220;_quality = &#8220;BEST&#8221; together.</p>
<p>YAY!!! No more ugly looking images and the client doesn&#8217;t have to go spend more money on photo shoots!</p>
<div id='retweet_button' style='float:left;margin-left: 10px;'><a class="addthis_button" addthis:url="http://www.homergaines.com/blog/2008/08/forcesmoothing-in-actionscript-2/" href="http://www.addthis.com/bookmark.php?v=250&amp;pub=xa-4a9a4e0e5333be83"><img src="http://s7.addthis.com/static/btn/sm-share-en.gif" width="83" height="16" alt="Bookmark and Share" style="border:0;margin-bottom: 4px; margin-right: 8px;"/></a><script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js?pub=xa-4a9a4e0e5333be83"></script><script type="text/javascript">url='http://www.homergaines.com/blog/2008/08/forcesmoothing-in-actionscript-2/';size='small';</script><script type="text/javascript" src="http://www.retweet.com/static/retweets.js"></script></div>]]></content:encoded>
			<wfw:commentRss>http://www.homergaines.com/blog/2008/08/forcesmoothing-in-actionscript-2/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
		</item>
		<item>
		<title>Comparison: Importing an image using ActionScript 2 and 3</title>
		<link>http://www.homergaines.com/blog/2008/07/comparison-importing-an-image-using-actionscript-2-and-3/</link>
		<comments>http://www.homergaines.com/blog/2008/07/comparison-importing-an-image-using-actionscript-2-and-3/#comments</comments>
		<pubDate>Sat, 19 Jul 2008 19:26:49 +0000</pubDate>
		<dc:creator>homer</dc:creator>
				<category><![CDATA[ActionScript 2.0]]></category>
		<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Project Management]]></category>
		<category><![CDATA[actioscript]]></category>
		<category><![CDATA[as2]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[homergaines]]></category>
		<category><![CDATA[xirclebox]]></category>

		<guid isPermaLink="false">http://www.homergaines.com/blog/?p=134</guid>
		<description><![CDATA[If you are going to develop flash based content using AS3, you should know it takes a bit more work to do simple things.  For example, say for inistance you want to load an image into a movie clip called "imgHold_mc" using ActionScript 2,  you could use the following code:
]]></description>
			<content:encoded><![CDATA[<p>If you are going to develop flash based content using AS3, you should know it takes a bit more work to do simple things.  For example, say for inistance you want to load an image into a movie clip called &#8220;imgHold_mc&#8221; using ActionScript 2,  you could use the following code:</p>
<blockquote><p><code>function loadImage() {<br />
imgHold_mc.loadMovie(imgUrl);<br />
}<br />
loadImage();</code></p>
<p>-or-</p>
<p><code>var url:String = "imgUrl";<br />
function loadImage(link:String){<br />
imgHold.loadMovie(link);<br />
}<br />
loadImage(url);</code></p></blockquote>
<p>If you wanted to do the same thing but using ActionScript 3, you would need to use the code bellow:</p>
<blockquote><p><code>var imageLoader:Loader;<br />
function loadImage(url:String):void {<br />
imageLoader = new Loader();<br />
imageLoader.load(new URLRequest(url));<br />
imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded);<br />
}<br />
loadImage(imgUrl);<br />
function imageLoaded(e:Event):void {<br />
imgHold_mc.addChild(imageLoader);<br />
}</code></p>
<p>-or-</p>
<p><code>var imageLoader:Loader = new Loader();<br />
imageLoader.load(new URLRequest(url));<br />
imgHold_mc.addChild(imageLoader);</code></p>
<p>thanks Luis :)</p></blockquote>
<div id='retweet_button' style='float:left;margin-left: 10px;'><a class="addthis_button" addthis:url="http://www.homergaines.com/blog/2008/07/comparison-importing-an-image-using-actionscript-2-and-3/" href="http://www.addthis.com/bookmark.php?v=250&amp;pub=xa-4a9a4e0e5333be83"><img src="http://s7.addthis.com/static/btn/sm-share-en.gif" width="83" height="16" alt="Bookmark and Share" style="border:0;margin-bottom: 4px; margin-right: 8px;"/></a><script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js?pub=xa-4a9a4e0e5333be83"></script><script type="text/javascript">url='http://www.homergaines.com/blog/2008/07/comparison-importing-an-image-using-actionscript-2-and-3/';size='small';</script><script type="text/javascript" src="http://www.retweet.com/static/retweets.js"></script></div>]]></content:encoded>
			<wfw:commentRss>http://www.homergaines.com/blog/2008/07/comparison-importing-an-image-using-actionscript-2-and-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitter for Business : Pros and Cons</title>
		<link>http://www.homergaines.com/blog/2008/04/twitter-for-business-pros-and-cons/</link>
		<comments>http://www.homergaines.com/blog/2008/04/twitter-for-business-pros-and-cons/#comments</comments>
		<pubDate>Wed, 30 Apr 2008 20:49:20 +0000</pubDate>
		<dc:creator>homer</dc:creator>
				<category><![CDATA[ActionScript 2.0]]></category>
		<category><![CDATA[Project Management]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[Skipping Rocks]]></category>
		<category><![CDATA[business]]></category>
		<category><![CDATA[homergaines]]></category>
		<category><![CDATA[marketing]]></category>
		<category><![CDATA[pr]]></category>
		<category><![CDATA[promotion]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[xirclebox]]></category>

		<guid isPermaLink="false">http://www.homergaines.com/blog/?p=107</guid>
		<description><![CDATA[I&#8217;m doing some research on using twitter as a marketing tool to present to some folks. I&#8217;ll post my findings after I have given the presentation but until then, here are some initial pros and cons for businesses thinking about using twitter. Pros Free! Global reach Quick communication with followers and public time line Large [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m doing some research on using <a title="Twitter" href="http://www.twitter.com" target="_blank">twitter</a> as a marketing tool to present to some folks.  I&#8217;ll post my findings after I have given the presentation but until then, here are some initial pros and cons for businesses thinking about using twitter.</p>
<h3>Pros</h3>
<ul>
<li>Free!</li>
<li>Global reach</li>
<li>Quick communication with followers and public time line</li>
<li>Large user base and growing : Comscore shows page views growing from 10 to 20 million between February and March.</li>
<li>Ages 17 – 45 / early adopters and web savvy users</li>
<li>Free publicity &#8211; Can&#8217;t Beat That! Currently anyone with a computer/mobile and access to the internet can join and post what ever they want</li>
<li>Customizable. Certain features of the page can be made to look like your brand, product, and or company</li>
<li>Great for SEO! Crawled by search engines which puts more links out that lead to user to your site.</li>
</ul>
<h3>Cons</h3>
<ul>
<li>Uptime? Downtime?</li>
<li>Possibility of being blocked by users if you are viewed as a “spammer”</li>
<li>No moderator which means your messages will be public unless you block them, which defeats the purpose if you are trying to reach users in your demo who you are unaware of on the system. That also means the posts of anyone you follow out of courtesy will appear on your page.</li>
<li>Customer Service nightmare!! If users are customers, they may use twitter as a way to alert the company to service issues or complaints with your products and or services. And depending on the type of product/service you are marketing, laws will need to be followed when addressing complaints.</li>
</ul>
<p>More pros and cons to come.</p>
<p>Follow me on <a title="My twitter profile" href="http://twitter.com/xirclebox" target="_blank">Twitter</a>.</p>
<div id='retweet_button' style='float:left;margin-left: 10px;'><a class="addthis_button" addthis:url="http://www.homergaines.com/blog/2008/04/twitter-for-business-pros-and-cons/" href="http://www.addthis.com/bookmark.php?v=250&amp;pub=xa-4a9a4e0e5333be83"><img src="http://s7.addthis.com/static/btn/sm-share-en.gif" width="83" height="16" alt="Bookmark and Share" style="border:0;margin-bottom: 4px; margin-right: 8px;"/></a><script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js?pub=xa-4a9a4e0e5333be83"></script><script type="text/javascript">url='http://www.homergaines.com/blog/2008/04/twitter-for-business-pros-and-cons/';size='small';</script><script type="text/javascript" src="http://www.retweet.com/static/retweets.js"></script></div>]]></content:encoded>
			<wfw:commentRss>http://www.homergaines.com/blog/2008/04/twitter-for-business-pros-and-cons/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
