<?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>Marius&#039; Blog</title>
	<atom:link href="http://mariuscristiandonea.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://mariuscristiandonea.com</link>
	<description></description>
	<lastBuildDate>Fri, 05 Mar 2010 10:02:23 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to write valid HTML/XHTML code with embedded Flash</title>
		<link>http://mariuscristiandonea.com/2010/03/05/how-to-write-valid-htmlxhtml-code-with-embedded-flash/</link>
		<comments>http://mariuscristiandonea.com/2010/03/05/how-to-write-valid-htmlxhtml-code-with-embedded-flash/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 09:54:09 +0000</pubDate>
		<dc:creator>Marius</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[embed]]></category>
		<category><![CDATA[valid html]]></category>

		<guid isPermaLink="false">http://mariuscristiandonea.com/?p=202</guid>
		<description><![CDATA[This code is tested on all major browsers: Firefox (Win/Linux), IE, Opera, Safary, Chrome.
HTML code:


&#60;object type=&#34;application/x-shockwave-flash&#34; data=&#34;flash_file.swf&#34; width=&#34;100%&#34; height=&#34;100%&#34;&#62;
&#160; &#160; &#60;param name=&#34;movie&#34; value=&#34;flash_file.swf&#34; /&#62;
&#160; &#160; &#60;param name=&#34;quality&#34; value=&#34;high&#34; /&#62;
&#160; &#160; &#60;param name=&#34;wmode&#34; value=&#34;transparent&#34; /&#62;
&#60;/object&#62;



]]></description>
			<content:encoded><![CDATA[<p>This code is tested on all major browsers: Firefox (Win/Linux), IE, Opera, Safary, Chrome.</p>
<p><strong>HTML code:</strong></p>
<pre>
<div class="codesnip-container" >
<div class="html4strict codesnip" style="font-family:monospace;"><span class="sc2">&lt;<a href="http://december.com/html/4/element/object.html"><span class="kw2">object</span></a> <span class="kw3">type</span><span class="sy0">=</span><span class="st0">&quot;application/x-shockwave-flash&quot;</span> <span class="kw3">data</span><span class="sy0">=</span><span class="st0">&quot;flash_file.swf&quot;</span> <span class="kw3">width</span><span class="sy0">=</span><span class="st0">&quot;100%&quot;</span> <span class="kw3">height</span><span class="sy0">=</span><span class="st0">&quot;100%&quot;</span>&gt;</span>
&nbsp; &nbsp; <span class="sc2">&lt;<a href="http://december.com/html/4/element/param.html"><span class="kw2">param</span></a> <span class="kw3">name</span><span class="sy0">=</span><span class="st0">&quot;movie&quot;</span> <span class="kw3">value</span><span class="sy0">=</span><span class="st0">&quot;flash_file.swf&quot;</span> <span class="sy0">/</span>&gt;</span>
&nbsp; &nbsp; <span class="sc2">&lt;<a href="http://december.com/html/4/element/param.html"><span class="kw2">param</span></a> <span class="kw3">name</span><span class="sy0">=</span><span class="st0">&quot;quality&quot;</span> <span class="kw3">value</span><span class="sy0">=</span><span class="st0">&quot;high&quot;</span> <span class="sy0">/</span>&gt;</span>
&nbsp; &nbsp; <span class="sc2">&lt;<a href="http://december.com/html/4/element/param.html"><span class="kw2">param</span></a> <span class="kw3">name</span><span class="sy0">=</span><span class="st0">&quot;wmode&quot;</span> <span class="kw3">value</span><span class="sy0">=</span><span class="st0">&quot;transparent&quot;</span> <span class="sy0">/</span>&gt;</span>
<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/object.html"><span class="kw2">object</span></a>&gt;</span></div>
</div>
</pre>
<p><a href="http://secure.hostgator.com/cgi-bin/affiliates/clickthru.cgi?id=dmarius" target="_blank"><img src="http://www.hostgator.com/affiliates/banners/hostgator754a.gif" alt="" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://mariuscristiandonea.com/2010/03/05/how-to-write-valid-htmlxhtml-code-with-embedded-flash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Smooci 2.1.0 WordPress Theme</title>
		<link>http://mariuscristiandonea.com/2010/01/21/smooci-2-1-0-wordpress-theme/</link>
		<comments>http://mariuscristiandonea.com/2010/01/21/smooci-2-1-0-wordpress-theme/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 12:18:46 +0000</pubDate>
		<dc:creator>Marius</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[blackberry]]></category>
		<category><![CDATA[cellphone]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[mobile phone]]></category>
		<category><![CDATA[mobile theme]]></category>
		<category><![CDATA[pda]]></category>
		<category><![CDATA[phone]]></category>
		<category><![CDATA[template]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[touch]]></category>

		<guid isPermaLink="false">http://mariuscristiandonea.com/?p=169</guid>
		<description><![CDATA[Need an WordPress Theme for mobiles? Visit SMOOCI.COM

Smooci is a WordPress theme for mobile phones and devices. Use this WordPress plugin to display the theme when your WordPress site is visited on mobiles

]]></description>
			<content:encoded><![CDATA[<p><strong><span style="color: #800000;">Need an WordPress Theme for mobiles? Visit <a href="http://www.smooci.com/referral?user=Marius" target="_blank">SMOOCI.COM</a></span></strong></p>
<p style="text-align: center;"><a href="http://mariuscristiandonea.com/wp-content/uploads/2010/01/screenshot.png"></a><img class="size-full wp-image-177 aligncenter" title="Smooci 2.1.0" src="http://mariuscristiandonea.com/wp-content/uploads/2010/01/screenshot21.png" alt="" width="200" height="376" /></p>
<p style="text-align: left;">Smooci is a WordPress theme for mobile phones and devices. Use <a href="http://wordpress.org/extend/plugins/smooci-wordpress-on-mobiles/" target="_blank">this WordPress plugin</a> to display the theme when your WordPress site is visited on mobiles</p>
<p><a href='http://secure.hostgator.com/cgi-bin/affiliates/clickthru.cgi?id=dmarius' target='_blank'><img src='http://www.hostgator.com/affiliates/banners/hostgator754a.gif' /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://mariuscristiandonea.com/2010/01/21/smooci-2-1-0-wordpress-theme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Smooci (WordPress on Mobiles) &#8211; WordPress Plugin</title>
		<link>http://mariuscristiandonea.com/2010/01/21/smooci-wordpress-on-mobiles-wordpress-plugin/</link>
		<comments>http://mariuscristiandonea.com/2010/01/21/smooci-wordpress-on-mobiles-wordpress-plugin/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 11:18:58 +0000</pubDate>
		<dc:creator>Marius</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[blackberry]]></category>
		<category><![CDATA[cellphone]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[mobile phone]]></category>
		<category><![CDATA[mobile theme]]></category>
		<category><![CDATA[pda]]></category>
		<category><![CDATA[phone]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[touch]]></category>
		<category><![CDATA[wireless]]></category>

		<guid isPermaLink="false">http://mariuscristiandonea.com/?p=164</guid>
		<description><![CDATA[Need an WordPress Theme for mobiles? Visit SMOOCI.COM
Smooci (WordPress on Mobiles) plugin can be used to display a diferent theme when your WordPress site is visited on mobile phones or devices.
The plugin detects the mobile device and displays the theme of your choice. If you encounter a mobile phone or device that doesn&#8217;t display the [...]]]></description>
			<content:encoded><![CDATA[<p><strong><span style="color: #800000;">Need an WordPress Theme for mobiles? Visit <a href="http://www.smooci.com/referral?user=Marius" target="_blank">SMOOCI.COM</a></span></strong></p>
<p>Smooci (WordPress on Mobiles) plugin can be used to display a diferent theme when your WordPress site is visited on mobile phones or devices.<br />
The plugin detects the mobile device and displays the theme of your choice. If you encounter a mobile phone or device that doesn&#8217;t display the selected theme, please leave a comment to this post.</p>
<p style="text-align: center;"><img class="aligncenter" title="Smooci (WordPress on Mobiles) – WordPress Plugin" src="http://www.smooci.com/extras/plugin.png" alt="" width="500" height="467" /></p>
<p><a href='http://secure.hostgator.com/cgi-bin/affiliates/clickthru.cgi?id=dmarius' target='_blank'><img src='http://www.hostgator.com/affiliates/banners/hostgator754a.gif' /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://mariuscristiandonea.com/2010/01/21/smooci-wordpress-on-mobiles-wordpress-plugin/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>AJAX form request using POST method</title>
		<link>http://mariuscristiandonea.com/2009/08/05/ajax-form-request-using-post-method/</link>
		<comments>http://mariuscristiandonea.com/2009/08/05/ajax-form-request-using-post-method/#comments</comments>
		<pubDate>Wed, 05 Aug 2009 08:33:34 +0000</pubDate>
		<dc:creator>Marius</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://mariuscristiandonea.com/?p=151</guid>
		<description><![CDATA[Here is a way you can call a server side script with AJAX, using POST method.
JavaScript code:


// declare a global variable
var xmlHttpVariable

// http request object
function GetXmlHttpObject&#40;&#41;
&#123;
&#160; &#160; var xmlHttp = null;

&#160; &#160; try
&#160; &#160; &#160; &#160; &#123;xmlHttp = new XMLHttpRequest&#40;&#41;;&#125;
&#160; &#160; catch &#40;e&#41;
&#160; &#160; &#123;
&#160; &#160; &#160; &#160; try
&#160; &#160; &#160; &#160; &#160; &#160; &#123;xmlHttp [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a way you can call a server side script with AJAX, using POST method.</p>
<p><strong>JavaScript code:</strong></p>
<pre>
<div class="codesnip-container" >
<div class="javascript codesnip" style="font-family:monospace;"><span class="co1">// declare a global variable</span>
<span class="kw2">var</span> xmlHttpVariable

<span class="co1">// http request object</span>
<span class="kw2">function</span> GetXmlHttpObject<span class="br0">&#40;</span><span class="br0">&#41;</span>
<span class="br0">&#123;</span>
&nbsp; &nbsp; <span class="kw2">var</span> xmlHttp <span class="sy0">=</span> <span class="kw2">null</span><span class="sy0">;</span>

&nbsp; &nbsp; <span class="kw1">try</span>
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span>xmlHttp <span class="sy0">=</span> <span class="kw2">new</span> XMLHttpRequest<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><span class="br0">&#125;</span>
&nbsp; &nbsp; <span class="kw1">catch</span> <span class="br0">&#40;</span>e<span class="br0">&#41;</span>
&nbsp; &nbsp; <span class="br0">&#123;</span>
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">try</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span>xmlHttp <span class="sy0">=</span> <span class="kw2">new</span> ActiveXObject<span class="br0">&#40;</span><span class="st0">&quot;Msxml2.XMLHTTP&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span><span class="br0">&#125;</span>
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">catch</span> <span class="br0">&#40;</span>e<span class="br0">&#41;</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span>xmlHttp <span class="sy0">=</span> <span class="kw2">new</span> ActiveXObject<span class="br0">&#40;</span><span class="st0">&quot;Microsoft.XMLHTTP&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span><span class="br0">&#125;</span>
&nbsp; &nbsp; <span class="br0">&#125;</span>

&nbsp; &nbsp; <span class="kw1">return</span> xmlHttp<span class="sy0">;</span>
<span class="br0">&#125;</span>

<span class="kw2">function</span> callServer<span class="br0">&#40;</span><span class="br0">&#41;</span>
<span class="br0">&#123;</span>
<span class="co1">// call http request object</span>
&nbsp; &nbsp; xmlHttpVariable <span class="sy0">=</span> <span class="kw2">new</span> GetXmlHttpObject<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span>
<span class="co1">// set the url to the server-side script</span>
&nbsp; &nbsp; <span class="kw2">var</span> url <span class="sy0">=</span> <span class="st0">&quot;url&quot;</span><span class="sy0">;</span>
<span class="co1">// set the variables</span>
&nbsp; &nbsp; <span class="kw2">var</span> variables <span class="sy0">=</span> <span class="st0">&quot;var1=val1&amp;amp;var2=val2&quot;</span><span class="sy0">;</span>
<span class="co1">// call a function on state change</span>
&nbsp; &nbsp; xmlHttpVariable.<span class="me1">onreadystatechange</span> <span class="sy0">=</span> stateChangedVariable<span class="sy0">;</span>
<span class="co1">// open the url</span>
&nbsp; &nbsp; xmlHttpVariable.<span class="kw3">open</span><span class="br0">&#40;</span><span class="st0">&quot;POST&quot;</span><span class="sy0">,</span>url<span class="sy0">,</span><span class="kw2">true</span><span class="br0">&#41;</span><span class="sy0">;</span>
<span class="co1">// send the proper header information along with the request</span>
&nbsp; &nbsp; xmlHttpVariable.<span class="me1">setRequestHeader</span><span class="br0">&#40;</span><span class="st0">&quot;Content-type&quot;</span><span class="sy0">,</span> <span class="st0">&quot;application/x-www-form-urlencoded&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp; &nbsp; xmlHttpVariable.<span class="me1">setRequestHeader</span><span class="br0">&#40;</span><span class="st0">&quot;Content-length&quot;</span><span class="sy0">,</span> variables.<span class="me1">length</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp; &nbsp; xmlHttpVariable.<span class="me1">setRequestHeader</span><span class="br0">&#40;</span><span class="st0">&quot;Connection&quot;</span><span class="sy0">,</span> <span class="st0">&quot;close&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span>
<span class="co1">// send the variables</span>
&nbsp; &nbsp; xmlHttpVariable.<span class="me1">send</span><span class="br0">&#40;</span>variables<span class="br0">&#41;</span><span class="sy0">;</span>
<span class="br0">&#125;</span>

<span class="kw2">function</span> stateChangedVariable<span class="br0">&#40;</span><span class="br0">&#41;</span>
<span class="br0">&#123;</span>
<span class="co1">// values for readyState see below for explanations</span>
&nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span>xmlHttpVariable.<span class="me1">readyState</span> <span class="sy0">==</span> 4<span class="br0">&#41;</span>
&nbsp; &nbsp; <span class="br0">&#123;</span>
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span>xmlHttpVariable.<span class="me1">responseText</span>.<span class="me1">replace</span><span class="br0">&#40;</span><span class="co2">/^\s+|\s+$/g</span><span class="sy0">,</span> <span class="st0">''</span><span class="br0">&#41;</span> <span class="sy0">==</span> <span class="st0">'return value'</span><span class="br0">&#41;</span>
&nbsp; &nbsp; &nbsp; &nbsp;<span class="br0">&#123;</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="co1">//action here</span>
&nbsp; &nbsp; &nbsp; &nbsp;<span class="br0">&#125;</span>
&nbsp; &nbsp; <span class="br0">&#125;</span>
<span class="br0">&#125;</span></div>
</div>
</pre>
<p><strong>readyState values:</strong></p>
<p>0 &#8211; Represents an &#8220;uninitialized&#8221; state in which an XMLHttt pRequesobject has been created, but not initialized.</p>
<p>1 &#8211; Represents a &#8220;sent&#8221; state in which code has called the XMLHttpRequest open() method and the XMLHttpRequest is ready to send a request to the server.</p>
<p>2 &#8211; Represents a &#8220;sent&#8221; state in which a request has been sent to the server with the send() method, but a response has not yet been received.</p>
<p>3 &#8211; Represents a &#8220;receiving&#8221; state in which the HTTP response headers have been received, but message body has not yet been completely received.</p>
<p>4 &#8211; Represents a &#8220;loaded&#8221; state in which the response has been completely received.</p>
<p><a href='http://secure.hostgator.com/cgi-bin/affiliates/clickthru.cgi?id=dmarius' target='_blank'><img src='http://www.hostgator.com/affiliates/banners/hostgator754a.gif' /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://mariuscristiandonea.com/2009/08/05/ajax-form-request-using-post-method/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DOP Player WordPress Plugin</title>
		<link>http://mariuscristiandonea.com/2009/05/31/dop-player-wordpress-plugin/</link>
		<comments>http://mariuscristiandonea.com/2009/05/31/dop-player-wordpress-plugin/#comments</comments>
		<pubDate>Sun, 31 May 2009 23:02:59 +0000</pubDate>
		<dc:creator>Marius</dc:creator>
				<category><![CDATA[DOP Player]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[3q2]]></category>
		<category><![CDATA[3qp]]></category>
		<category><![CDATA[flv]]></category>
		<category><![CDATA[m4a]]></category>
		<category><![CDATA[m4v]]></category>
		<category><![CDATA[media]]></category>
		<category><![CDATA[mov]]></category>
		<category><![CDATA[mp4]]></category>
		<category><![CDATA[mp4v]]></category>
		<category><![CDATA[player]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://mariuscristiandonea.com/?p=120</guid>
		<description><![CDATA[After several tests and favorable comments, I can officialy launch DOP Player Wordpress Plugin 1.0.
Dop Player is intended for users that want an easy to use player to integrate in their blog.
Dop Player can be easily customized from an admin panel to match your template&#8217;s colors.
Warning
You have to copy the content from dop-player folder from [...]]]></description>
			<content:encoded><![CDATA[<p>After several tests and favorable comments, I can officialy launch DOP Player Wordpress Plugin 1.0.<br />
Dop Player is intended for users that want an easy to use player to integrate in their blog.<br />
Dop Player can be easily customized from an admin panel to match your template&#8217;s colors.</p>
<p><span style="color: #ff0000;"><strong>Warning</strong></span><br />
You have to copy the content from dop-player folder from the zip file. If you don&#8217;t you will see only a space where the player should be.<br />
You have in the zip file:<br />
- ZIP/dop-player/<strong>dop-player.php</strong><br />
- ZIP/dop-player/<strong>dop-player/dop-player-admin.php</strong><br />
- ZIP/dop-player/<strong>dop-player/dop-player.swf</strong><br />
In your plugin forlder you should have:<br />
- WWW/wp-content/plugins/<strong>dop-player.php</strong><br />
- WWW/wp-content/plugins/<strong>dop-player/dop-player-admin.php</strong><br />
- WWW/wp-content/plugins/<strong>dop-player/dop-player.swf</strong></p>
<p><strong>You can download it from:</strong><br />
<a href="http://dop-p.com/wordpress/" target="_blank">http://dop-p.com/wordpress/</a><br />
<a href="http://wordpress.org/extend/plugins/dop-player/" target="_blank">http://wordpress.org/extend/plugins/dop-player/</a></p>
<p><strong>An example</strong><br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="640" height="360" align="middle"><param name="movie" value="http://mariuscristiandonea.com/wp-content/plugins/dop-player/dop-player.swf" /><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="sameDomain" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><param name="flashvars" value="videoURL=http://mariuscristiandonea.com/wp-content/uploads/2009/05/dop_player_video.flv&bgColor=ffffb3&bgAlpha=100&cpBgColor=ffffb3&cpBtnBgColor=ffffb3&cpBtnOutlineColor=FF6300" /><embed src="http://mariuscristiandonea.com/wp-content/plugins/dop-player/dop-player.swf" allowFullScreen="true" allowScriptAccess="sameDomain" quality="high" wmode="transparent" flashvars="videoURL=http://mariuscristiandonea.com/wp-content/uploads/2009/05/dop_player_video.flv&bgColor=ffffb3&bgAlpha=100&cpBgColor=ffffb3&cpBtnBgColor=ffffb3&cpBtnOutlineColor=FF6300" width="640" height="360" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object></p>
<p><strong>Admin Panel Screenshot</strong><br />
<a href="http://mariuscristiandonea.com/wp-content/uploads/2009/05/admin-panel-screenshot.jpg"><img class="alignleft size-full wp-image-141" title="Admin Panel Screenshot" src="http://mariuscristiandonea.com/wp-content/uploads/2009/05/admin-panel-screenshot.jpg" border="0px" alt="Admin Panel Screenshot" width="640" height="434" /></a></p>
<p><a href='http://secure.hostgator.com/cgi-bin/affiliates/clickthru.cgi?id=dmarius' target='_blank'><img src='http://www.hostgator.com/affiliates/banners/hostgator754a.gif' /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://mariuscristiandonea.com/2009/05/31/dop-player-wordpress-plugin/feed/</wfw:commentRss>
		<slash:comments>33</slash:comments>
		</item>
		<item>
		<title>Load an image (jpeg, png, gif) or a swf using ActionScript 3.0</title>
		<link>http://mariuscristiandonea.com/2009/05/30/load-an-image-jpeg-png-gif-or-a-swf-using-actionscript-30/</link>
		<comments>http://mariuscristiandonea.com/2009/05/30/load-an-image-jpeg-png-gif-or-a-swf-using-actionscript-30/#comments</comments>
		<pubDate>Sat, 30 May 2009 16:10:50 +0000</pubDate>
		<dc:creator>Marius</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[gif]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[jpeg]]></category>
		<category><![CDATA[load]]></category>
		<category><![CDATA[png]]></category>
		<category><![CDATA[swf]]></category>

		<guid isPermaLink="false">http://mariuscristiandonea.com/?p=109</guid>
		<description><![CDATA[Here is an example that illustrate how you can upload an image or a swf in your Flash ActionScript 3.0 project .
ActionScript 3.0 code:


// create the MovieClip that will hold the object loaded
var _mc:MovieClip = new MovieClip&#40;&#41;;
addChild&#40;_mc&#41;;

// create the URLRequest with the path to the object you want to load
var request:URLRequest = new URLRequest&#40;&#34;image.jpg&#34;&#41;;
var loader [...]]]></description>
			<content:encoded><![CDATA[<p>Here is an example that illustrate how you can upload an image or a swf in your Flash ActionScript 3.0 project .</p>
<p><strong>ActionScript 3.0 code:</strong></p>
<pre>
<div class="codesnip-container" >
<div class="actionscript codesnip" style="font-family:monospace;"><span class="co1">// create the MovieClip that will hold the object loaded</span>
<span class="kw2">var</span> _mc:<span class="kw3">MovieClip</span> = <span class="kw2">new</span> <span class="kw3">MovieClip</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;
addChild<span class="br0">&#40;</span>_mc<span class="br0">&#41;</span>;

<span class="co1">// create the URLRequest with the path to the object you want to load</span>
<span class="kw2">var</span> request:URLRequest = <span class="kw2">new</span> URLRequest<span class="br0">&#40;</span><span class="st0">&quot;image.jpg&quot;</span><span class="br0">&#41;</span>;
<span class="kw2">var</span> loader = <span class="kw2">new</span> Loader<span class="br0">&#40;</span><span class="br0">&#41;</span>; <span class="co1">// create the Loader object</span>
loader.<span class="kw3">load</span><span class="br0">&#40;</span>request<span class="br0">&#41;</span>;

loader.<span class="me1">contentLoaderInfo</span>.<span class="me1">addEventListener</span><span class="br0">&#40;</span>ProgressEvent.<span class="me1">PROGRESS</span>, <span class="kw3">onLoadProgress</span><span class="br0">&#41;</span>;
loader.<span class="me1">contentLoaderInfo</span>.<span class="me1">addEventListener</span><span class="br0">&#40;</span>Event.<span class="me1">COMPLETE</span>, <span class="kw3">onLoadComplete</span><span class="br0">&#41;</span>;
loader.<span class="me1">contentLoaderInfo</span>.<span class="me1">addEventListener</span><span class="br0">&#40;</span>IOErrorEvent.<span class="me1">IO_ERROR</span>, <span class="kw3">onLoadError</span><span class="br0">&#41;</span>;

<span class="co1">// call this function when the object is loading</span>
<span class="kw2">function</span> <span class="kw3">onLoadProgress</span><span class="br0">&#40;</span>event:ProgressEvent<span class="br0">&#41;</span>:<span class="kw3">void</span>
<span class="br0">&#123;</span>
&nbsp; &nbsp; <span class="co1">// display the percentage loaded</span>
&nbsp; &nbsp; <span class="kw3">trace</span><span class="br0">&#40;</span><span class="kw3">int</span><span class="br0">&#40;</span>event.<span class="kw3">bytesLoaded</span><span class="sy0">/</span>event.<span class="kw3">bytesTotal</span><span class="sy0">*</span><span class="nu0">100</span><span class="br0">&#41;</span>+<span class="st0">&quot;%&quot;</span><span class="br0">&#41;</span>;
&nbsp; &nbsp; <span class="co1">// display the bytes loaded and the total number of bytes</span>
&nbsp; &nbsp; <span class="kw3">trace</span><span class="br0">&#40;</span>event.<span class="kw3">bytesLoaded</span>+<span class="st0">&quot;:&quot;</span>+event.<span class="kw3">bytesTotal</span><span class="br0">&#41;</span>;
<span class="br0">&#125;</span>

<span class="co1">// call this function when the object is loaded</span>
<span class="kw2">function</span> <span class="kw3">onLoadComplete</span><span class="br0">&#40;</span>event:Event<span class="br0">&#41;</span>:<span class="kw3">void</span>
<span class="br0">&#123;</span>
<span class="co1">// duplicate and resize a loaded image (doesn't work for swf)</span>
<span class="co1">// -----&gt;</span>
&nbsp; &nbsp; <span class="kw2">var</span> objectDuplicate:Bitmap = <span class="kw2">new</span> Bitmap<span class="br0">&#40;</span>loader.<span class="me1">content</span>.<span class="me1">bitmapData</span>.<span class="me1">clone</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;
&nbsp; &nbsp; objectDuplicate.<span class="kw3">width</span> = <span class="nu0">100</span>;
&nbsp; &nbsp; objectDuplicate.<span class="kw3">height</span> = <span class="nu0">100</span>;
&nbsp; &nbsp; objectDuplicate.<span class="kw3">smoothing</span> = <span class="kw2">true</span>;
&nbsp; &nbsp; _mc.<span class="me1">addChild</span><span class="br0">&#40;</span>objectDuplicate<span class="br0">&#41;</span>;
<span class="co1">// -----&gt;</span>

&nbsp; &nbsp; _mc.<span class="me1">addChild</span><span class="br0">&#40;</span>loader<span class="br0">&#41;</span>; <span class="co1">// attach object to MovieClip</span>
<span class="br0">&#125;</span>

<span class="co1">// call this function if the path to the object that you want to load is not valid</span>
<span class="kw2">function</span> <span class="kw3">onLoadError</span><span class="br0">&#40;</span>event:Event<span class="br0">&#41;</span>:<span class="kw3">void</span> 
<span class="br0">&#123;</span>
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">trace</span><span class="br0">&#40;</span><span class="st0">&quot;Error! The URL was not found.&quot;</span><span class="br0">&#41;</span>;
<span class="br0">&#125;</span></div>
</div>
</pre>
<p><a href='http://secure.hostgator.com/cgi-bin/affiliates/clickthru.cgi?id=dmarius' target='_blank'><img src='http://www.hostgator.com/affiliates/banners/hostgator754a.gif' /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://mariuscristiandonea.com/2009/05/30/load-an-image-jpeg-png-gif-or-a-swf-using-actionscript-30/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to trigger an event with ActionScript 3.0 when the sizes of a swf&#8217;s stage are modified</title>
		<link>http://mariuscristiandonea.com/2009/05/05/how-to-trigger-an-event-with-actionscript-30-when-the-sizes-of-a-swfs-stage-is-modified/</link>
		<comments>http://mariuscristiandonea.com/2009/05/05/how-to-trigger-an-event-with-actionscript-30-when-the-sizes-of-a-swfs-stage-is-modified/#comments</comments>
		<pubDate>Tue, 05 May 2009 06:49:03 +0000</pubDate>
		<dc:creator>Marius</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[event]]></category>
		<category><![CDATA[stage]]></category>
		<category><![CDATA[swf]]></category>

		<guid isPermaLink="false">http://mariuscristiandonea.com/?p=100</guid>
		<description><![CDATA[This is very useful when you try to create a &#8220;liquid&#8221; flash application.
ActionScript 3.0 code:


//The next 2 lines are not mandatory. 
//Use them if you whant to keep the original sizes.
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT; // Other values: 
//TOP, BOTTOM, LEFT, RIGHT, TOP_RIGHT
// BOTTOM_LEFT, BOTTOM_RIGHT 

stage.addEventListener&#40;Event.RESIZE, resizeHandler&#41;;

function resizeHandler&#40;event:Event&#41;:void 
&#123;
&#160; &#160; &#160; &#160; trace&#40;stage.stageWidth&#41;;
&#160; &#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>This is very useful when you try to create a &#8220;liquid&#8221; flash application.</p>
<p><strong>ActionScript 3.0 code:</strong></p>
<pre>
<div class="codesnip-container" >
<div class="actionscript codesnip" style="font-family:monospace;"><span class="co1">//The next 2 lines are not mandatory. </span>
<span class="co1">//Use them if you whant to keep the original sizes.</span>
<span class="kw3">stage</span>.<span class="kw3">scaleMode</span> = StageScaleMode.<span class="me1">NO_SCALE</span>;
<span class="kw3">stage</span>.<span class="kw3">align</span> = StageAlign.<span class="me1">TOP_LEFT</span>; <span class="co1">// Other values: </span>
<span class="co1">//TOP, BOTTOM, LEFT, RIGHT, TOP_RIGHT</span>
<span class="co1">// BOTTOM_LEFT, BOTTOM_RIGHT </span>

<span class="kw3">stage</span>.<span class="me1">addEventListener</span><span class="br0">&#40;</span>Event.<span class="me1">RESIZE</span>, resizeHandler<span class="br0">&#41;</span>;

<span class="kw2">function</span> resizeHandler<span class="br0">&#40;</span>event:Event<span class="br0">&#41;</span>:<span class="kw3">void</span> 
<span class="br0">&#123;</span>
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">trace</span><span class="br0">&#40;</span><span class="kw3">stage</span>.<span class="me1">stageWidth</span><span class="br0">&#41;</span>;
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">trace</span><span class="br0">&#40;</span><span class="kw3">stage</span>.<span class="me1">stageHeight</span><span class="br0">&#41;</span>;
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">trace</span><span class="br0">&#40;</span><span class="st0">&quot;An event has been triggered.&quot;</span><span class="br0">&#41;</span>;
<span class="br0">&#125;</span></div>
</div>
</pre>
<p><a href='http://secure.hostgator.com/cgi-bin/affiliates/clickthru.cgi?id=dmarius' target='_blank'><img src='http://www.hostgator.com/affiliates/banners/hostgator754a.gif' /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://mariuscristiandonea.com/2009/05/05/how-to-trigger-an-event-with-actionscript-30-when-the-sizes-of-a-swfs-stage-is-modified/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to parse a XML file using ActionScript 3.0</title>
		<link>http://mariuscristiandonea.com/2009/05/03/how-to-parse-a-xml-file-using-actionscript-30/</link>
		<comments>http://mariuscristiandonea.com/2009/05/03/how-to-parse-a-xml-file-using-actionscript-30/#comments</comments>
		<pubDate>Sun, 03 May 2009 13:46:08 +0000</pubDate>
		<dc:creator>Marius</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://mariuscristiandonea.com/?p=43</guid>
		<description><![CDATA[Here is an example on how to get data from XML file using ActionScript 3.0.
XML file example:


&#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62;
&#60;Data&#62;
&#160; &#160; &#60;Title font=&#34;Arial&#34;&#62;
&#160; &#160; &#160; &#160; XML Example
&#160; &#160; &#60;/Title&#62;
&#160; &#160; &#60;HTML_Example&#62;
&#160; &#160; &#160; &#160; &#60;![CDATA[You can add html text here.]]&#62;
&#160; &#160; &#60;/HTML_Example&#62;
&#160; &#160; &#60;List&#62;
&#160; &#160; &#160; &#160; &#60;URL&#62;http://www.mariuscristiandonea.com&#60;/URL&#62;
&#160; &#160; &#160; &#160; &#60;URL&#62;http://www.mariuscristiandonea.com&#60;/URL&#62;
&#160; &#160; &#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>Here is an example on how to get data from XML file using ActionScript 3.0.</p>
<p><strong>XML file example:</strong></p>
<pre>
<div class="codesnip-container" >
<div class="xml codesnip" style="font-family:monospace;"><span class="sc3"><span class="re1">&lt;?xml</span> <span class="re0">version</span>=<span class="st0">&quot;1.0&quot;</span> <span class="re0">encoding</span>=<span class="st0">&quot;utf-8&quot;</span><span class="re2">?&gt;</span></span>
<span class="sc3"><span class="re1">&lt;Data<span class="re2">&gt;</span></span></span>
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;Title</span> <span class="re0">font</span>=<span class="st0">&quot;Arial&quot;</span><span class="re2">&gt;</span></span>
&nbsp; &nbsp; &nbsp; &nbsp; XML Example
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;/Title<span class="re2">&gt;</span></span></span>
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;HTML_Example<span class="re2">&gt;</span></span></span>
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc2">&lt;![CDATA[You can add html text here.]]&gt;</span>
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;/HTML_Example<span class="re2">&gt;</span></span></span>
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;List<span class="re2">&gt;</span></span></span>
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;URL<span class="re2">&gt;</span></span></span>http://www.mariuscristiandonea.com<span class="sc3"><span class="re1">&lt;/URL<span class="re2">&gt;</span></span></span>
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;URL<span class="re2">&gt;</span></span></span>http://www.mariuscristiandonea.com<span class="sc3"><span class="re1">&lt;/URL<span class="re2">&gt;</span></span></span>
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;URL<span class="re2">&gt;</span></span></span>http://www.mariuscristiandonea.com<span class="sc3"><span class="re1">&lt;/URL<span class="re2">&gt;</span></span></span>
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;URL<span class="re2">&gt;</span></span></span>http://www.mariuscristiandonea.com<span class="sc3"><span class="re1">&lt;/URL<span class="re2">&gt;</span></span></span>
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;URL<span class="re2">&gt;</span></span></span>http://www.mariuscristiandonea.com<span class="sc3"><span class="re1">&lt;/URL<span class="re2">&gt;</span></span></span>
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;URL<span class="re2">&gt;</span></span></span>http://www.mariuscristiandonea.com<span class="sc3"><span class="re1">&lt;/URL<span class="re2">&gt;</span></span></span>
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;URL<span class="re2">&gt;</span></span></span>http://www.mariuscristiandonea.com<span class="sc3"><span class="re1">&lt;/URL<span class="re2">&gt;</span></span></span>
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;URL<span class="re2">&gt;</span></span></span>http://www.mariuscristiandonea.com<span class="sc3"><span class="re1">&lt;/URL<span class="re2">&gt;</span></span></span>
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;URL<span class="re2">&gt;</span></span></span>http://www.mariuscristiandonea.com<span class="sc3"><span class="re1">&lt;/URL<span class="re2">&gt;</span></span></span>
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;URL<span class="re2">&gt;</span></span></span>http://www.mariuscristiandonea.com<span class="sc3"><span class="re1">&lt;/URL<span class="re2">&gt;</span></span></span>
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;/List<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/Data<span class="re2">&gt;</span></span></span></div>
</div>
</pre>
<p><strong>ActionScript 3.0 code:</strong></p>
<pre>
<div class="codesnip-container" >
<div class="actionscript codesnip" style="font-family:monospace;"><span class="kw2">var</span> XMLLoader:URLLoader;
<span class="kw2">var</span> XMLPath:URLRequest;
<span class="kw2">var</span> XMLDoc:XMLDocument = <span class="kw2">new</span> XMLDocument<span class="br0">&#40;</span><span class="br0">&#41;</span>;
XMLDoc.<span class="kw3">ignoreWhite</span> = <span class="kw2">true</span>;

XMLPath = <span class="kw2">new</span> URLRequest<span class="br0">&#40;</span><span class="st0">&quot;test.xml&quot;</span><span class="br0">&#41;</span>;
XMLLoader = <span class="kw2">new</span> URLLoader<span class="br0">&#40;</span>XMLPath<span class="br0">&#41;</span>;
<span class="co1">// Call extractXMLFileData function if the XML file does load.</span>
XMLLoader.<span class="me1">addEventListener</span><span class="br0">&#40;</span><span class="st0">&quot;complete&quot;</span>, extractXMLFileData<span class="br0">&#41;</span>;
<span class="co1">// Call errorXMLFileData function if the XML file didn't load.</span>
XMLLoader.<span class="me1">addEventListener</span><span class="br0">&#40;</span><span class="st0">&quot;ioError&quot;</span>, errorXMLFileData<span class="br0">&#41;</span>;

<span class="co1">// This function parse the data from the XML file, if it is loaded.</span>
<span class="kw2">function</span> extractXMLFileData<span class="br0">&#40;</span>event:Event<span class="br0">&#41;</span>:<span class="kw3">void</span>
<span class="br0">&#123;</span>
&nbsp; &nbsp; <span class="kw2">var</span> XMLData:<span class="kw3">XML</span> = <span class="kw3">XML</span><span class="br0">&#40;</span>XMLLoader.<span class="kw3">data</span><span class="br0">&#41;</span>;
&nbsp; &nbsp; XMLDoc.<span class="kw3">parseXML</span><span class="br0">&#40;</span>XMLData.<span class="me1">toXMLString</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;
<span class="co1">// Define the first node.</span>
&nbsp; &nbsp; <span class="kw2">var</span> DataNode:<span class="kw3">XMLNode</span> = XMLDoc.<span class="kw3">firstChild</span>; 

<span class="co1">// Read a node attribute.</span>
&nbsp; &nbsp; <span class="kw3">trace</span><span class="br0">&#40;</span>DataNode.<span class="kw3">firstChild</span>.<span class="kw3">attributes</span>.<span class="kw3">font</span><span class="br0">&#41;</span>;
<span class="co1">// Read a node value.</span>
&nbsp; &nbsp; <span class="kw3">trace</span><span class="br0">&#40;</span>DataNode.<span class="kw3">firstChild</span>.<span class="kw3">firstChild</span>.<span class="kw3">nodeValue</span><span class="br0">&#41;</span>;
<span class="co1">// Here we read the node value that contains the HTML text.</span>
&nbsp; &nbsp; <span class="kw3">trace</span><span class="br0">&#40;</span>DataNode.<span class="kw3">childNodes</span><span class="br0">&#91;</span>1<span class="br0">&#93;</span>.<span class="kw3">firstChild</span>.<span class="kw3">nodeValue</span><span class="br0">&#41;</span>; 

<span class="co1">// In the next &quot;for&quot; we read all the URL nodes.</span>
&nbsp; &nbsp; <span class="kw1">for</span> <span class="br0">&#40;</span><span class="kw2">var</span> currentNode = DataNode.<span class="kw3">childNodes</span><span class="br0">&#91;</span>2<span class="br0">&#93;</span>.<span class="kw3">firstChild</span>;
currentNode <span class="sy0">!</span>= <span class="kw2">null</span>; currentNode=currentNode.<span class="kw3">nextSibling</span><span class="br0">&#41;</span>
&nbsp; &nbsp; <span class="br0">&#123;</span>
<span class="co1">// If the name of the node is &quot;URL&quot; then we read the value from it.</span>
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span>currentNode.<span class="kw3">nodeName</span> == <span class="st0">&quot;URL&quot;</span><span class="br0">&#41;</span>
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">trace</span><span class="br0">&#40;</span>currentNode.<span class="kw3">firstChild</span>.<span class="kw3">nodeValue</span><span class="br0">&#41;</span>;
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span>
&nbsp; &nbsp; <span class="br0">&#125;</span>
<span class="br0">&#125;</span>

<span class="co1">// This function takes action if the XML file didn't load.</span>
<span class="kw2">function</span> errorXMLFileData<span class="br0">&#40;</span>event:Event<span class="br0">&#41;</span>:<span class="kw3">void</span>
<span class="br0">&#123;</span>
&nbsp; &nbsp; <span class="kw3">trace</span><span class="br0">&#40;</span><span class="st0">&quot;Error! The XML file didn't load!&quot;</span><span class="br0">&#41;</span>;
<span class="br0">&#125;</span></div>
</div>
</pre>
<p><a href='http://secure.hostgator.com/cgi-bin/affiliates/clickthru.cgi?id=dmarius' target='_blank'><img src='http://www.hostgator.com/affiliates/banners/hostgator754a.gif' /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://mariuscristiandonea.com/2009/05/03/how-to-parse-a-xml-file-using-actionscript-30/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to change a movie clip color using ActionScript 3.0</title>
		<link>http://mariuscristiandonea.com/2009/04/29/how-to-change-a-movie-clips-color-using-actionscript-30/</link>
		<comments>http://mariuscristiandonea.com/2009/04/29/how-to-change-a-movie-clips-color-using-actionscript-30/#comments</comments>
		<pubDate>Wed, 29 Apr 2009 06:31:48 +0000</pubDate>
		<dc:creator>Marius</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[color]]></category>
		<category><![CDATA[MovieClip]]></category>

		<guid isPermaLink="false">http://mariuscristiandonea.com/?p=16</guid>
		<description><![CDATA[This is a function that changes the color of a video given as a parameter in a new color given as parameter as well.
ActionScript 3.0 code:


import flash.geom.ColorTransform; // import ColorTransform class

function setColor&#40;_mc:MovieClip, color&#41;:void
&#123;
&#160; &#160; var newColor:ColorTransform = _mc.transform.colorTransform;
&#160; &#160; newColor.color = color;
&#160; &#160; _mc.transform.colorTransform = newColor;
&#125;

setColor&#40;bigBtn.icon.bg, 0xff0000&#41;; //call the function



]]></description>
			<content:encoded><![CDATA[<p>This is a function that changes the color of a video given as a parameter in a new color given as parameter as well.<strong></strong></p>
<p><strong>ActionScript 3.0 code:</strong></p>
<pre>
<div class="codesnip-container" >
<div class="actionscript codesnip" style="font-family:monospace;"><span class="kw3">import</span> flash.<span class="me1">geom</span>.<span class="me1">ColorTransform</span>; <span class="co1">// import ColorTransform class</span>

<span class="kw2">function</span> setColor<span class="br0">&#40;</span>_mc:<span class="kw3">MovieClip</span>, <span class="kw3">color</span><span class="br0">&#41;</span>:<span class="kw3">void</span>
<span class="br0">&#123;</span>
&nbsp; &nbsp; <span class="kw2">var</span> newColor:ColorTransform = _mc.<span class="me1">transform</span>.<span class="me1">colorTransform</span>;
&nbsp; &nbsp; newColor.<span class="kw3">color</span> = <span class="kw3">color</span>;
&nbsp; &nbsp; _mc.<span class="me1">transform</span>.<span class="me1">colorTransform</span> = newColor;
<span class="br0">&#125;</span>

setColor<span class="br0">&#40;</span>bigBtn.<span class="me1">icon</span>.<span class="me1">bg</span>, 0xff0000<span class="br0">&#41;</span>; <span class="co1">//call the function</span></div>
</div>
</pre>
<p><a href='http://secure.hostgator.com/cgi-bin/affiliates/clickthru.cgi?id=dmarius' target='_blank'><img src='http://www.hostgator.com/affiliates/banners/hostgator754a.gif' /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://mariuscristiandonea.com/2009/04/29/how-to-change-a-movie-clips-color-using-actionscript-30/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
