<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.3" -->
<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/"
	>

<channel>
	<title>I h♥rt actionscript.</title>
	<link>http://www.iheartactionscript.com</link>
	<description>Actionscript Tutorials and Articles for AS3 and AS2 by Rob Gungor.</description>
	<pubDate>Thu, 03 Jan 2008 19:03:41 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3</generator>
	<language>en</language>
			<item>
		<title>if() return;</title>
		<link>http://www.iheartactionscript.com/if-return/</link>
		<comments>http://www.iheartactionscript.com/if-return/#comments</comments>
		<pubDate>Thu, 03 Jan 2008 19:00:24 +0000</pubDate>
		<dc:creator>Rob Gungor</dc:creator>
		
		<category><![CDATA[AS3]]></category>

		<category><![CDATA[conditionals]]></category>

		<category><![CDATA[return]]></category>

		<guid isPermaLink="false">http://www.iheartactionscript.com/if-return/</guid>
		<description><![CDATA[I decided to write a quick little post about the advantages of using &#8220;return&#8221;. Return works in a really cool way (for those of you who don&#8217;t know).
Traditionally you use it like this:

// whatever comes after the colon determines which type to return (String, Number, CustomObject, ect.)
function returnAValue&#40;foo&#41;:String
&#123;
// in this case foo will be a [...]]]></description>
			<content:encoded><![CDATA[<p>I decided to write a quick little post about the advantages of using &#8220;return&#8221;. Return works in a really cool way (for those of you who don&#8217;t know).</p>
<p>Traditionally you use it like this:</p>
<div class="codesnip-container" >
<div class="codesnip"><span class="co1">// whatever comes after the colon determines which type to return (String, Number, CustomObject, ect.)</span><br />
<span class="kw2">function</span> returnAValue<span class="br0">&#40;</span>foo<span class="br0">&#41;</span>:<span class="kw3">String</span><br />
<span class="br0">&#123;</span><br />
<span class="co1">// in this case foo will be a String</span><br />
<span class="kw1">return</span> foo;<br />
<span class="br0">&#125;</span></p>
<p><span class="co1">//outputs testing</span><br />
<span class="kw3">trace</span><span class="br0">&#40;</span>returnAValue<span class="br0">&#40;</span><span class="st0">&#8220;testing&#8221;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;</div>
</div>
<p>If you&#8217;ve never used return - it&#8217;s a really nice way to do calculations.</p>
<div class="codesnip-container" >
<div class="codesnip"><span class="kw2">function</span> <span class="kw3">add</span><span class="br0">&#40;</span>num1:<span class="kw3">int</span>, num2:<span class="kw3">int</span><span class="br0">&#41;</span>:<span class="kw3">int</span><br />
<span class="br0">&#123;</span><br />
<span class="kw2">var</span> finalNum:<span class="kw3">int</span> = num1+num2;<br />
<span class="kw1">return</span> finalNum;<br />
<span class="br0">&#125;</span></p>
<p><span class="kw2">var</span> newNumber = <span class="kw3">add</span><span class="br0">&#40;</span><span class="nu0">5</span>, <span class="nu0">8</span><span class="br0">&#41;</span>;<br />
<span class="kw3">trace</span><span class="br0">&#40;</span>newNumber<span class="br0">&#41;</span>; <span class="co1">//outputs 13 </span><br />
&nbsp;</div>
</div>
<p>Basically - it runs the function - and then gives back the caller of that function a value. It&#8217;s built so that at the return - the function stops running and returns the value you tell it to. Another standard way of using return is to use it as a way to stop a function from running. This is a really streamlined way of using a conditional. <a href="http://www.iheartactionscript.com/if-return/#more-14" class="more-link">(more&#8230;)</a></p>

<p><span><a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.iheartactionscript.com%2Fif-return%2F&amp;title=if%28%29+return%3B" target="_blank" title="Save to del.icio.us" onclick=""> <img src="http://del.icio.us/favicon.ico" width="16" height="16" alt="del.icio.us"/></a>
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.iheartactionscript.com%2Fif-return%2F&amp;title=if%28%29+return%3B" target="_blank" title="Slashdot It!" onclick=""> <img src="http://slashdot.org/favicon.ico" width="16" height="16" alt="Slashdot"/></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.iheartactionscript.com%2Fif-return%2F&amp;title=if%28%29+return%3B" target="_blank" title="Digg This Post!" onclick=""> <img src="http://digg.com/favicon.ico" width="16" height="16" alt="Digg"/></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.iheartactionscript.com%2Fif-return%2F"" target="_blank" title="Share on Facebook!" onclick=""> <img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="Facebook"/></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.iheartactionscript.com%2Fif-return%2F" target="_blank" title="Add to my Technorati Favorites!" onclick=""> <img src="http://technorati.com/favicon.ico" width="16" height="16" alt="Technorati"/></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.iheartactionscript.com%2Fif-return%2F&amp;title=if%28%29+return%3B" target="_blank" title="Add to my Google Bookmarks!" onclick=""> <img src="http://www.google.com/favicon.ico" width="16" height="16" alt="Google"/></a>
<a href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fwww.iheartactionscript.com%2Fif-return%2F&t=if%28%29+return%3B" target="_blank" title="Add to Yahoo!" onclick=""> <img src="http://myweb2.search.yahoo.com/favicon.ico" width="16" height="16" alt="Yahoo"/></a></span></p>]]></content:encoded>
			<wfw:commentRss>http://www.iheartactionscript.com/if-return/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Replacing Strings in AS3</title>
		<link>http://www.iheartactionscript.com/replacing-strings-in-as3-split-and-splitjoin-so-nice/</link>
		<comments>http://www.iheartactionscript.com/replacing-strings-in-as3-split-and-splitjoin-so-nice/#comments</comments>
		<pubDate>Tue, 09 Oct 2007 00:41:59 +0000</pubDate>
		<dc:creator>Rob Gungor</dc:creator>
		
		<category><![CDATA[AS3]]></category>

		<guid isPermaLink="false">http://www.iheartactionscript.com/replacing-strings-in-as3-split-and-splitjoin-so-nice/</guid>
		<description><![CDATA[Although this may be pretty basic - when it comes to dealing with strings, one of the most valuable methods is no doubt the split().join().
So let&#8217;s first go over split().
This is from adobe&#8217;s live docs:
split(delimiter:String, [limit:Number]) : Array
Split has two Parameters:
delimiter:String - A string; the character or string at which my_str splits.
limit:Number [optional] - The [...]]]></description>
			<content:encoded><![CDATA[<p>Although this may be pretty basic - when it comes to dealing with strings, one of the most valuable methods is no doubt the split().join().</p>
<p>So let&#8217;s first go over split().</p>
<p>This is from adobe&#8217;s live docs:</p>
<p>split(delimiter:String, [limit:Number]) : Array</p>
<p>Split has two Parameters:<br />
delimiter:String - A string; the character or string at which my_str splits.</p>
<p>limit:Number [optional] - The number of items to place into the array.</p>
<p>Ok - don&#8217;t get confused.  Essentially if you have the string:</p>
<div class="codesnip-container" >
<div class="codesnip"><span class="kw2">var</span> myString:<span class="kw3">String</span> = <span class="st0">&#8220;% B % C % D % E % F &#8220;</span>;;</div>
</div>
<p>The first parameter (delimeter) is whatever character(s) you want to use for splitting the other characters up. So:</p>
<div class="codesnip-container" >
<div class="codesnip"><span class="kw3">trace</span><span class="br0">&#40;</span>myString.<span class="kw3">split</span><span class="br0">&#40;</span><span class="st0">&#8220;%&#8221;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>; <span class="co1">// outputs the array , B , C , D , E , F </span><br />
&nbsp;</div>
</div>
<p>The second parameter basically tells split how many times you want to do it.<br />
trace(myString.split(&#8221;%&#8221;, 4) // outputs:  B , C , D</p>
<p>So a few really cool applications of this are:</p>
<p>1 - using it to parse out data.<br />
2 - using it to replace or remove a string.<br />
 <a href="http://www.iheartactionscript.com/replacing-strings-in-as3-split-and-splitjoin-so-nice/#more-13" class="more-link">(more&#8230;)</a></p>

<p><span><a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.iheartactionscript.com%2Freplacing-strings-in-as3-split-and-splitjoin-so-nice%2F&amp;title=Replacing+Strings+in+AS3" target="_blank" title="Save to del.icio.us" onclick=""> <img src="http://del.icio.us/favicon.ico" width="16" height="16" alt="del.icio.us"/></a>
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.iheartactionscript.com%2Freplacing-strings-in-as3-split-and-splitjoin-so-nice%2F&amp;title=Replacing+Strings+in+AS3" target="_blank" title="Slashdot It!" onclick=""> <img src="http://slashdot.org/favicon.ico" width="16" height="16" alt="Slashdot"/></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.iheartactionscript.com%2Freplacing-strings-in-as3-split-and-splitjoin-so-nice%2F&amp;title=Replacing+Strings+in+AS3" target="_blank" title="Digg This Post!" onclick=""> <img src="http://digg.com/favicon.ico" width="16" height="16" alt="Digg"/></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.iheartactionscript.com%2Freplacing-strings-in-as3-split-and-splitjoin-so-nice%2F"" target="_blank" title="Share on Facebook!" onclick=""> <img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="Facebook"/></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.iheartactionscript.com%2Freplacing-strings-in-as3-split-and-splitjoin-so-nice%2F" target="_blank" title="Add to my Technorati Favorites!" onclick=""> <img src="http://technorati.com/favicon.ico" width="16" height="16" alt="Technorati"/></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.iheartactionscript.com%2Freplacing-strings-in-as3-split-and-splitjoin-so-nice%2F&amp;title=Replacing+Strings+in+AS3" target="_blank" title="Add to my Google Bookmarks!" onclick=""> <img src="http://www.google.com/favicon.ico" width="16" height="16" alt="Google"/></a>
<a href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fwww.iheartactionscript.com%2Freplacing-strings-in-as3-split-and-splitjoin-so-nice%2F&t=Replacing+Strings+in+AS3" target="_blank" title="Add to Yahoo!" onclick=""> <img src="http://myweb2.search.yahoo.com/favicon.ico" width="16" height="16" alt="Yahoo"/></a></span></p>]]></content:encoded>
			<wfw:commentRss>http://www.iheartactionscript.com/replacing-strings-in-as3-split-and-splitjoin-so-nice/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Dynamic Masking using Tweener</title>
		<link>http://www.iheartactionscript.com/dynamic-masking-using-tweener/</link>
		<comments>http://www.iheartactionscript.com/dynamic-masking-using-tweener/#comments</comments>
		<pubDate>Sat, 06 Oct 2007 06:25:51 +0000</pubDate>
		<dc:creator>Rob Gungor</dc:creator>
		
		<category><![CDATA[AS3]]></category>

		<category><![CDATA[Experiments]]></category>

		<guid isPermaLink="false">http://www.iheartactionscript.com/dynamic-masking-using-tweener/</guid>
		<description><![CDATA[Here&#8217;s a little experiment I did inspired by the new Adidas site.  I totally loved their masking technique -  Here&#8217;s my take:

    You need the Flash Player to view this.


    /**/

DOWNLOAD SOURCE 

 
 
 
]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a little experiment I did inspired by the <a href="http://www.adidas.com/y-3/fw07/">new Adidas site</a>.  I totally loved their masking technique -  Here&#8217;s my take:</p>
<div align="left" id="AlphaMasking">
    You need the Flash Player to view this.
</div>
<p><script type="text/javascript">
    /*<!--*/
    var so = new SWFObject("/swf/AlphaMasking.swf", "AlphaMasking", 350, 420, "7");
    so.write("AlphaMasking");
    /*-->*/
</script><br />
<a href="http://iheartactionscript.com/downloads/AlphaMasking.zip" title="Source Files">DOWNLOAD SOURCE </a>   <a href="http://www.iheartactionscript.com/dynamic-masking-using-tweener/#more-12" class="more-link">(more&#8230;)</a></p>

<p><span><a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.iheartactionscript.com%2Fdynamic-masking-using-tweener%2F&amp;title=Dynamic+Masking+using+Tweener" target="_blank" title="Save to del.icio.us" onclick=""> <img src="http://del.icio.us/favicon.ico" width="16" height="16" alt="del.icio.us"/></a>
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.iheartactionscript.com%2Fdynamic-masking-using-tweener%2F&amp;title=Dynamic+Masking+using+Tweener" target="_blank" title="Slashdot It!" onclick=""> <img src="http://slashdot.org/favicon.ico" width="16" height="16" alt="Slashdot"/></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.iheartactionscript.com%2Fdynamic-masking-using-tweener%2F&amp;title=Dynamic+Masking+using+Tweener" target="_blank" title="Digg This Post!" onclick=""> <img src="http://digg.com/favicon.ico" width="16" height="16" alt="Digg"/></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.iheartactionscript.com%2Fdynamic-masking-using-tweener%2F"" target="_blank" title="Share on Facebook!" onclick=""> <img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="Facebook"/></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.iheartactionscript.com%2Fdynamic-masking-using-tweener%2F" target="_blank" title="Add to my Technorati Favorites!" onclick=""> <img src="http://technorati.com/favicon.ico" width="16" height="16" alt="Technorati"/></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.iheartactionscript.com%2Fdynamic-masking-using-tweener%2F&amp;title=Dynamic+Masking+using+Tweener" target="_blank" title="Add to my Google Bookmarks!" onclick=""> <img src="http://www.google.com/favicon.ico" width="16" height="16" alt="Google"/></a>
<a href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fwww.iheartactionscript.com%2Fdynamic-masking-using-tweener%2F&t=Dynamic+Masking+using+Tweener" target="_blank" title="Add to Yahoo!" onclick=""> <img src="http://myweb2.search.yahoo.com/favicon.ico" width="16" height="16" alt="Yahoo"/></a></span></p>]]></content:encoded>
			<wfw:commentRss>http://www.iheartactionscript.com/dynamic-masking-using-tweener/feed/</wfw:commentRss>
		</item>
		<item>
		<title>stage access out of DocumentRoot in AS3</title>
		<link>http://www.iheartactionscript.com/stage-access-outside-of-documentroot-in-as3/</link>
		<comments>http://www.iheartactionscript.com/stage-access-outside-of-documentroot-in-as3/#comments</comments>
		<pubDate>Fri, 28 Sep 2007 02:28:18 +0000</pubDate>
		<dc:creator>Rob Gungor</dc:creator>
		
		<category><![CDATA[AS3]]></category>

		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.iheartactionscript.com/stage-access-outside-of-documentroot-in-as3/</guid>
		<description><![CDATA[One of my first challenges in understanding AS3 was the idea that Stage and _root are no longer global (and this is a good thing).
DISCLAIMER: In general, accessing root is considered a crap coding practice - I like to call it CCP.    There are a few cases that using root may be [...]]]></description>
			<content:encoded><![CDATA[<p>One of my first challenges in understanding AS3 was the idea that Stage and _root are no longer global (and this is a good thing).</p>
<p><em>DISCLAIMER: In general, accessing root is considered a crap coding practice - I like to call it CCP.   <img src='http://www.iheartactionscript.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' /> There are a few cases that using root may be helpful - but if you are questioning whether to use it or not - then the answer is probably, &#8220;NO!&#8221;</em><br />
<br />
Essentially,  Stage and  _root can now be accessed as:</p>
<div class="codesnip-container" >
<div class="codesnip"><span class="co1">// accessing root is almost always a bad idea</span><br />
<span class="kw3">_root</span> = MC.<span class="me1">root</span>;<br />
<span class="kw3">Stage</span> = MC.<span class="kw3">stage</span>;</div>
</div>
<p> <a href="http://www.iheartactionscript.com/stage-access-outside-of-documentroot-in-as3/#more-11" class="more-link">(more&#8230;)</a></p>

<p><span><a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.iheartactionscript.com%2Fstage-access-outside-of-documentroot-in-as3%2F&amp;title=stage+access+out+of+DocumentRoot+in+AS3" target="_blank" title="Save to del.icio.us" onclick=""> <img src="http://del.icio.us/favicon.ico" width="16" height="16" alt="del.icio.us"/></a>
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.iheartactionscript.com%2Fstage-access-outside-of-documentroot-in-as3%2F&amp;title=stage+access+out+of+DocumentRoot+in+AS3" target="_blank" title="Slashdot It!" onclick=""> <img src="http://slashdot.org/favicon.ico" width="16" height="16" alt="Slashdot"/></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.iheartactionscript.com%2Fstage-access-outside-of-documentroot-in-as3%2F&amp;title=stage+access+out+of+DocumentRoot+in+AS3" target="_blank" title="Digg This Post!" onclick=""> <img src="http://digg.com/favicon.ico" width="16" height="16" alt="Digg"/></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.iheartactionscript.com%2Fstage-access-outside-of-documentroot-in-as3%2F"" target="_blank" title="Share on Facebook!" onclick=""> <img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="Facebook"/></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.iheartactionscript.com%2Fstage-access-outside-of-documentroot-in-as3%2F" target="_blank" title="Add to my Technorati Favorites!" onclick=""> <img src="http://technorati.com/favicon.ico" width="16" height="16" alt="Technorati"/></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.iheartactionscript.com%2Fstage-access-outside-of-documentroot-in-as3%2F&amp;title=stage+access+out+of+DocumentRoot+in+AS3" target="_blank" title="Add to my Google Bookmarks!" onclick=""> <img src="http://www.google.com/favicon.ico" width="16" height="16" alt="Google"/></a>
<a href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fwww.iheartactionscript.com%2Fstage-access-outside-of-documentroot-in-as3%2F&t=stage+access+out+of+DocumentRoot+in+AS3" target="_blank" title="Add to Yahoo!" onclick=""> <img src="http://myweb2.search.yahoo.com/favicon.ico" width="16" height="16" alt="Yahoo"/></a></span></p>]]></content:encoded>
			<wfw:commentRss>http://www.iheartactionscript.com/stage-access-outside-of-documentroot-in-as3/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Disabling a button in AS3 (myMC.enabled in AS3)</title>
		<link>http://www.iheartactionscript.com/disabling-a-button-in-as3-mymcenabled-in-as3/</link>
		<comments>http://www.iheartactionscript.com/disabling-a-button-in-as3-mymcenabled-in-as3/#comments</comments>
		<pubDate>Thu, 27 Sep 2007 08:57:18 +0000</pubDate>
		<dc:creator>Rob Gungor</dc:creator>
		
		<category><![CDATA[AS3]]></category>

		<category><![CDATA[AS3 disable Button]]></category>

		<category><![CDATA[AS3 enable button]]></category>

		<category><![CDATA[mouseEnabled]]></category>

		<guid isPermaLink="false">http://www.iheartactionscript.com/disabling-a-button-in-as3-mymcenabled-in-as3/</guid>
		<description><![CDATA[I ran across the problem the other day of trying to disable a button without removing its MouseEvent listeners.
In AS2 you could simply disable a button by setting it&#8217;s &#8220;enabled&#8221; property to false.
AS2

myMC.enabled = false;

The new and improved way is:
AS3

myMC.mouseEnabled = false;

Note: this requires you have a button with its MouseEvent listeners already set. 
This [...]]]></description>
			<content:encoded><![CDATA[<p>I ran across the problem the other day of trying to disable a button without removing its <a href="http://www.iheartactionscript.com/coding-movieclips-as-buttons-in-as3/">MouseEvent listeners</a>.</p>
<p>In AS2 you could simply disable a button by setting it&#8217;s &#8220;enabled&#8221; property to false.</p>
<p>AS2</p>
<div class="codesnip-container" >
<div class="codesnip">myMC.<span class="kw3">enabled</span> = <span class="kw2">false</span>;</div>
</div>
<p>The new and improved way is:</p>
<p>AS3</p>
<div class="codesnip-container" >
<div class="codesnip">myMC.<span class="kw3">mouseEnabled</span> = <span class="kw2">false</span>;</div>
</div>
<p>Note: this requires you have a button with its <a href="http://www.iheartactionscript.com/coding-movieclips-as-buttons-in-as3/">MouseEvent listeners already set</a>. </p>
<p>This is different than AS2 in that you can actually disable all mouse events for any display object - not just buttons.  So be careful what you disable!</p>

<p><span><a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.iheartactionscript.com%2Fdisabling-a-button-in-as3-mymcenabled-in-as3%2F&amp;title=Disabling+a+button+in+AS3+%28myMC.enabled+in+AS3%29" target="_blank" title="Save to del.icio.us" onclick=""> <img src="http://del.icio.us/favicon.ico" width="16" height="16" alt="del.icio.us"/></a>
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.iheartactionscript.com%2Fdisabling-a-button-in-as3-mymcenabled-in-as3%2F&amp;title=Disabling+a+button+in+AS3+%28myMC.enabled+in+AS3%29" target="_blank" title="Slashdot It!" onclick=""> <img src="http://slashdot.org/favicon.ico" width="16" height="16" alt="Slashdot"/></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.iheartactionscript.com%2Fdisabling-a-button-in-as3-mymcenabled-in-as3%2F&amp;title=Disabling+a+button+in+AS3+%28myMC.enabled+in+AS3%29" target="_blank" title="Digg This Post!" onclick=""> <img src="http://digg.com/favicon.ico" width="16" height="16" alt="Digg"/></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.iheartactionscript.com%2Fdisabling-a-button-in-as3-mymcenabled-in-as3%2F"" target="_blank" title="Share on Facebook!" onclick=""> <img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="Facebook"/></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.iheartactionscript.com%2Fdisabling-a-button-in-as3-mymcenabled-in-as3%2F" target="_blank" title="Add to my Technorati Favorites!" onclick=""> <img src="http://technorati.com/favicon.ico" width="16" height="16" alt="Technorati"/></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.iheartactionscript.com%2Fdisabling-a-button-in-as3-mymcenabled-in-as3%2F&amp;title=Disabling+a+button+in+AS3+%28myMC.enabled+in+AS3%29" target="_blank" title="Add to my Google Bookmarks!" onclick=""> <img src="http://www.google.com/favicon.ico" width="16" height="16" alt="Google"/></a>
<a href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fwww.iheartactionscript.com%2Fdisabling-a-button-in-as3-mymcenabled-in-as3%2F&t=Disabling+a+button+in+AS3+%28myMC.enabled+in+AS3%29" target="_blank" title="Add to Yahoo!" onclick=""> <img src="http://myweb2.search.yahoo.com/favicon.ico" width="16" height="16" alt="Yahoo"/></a></span></p>]]></content:encoded>
			<wfw:commentRss>http://www.iheartactionscript.com/disabling-a-button-in-as3-mymcenabled-in-as3/feed/</wfw:commentRss>
		</item>
		<item>
		<title>useHandCursor on a MovieClip in AS3</title>
		<link>http://www.iheartactionscript.com/usehandcursor-on-a-movieclip-in-as3/</link>
		<comments>http://www.iheartactionscript.com/usehandcursor-on-a-movieclip-in-as3/#comments</comments>
		<pubDate>Thu, 27 Sep 2007 08:45:05 +0000</pubDate>
		<dc:creator>Rob Gungor</dc:creator>
		
		<category><![CDATA[AS3]]></category>

		<guid isPermaLink="false">http://www.iheartactionscript.com/usehandcursor-on-a-movieclip-in-as3/</guid>
		<description><![CDATA[To use a hand cursor on a MovieClip that already has event listeners - you simply need two lines of code to use a hand cursor:

myMC.buttonMode = true;
myMC.useHandCursor = true;

AS3 doesn&#8217;t automatically know a MovieClip is a button unless you:
1) Have already added mouse event listeners.
2) Tell myMC that its buttonMode = true.
Happy Scripting.

 
 [...]]]></description>
			<content:encoded><![CDATA[<p>To use a hand cursor on a MovieClip that <a href="http://www.iheartactionscript.com/coding-movieclips-as-buttons-in-as3/">already has event listeners</a> - you simply need two lines of code to use a hand cursor:</p>
<div class="codesnip-container" >
<div class="codesnip">myMC.<span class="kw3">buttonMode</span> = <span class="kw2">true</span>;<br />
myMC.<span class="kw3">useHandCursor</span> = <span class="kw2">true</span>;</div>
</div>
<p>AS3 doesn&#8217;t automatically know a MovieClip is a button unless you:<br />
1) <a href="http://www.iheartactionscript.com/coding-movieclips-as-buttons-in-as3/">Have already added mouse event listeners.</a><br />
2) Tell myMC that its buttonMode = true.</p>
<p>Happy Scripting.</p>

<p><span><a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.iheartactionscript.com%2Fusehandcursor-on-a-movieclip-in-as3%2F&amp;title=useHandCursor+on+a+MovieClip+in+AS3" target="_blank" title="Save to del.icio.us" onclick=""> <img src="http://del.icio.us/favicon.ico" width="16" height="16" alt="del.icio.us"/></a>
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.iheartactionscript.com%2Fusehandcursor-on-a-movieclip-in-as3%2F&amp;title=useHandCursor+on+a+MovieClip+in+AS3" target="_blank" title="Slashdot It!" onclick=""> <img src="http://slashdot.org/favicon.ico" width="16" height="16" alt="Slashdot"/></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.iheartactionscript.com%2Fusehandcursor-on-a-movieclip-in-as3%2F&amp;title=useHandCursor+on+a+MovieClip+in+AS3" target="_blank" title="Digg This Post!" onclick=""> <img src="http://digg.com/favicon.ico" width="16" height="16" alt="Digg"/></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.iheartactionscript.com%2Fusehandcursor-on-a-movieclip-in-as3%2F"" target="_blank" title="Share on Facebook!" onclick=""> <img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="Facebook"/></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.iheartactionscript.com%2Fusehandcursor-on-a-movieclip-in-as3%2F" target="_blank" title="Add to my Technorati Favorites!" onclick=""> <img src="http://technorati.com/favicon.ico" width="16" height="16" alt="Technorati"/></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.iheartactionscript.com%2Fusehandcursor-on-a-movieclip-in-as3%2F&amp;title=useHandCursor+on+a+MovieClip+in+AS3" target="_blank" title="Add to my Google Bookmarks!" onclick=""> <img src="http://www.google.com/favicon.ico" width="16" height="16" alt="Google"/></a>
<a href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fwww.iheartactionscript.com%2Fusehandcursor-on-a-movieclip-in-as3%2F&t=useHandCursor+on+a+MovieClip+in+AS3" target="_blank" title="Add to Yahoo!" onclick=""> <img src="http://myweb2.search.yahoo.com/favicon.ico" width="16" height="16" alt="Yahoo"/></a></span></p>]]></content:encoded>
			<wfw:commentRss>http://www.iheartactionscript.com/usehandcursor-on-a-movieclip-in-as3/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Loading an External .swf in AS3</title>
		<link>http://www.iheartactionscript.com/loading-an-external-swf-in-as3/</link>
		<comments>http://www.iheartactionscript.com/loading-an-external-swf-in-as3/#comments</comments>
		<pubDate>Fri, 21 Sep 2007 21:42:54 +0000</pubDate>
		<dc:creator>Rob Gungor</dc:creator>
		
		<category><![CDATA[AS3]]></category>

		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.iheartactionscript.com/?p=7</guid>
		<description><![CDATA[Here&#8217;s a simple example of loading a .swf in AS3. I had a typo before but now it&#8217;s fixed - sorry about that. Also, I updated it so you don&#8217;t have to strictly use it in an Class setting.
Happy Coding&#8230;

 
 
 
]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a simple example of loading a .swf in AS3. I had a typo before but now it&#8217;s fixed - sorry about that. Also, I updated it so you don&#8217;t have to strictly use it in an Class setting.</p>
<p>Happy Coding&#8230;<br />
 <a href="http://www.iheartactionscript.com/loading-an-external-swf-in-as3/#more-7" class="more-link">(more&#8230;)</a></p>

<p><span><a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.iheartactionscript.com%2Floading-an-external-swf-in-as3%2F&amp;title=Loading+an+External+.swf+in+AS3" target="_blank" title="Save to del.icio.us" onclick=""> <img src="http://del.icio.us/favicon.ico" width="16" height="16" alt="del.icio.us"/></a>
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.iheartactionscript.com%2Floading-an-external-swf-in-as3%2F&amp;title=Loading+an+External+.swf+in+AS3" target="_blank" title="Slashdot It!" onclick=""> <img src="http://slashdot.org/favicon.ico" width="16" height="16" alt="Slashdot"/></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.iheartactionscript.com%2Floading-an-external-swf-in-as3%2F&amp;title=Loading+an+External+.swf+in+AS3" target="_blank" title="Digg This Post!" onclick=""> <img src="http://digg.com/favicon.ico" width="16" height="16" alt="Digg"/></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.iheartactionscript.com%2Floading-an-external-swf-in-as3%2F"" target="_blank" title="Share on Facebook!" onclick=""> <img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="Facebook"/></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.iheartactionscript.com%2Floading-an-external-swf-in-as3%2F" target="_blank" title="Add to my Technorati Favorites!" onclick=""> <img src="http://technorati.com/favicon.ico" width="16" height="16" alt="Technorati"/></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.iheartactionscript.com%2Floading-an-external-swf-in-as3%2F&amp;title=Loading+an+External+.swf+in+AS3" target="_blank" title="Add to my Google Bookmarks!" onclick=""> <img src="http://www.google.com/favicon.ico" width="16" height="16" alt="Google"/></a>
<a href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fwww.iheartactionscript.com%2Floading-an-external-swf-in-as3%2F&t=Loading+an+External+.swf+in+AS3" target="_blank" title="Add to Yahoo!" onclick=""> <img src="http://myweb2.search.yahoo.com/favicon.ico" width="16" height="16" alt="Yahoo"/></a></span></p>]]></content:encoded>
			<wfw:commentRss>http://www.iheartactionscript.com/loading-an-external-swf-in-as3/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Coding MovieClips as Buttons in AS3</title>
		<link>http://www.iheartactionscript.com/coding-movieclips-as-buttons-in-as3/</link>
		<comments>http://www.iheartactionscript.com/coding-movieclips-as-buttons-in-as3/#comments</comments>
		<pubDate>Tue, 18 Sep 2007 09:42:29 +0000</pubDate>
		<dc:creator>Rob Gungor</dc:creator>
		
		<category><![CDATA[AS3]]></category>

		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.iheartactionscript.com/?p=6</guid>
		<description><![CDATA[I would like to start off my posts with a simple one but really painful if you are used to AS2 - creating buttons in AS3.
I remember the good old days when you could just say, &#8220;Hey Actionscript, onRollOver = function(){ doThis!};&#8221;.

 
 
 
]]></description>
			<content:encoded><![CDATA[<p>I would like to start off my posts with a simple one but really painful if you are used to AS2 - creating buttons in AS3.</p>
<p>I remember the good old days when you could just say, &#8220;Hey Actionscript, onRollOver = function(){ doThis!};&#8221;.</p>
<p> <a href="http://www.iheartactionscript.com/coding-movieclips-as-buttons-in-as3/#more-6" class="more-link">(more&#8230;)</a></p>

<p><span><a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.iheartactionscript.com%2Fcoding-movieclips-as-buttons-in-as3%2F&amp;title=Coding+MovieClips+as+Buttons+in+AS3" target="_blank" title="Save to del.icio.us" onclick=""> <img src="http://del.icio.us/favicon.ico" width="16" height="16" alt="del.icio.us"/></a>
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.iheartactionscript.com%2Fcoding-movieclips-as-buttons-in-as3%2F&amp;title=Coding+MovieClips+as+Buttons+in+AS3" target="_blank" title="Slashdot It!" onclick=""> <img src="http://slashdot.org/favicon.ico" width="16" height="16" alt="Slashdot"/></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.iheartactionscript.com%2Fcoding-movieclips-as-buttons-in-as3%2F&amp;title=Coding+MovieClips+as+Buttons+in+AS3" target="_blank" title="Digg This Post!" onclick=""> <img src="http://digg.com/favicon.ico" width="16" height="16" alt="Digg"/></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.iheartactionscript.com%2Fcoding-movieclips-as-buttons-in-as3%2F"" target="_blank" title="Share on Facebook!" onclick=""> <img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="Facebook"/></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.iheartactionscript.com%2Fcoding-movieclips-as-buttons-in-as3%2F" target="_blank" title="Add to my Technorati Favorites!" onclick=""> <img src="http://technorati.com/favicon.ico" width="16" height="16" alt="Technorati"/></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.iheartactionscript.com%2Fcoding-movieclips-as-buttons-in-as3%2F&amp;title=Coding+MovieClips+as+Buttons+in+AS3" target="_blank" title="Add to my Google Bookmarks!" onclick=""> <img src="http://www.google.com/favicon.ico" width="16" height="16" alt="Google"/></a>
<a href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fwww.iheartactionscript.com%2Fcoding-movieclips-as-buttons-in-as3%2F&t=Coding+MovieClips+as+Buttons+in+AS3" target="_blank" title="Add to Yahoo!" onclick=""> <img src="http://myweb2.search.yahoo.com/favicon.ico" width="16" height="16" alt="Yahoo"/></a></span></p>]]></content:encoded>
			<wfw:commentRss>http://www.iheartactionscript.com/coding-movieclips-as-buttons-in-as3/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
