<?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>zedia flash blog &#187; Layer</title>
	<atom:link href="http://www.zedia.net/tag/layer/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.zedia.net</link>
	<description>Flash, ActionScript, SEO and everything in between</description>
	<lastBuildDate>Wed, 21 Jul 2010 17:07:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Again on BlendMode (this time in AS2)</title>
		<link>http://www.zedia.net/2008/again-on-blendmode-this-time-in-as2/</link>
		<comments>http://www.zedia.net/2008/again-on-blendmode-this-time-in-as2/#comments</comments>
		<pubDate>Tue, 27 May 2008 23:21:10 +0000</pubDate>
		<dc:creator>zedia.net</dc:creator>
				<category><![CDATA[ActionScript 2]]></category>
		<category><![CDATA[BlendMode]]></category>
		<category><![CDATA[fade out]]></category>
		<category><![CDATA[Layer]]></category>

		<guid isPermaLink="false">http://www.zedia.net/2008/again-on-blendmode-this-time-in-as2/</guid>
		<description><![CDATA[I was really happy when I found out how to do proper fade outs of MovieClips containing other MovieClips, but I am even more happy now because I found how to do it in ActionScript 2. I don&#8217;t know why but I was thinking that blendMode was something new that came in Flash 9, but [...]]]></description>
			<content:encoded><![CDATA[<p>I was really happy when I found out <a href="http://www.zedia.net/2008/blendmodelayer-a-must-when-changing-alpha-of-a-displayobject-containing-other-displayobject/" title="BlendMode.LAYER">how to do proper fade outs of MovieClips containing other MovieClips</a>, but I am even more happy now because I found how to do it in ActionScript 2. I don&#8217;t know why but I was thinking that blendMode was something new that came in Flash 9, but I actually knew it came with Flash 8 at the same time that filters came in. I woke up when my colleague told me he and to roll back an animation from Flash 8 to Flash 7 and had to loose the blendModes because of that.</p>
<p>The way to do it is really similar than in ActionScript 3, it&#8217;s actually way easier but more prone to errors (if you mispell &#8220;layer&#8221; the compiler won&#8217;t tell you):</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="actionscript" style="font-family:monospace;">my_mc.<span style="color: #006600;">blendMode</span> = <span style="color: #ff0000;">&quot;layer&quot;</span>;</pre></td></tr></table></div>

<p>That&#8217;s all there is to it.</p>
<div id="facebook_like"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.zedia.net%2F2008%2Fagain-on-blendmode-this-time-in-as2%2F&amp;layout=standard&amp;show-faces=false&amp;width=450&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:550px; height:70px;"></iframe></div>]]></content:encoded>
			<wfw:commentRss>http://www.zedia.net/2008/again-on-blendmode-this-time-in-as2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BlendMode.LAYER; A must when changing the alpha property of a DisplayObject containing other DisplayObjects</title>
		<link>http://www.zedia.net/2008/blendmodelayer-a-must-when-changing-alpha-of-a-displayobject-containing-other-displayobject/</link>
		<comments>http://www.zedia.net/2008/blendmodelayer-a-must-when-changing-alpha-of-a-displayobject-containing-other-displayobject/#comments</comments>
		<pubDate>Mon, 28 Apr 2008 23:22:14 +0000</pubDate>
		<dc:creator>zedia.net</dc:creator>
				<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[alpha]]></category>
		<category><![CDATA[BlendMode]]></category>
		<category><![CDATA[fade out]]></category>
		<category><![CDATA[Layer]]></category>

		<guid isPermaLink="false">http://www.zedia.net/2008/blendmodelayer-a-must-when-changing-alpha-of-a-displayobject-containing-other-displayobject/</guid>
		<description><![CDATA[I don&#8217;t know if you ever tweened a MovieClip&#8217;s alpha while this MovieClip contained multiple assets, but I kinda do this all the time (fade in ,fade out being the easiest transition for almost everything). The default way Flash handles this is by changing the alpha of every assets in the containing MovieClip (or Sprite). [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t know if you ever tweened a MovieClip&#8217;s alpha while this MovieClip contained multiple assets, but I kinda do this all the time (fade in ,fade out being the easiest transition for almost everything). The default way Flash handles this is by changing the alpha of every assets in the containing MovieClip (or Sprite). Sometimes it doesn&#8217;t matter but most of the time that&#8217;s not the behavior you would like it to have. When you have shapes or bitmaps that overlap or hide other graphical assets you will see what is under it when changing the alpha instead of actually changing the alpha of the container as if it was a whole.</p>
<p>Well I don&#8217;t know if it&#8217;s clear but I have an example below that should clarify that. Anyway, I have stumbled upon the solution to this while browsing through the help files for BlendMode. If you set the blendMode of your containing DisplayObject to BlendMode.LAYER Flash will consider this DisplayObject as only one layer and will change the alpha the way you normally think it would.</p>
<p>Here is the example that will illustrate my point better. The left Sprite is the reference object, the middle Sprite has no blendMode on and the right Sprite has a blendMode of BlendMode.LAYER. Mostly look at the colors while tweening and the overlapping regions of the green and blue ellipses.</p>
<p><object width="550" height="400" data="http://www.zedia.net/flash/blendmode.swf" type="application/x-shockwave-flash"><param name="src" value="http://www.zedia.net/flash/blendmode.swf" /></object></p>
<p>I really wish I had found this earlier and I hope this will help others that were in my situation.</p>
<p><a title="BlendMode.LAYER: une nécessité lorsqu’on change la propriété alpha d’un DisplayObject qui contient plusieurs DisplayObjects" href="http://www.zedia.net/fr/2008/blendmodelayer-une-necessite-lorsquon-change-la-propriete-alpha-dun-displayobject-qui-contient-plusieurs-displayobjects/">Cet article en Français </a></p>
<div id="facebook_like"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.zedia.net%2F2008%2Fblendmodelayer-a-must-when-changing-alpha-of-a-displayobject-containing-other-displayobject%2F&amp;layout=standard&amp;show-faces=false&amp;width=450&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:550px; height:70px;"></iframe></div>]]></content:encoded>
			<wfw:commentRss>http://www.zedia.net/2008/blendmodelayer-a-must-when-changing-alpha-of-a-displayobject-containing-other-displayobject/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
	</channel>
</rss>
