<?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/"
	>

<channel>
	<title>sandrohaag.com</title>
	<atom:link href="http://www.sandrohaag.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sandrohaag.com/blog</link>
	<description>Another Flash Blog</description>
	<pubDate>Mon, 09 Aug 2010 20:05:54 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>AS3 Scrollbar v3</title>
		<link>http://www.sandrohaag.com/blog/2010/08/09/as3-scrollbar-v3/</link>
		<comments>http://www.sandrohaag.com/blog/2010/08/09/as3-scrollbar-v3/#comments</comments>
		<pubDate>Mon, 09 Aug 2010 20:04:33 +0000</pubDate>
		<dc:creator>Sandro Haag</dc:creator>
		
		<category><![CDATA[Actionscript]]></category>

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

		<guid isPermaLink="false">http://www.sandrohaag.com/blog/?p=125</guid>
		<description><![CDATA[Hey!
The new version of AS3 Scrollbar is much better. I solve some bugs, and implement some features.
- Horizontal Scrollbar - Now you can create vertical and/or horizontal scrollbars. An extra parameter called direction was created into initialize method.
- Blur - You can add blur effect when it is scrolling. It uses some CPU processor, and [...]]]></description>
			<content:encoded><![CDATA[<p>Hey!</p>
<p>The new version of AS3 Scrollbar is much better. I solve some bugs, and implement some features.</p>
<p><strong>- Horizontal Scrollbar</strong> - Now you can create vertical and/or horizontal scrollbars. An extra parameter called <em>direction</em> was created into <em>initialize</em> method.<br />
<strong>- Blur</strong> - You can add blur effect when it is scrolling. It uses some CPU processor, and I need to make it better, but for now it is good <img src='http://www.sandrohaag.com/blog/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /><br />
<strong>- Change Size Method</strong> - The public method changeSize(value) changes the size of the scrollbar, and positionate the arrow automatically.</p>
<p><a href="http://sandrohaag.com/labs/scrollbar/v3/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/sandrohaag.com/labs/scrollbar/v3/?referer=');">Click here</a> to check the demo.<br />
<a href="http://code.google.com/p/sandrohaag-as3-repository/downloads/list" target="_blank" onclick="pageTracker._trackPageview('/outgoing/code.google.com/p/sandrohaag-as3-repository/downloads/list?referer=');">Click here</a> to download the source files.</p>
<p>Let me know if you find any issue.</p>
<p>Thanks</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sandrohaag.com/blog/2010/08/09/as3-scrollbar-v3/feed/</wfw:commentRss>
		</item>
		<item>
		<title>URL Utilities Class</title>
		<link>http://www.sandrohaag.com/blog/2010/08/02/url-utilities-class/</link>
		<comments>http://www.sandrohaag.com/blog/2010/08/02/url-utilities-class/#comments</comments>
		<pubDate>Mon, 02 Aug 2010 17:55:06 +0000</pubDate>
		<dc:creator>Sandro Haag</dc:creator>
		
		<category><![CDATA[Actionscript]]></category>

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

		<guid isPermaLink="false">http://www.sandrohaag.com/blog/?p=111</guid>
		<description><![CDATA[Hey!
I have been using this class for a long time. It is pretty simple, but useful.
It has 3 methods:
getURL - Just like in AS2, that I think is much better than using navigateToURL and URLRequest functions.
javascript - Executes a javascript function.
alert - Executes the javascript alert function.
To download this class, click here
Thanks!
]]></description>
			<content:encoded><![CDATA[<p>Hey!</p>
<p>I have been using this class for a long time. It is pretty simple, but useful.<br />
It has 3 methods:</p>
<p><strong>getURL - </strong>Just like in AS2, that I think is much better than using navigateToURL and URLRequest functions.<br />
<strong>javascript - </strong>Executes a javascript function.<br />
<strong>alert - </strong>Executes the javascript alert function.</p>
<p>To download this class, <a href="http://code.google.com/p/sandrohaag-as3-repository/downloads/list" target="_blank" onclick="pageTracker._trackPageview('/outgoing/code.google.com/p/sandrohaag-as3-repository/downloads/list?referer=');">click here</a></p>
<p>Thanks!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sandrohaag.com/blog/2010/08/02/url-utilities-class/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Trigger class</title>
		<link>http://www.sandrohaag.com/blog/2010/02/18/trigger-class/</link>
		<comments>http://www.sandrohaag.com/blog/2010/02/18/trigger-class/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 19:11:47 +0000</pubDate>
		<dc:creator>Sandro Haag</dc:creator>
		
		<category><![CDATA[Actionscript]]></category>

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

		<guid isPermaLink="false">http://www.sandrohaag.com/blog/?p=92</guid>
		<description><![CDATA[Hey! Yes, I am alive!
Well, today I am going to show you a class that I use a lot. It is a simple one and its utility is also pretty simple, but it is very useful. The Trigger class!
The name is kind of suggestive, a class that executes a function with some delay. You can [...]]]></description>
			<content:encoded><![CDATA[<p>Hey! Yes, I am alive!</p>
<p>Well, today I am going to show you a class that I use a lot. It is a simple one and its utility is also pretty simple, but it is very useful. The Trigger class!<br />
The name is kind of suggestive, a class that executes a function with some delay. You can set how many times you want to repeat the function  and pass many arguments you want in a simple way. It also has the possibility to cancel the execution of a function that was set to trigger.</p>
<p>The class has 2 public static methods:<br />
<code>call (delay:Number, fn:Function, repeat:int = 1, ...args)<br />
cancel (fn:Function)</code></p>
<p>Below I show you how to use the call method:<br />
<code>Trigger.call(2, trace, 1, "param1", "param2", "param3");<br />
Trigger.call(3, test);</code></p>
<p>Now, how to cancel the execution of a function:<br />
<code>Trigger.cancel(trace);</code></p>
<p>You can download the class <a href="http://code.google.com/p/sandrohaag-as3-repository/downloads/list" target="_blank" onclick="pageTracker._trackPageview('/outgoing/code.google.com/p/sandrohaag-as3-repository/downloads/list?referer=');">here</a><br />
If you have any problem, please report it to me.</p>
<p>Oh, and thanks to <a href="http://thelaborat.org" target="_blank" onclick="pageTracker._trackPageview('/outgoing/thelaborat.org?referer=');">Eduardo</a> that helped me with this one.</p>
<p>See ya!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sandrohaag.com/blog/2010/02/18/trigger-class/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Mouse Wheel Event on Mac</title>
		<link>http://www.sandrohaag.com/blog/2009/09/21/mouse-wheel-event-on-mac/</link>
		<comments>http://www.sandrohaag.com/blog/2009/09/21/mouse-wheel-event-on-mac/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 16:38:54 +0000</pubDate>
		<dc:creator>Sandro Haag</dc:creator>
		
		<category><![CDATA[Actionscript]]></category>

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

		<guid isPermaLink="false">http://www.sandrohaag.com/blog/?p=83</guid>
		<description><![CDATA[Really! It doesn&#8217;t work!
There are some solutions for this problem, using javascript and Actionscript 3. But one of those I really enjoyed, because it is very simple.
You can check the solution here.
I tested in Safari and FF on Mac, and it worked well.
]]></description>
			<content:encoded><![CDATA[<p>Really! It doesn&#8217;t work!</p>
<p>There are some solutions for this problem, using javascript and Actionscript 3. But one of those I really enjoyed, because it is very simple.</p>
<p>You can check the solution <a href="http://blog.earthbrowser.com/2009/01/simple-solution-for-mousewheel-events.html" target="blank" onclick="pageTracker._trackPageview('/outgoing/blog.earthbrowser.com/2009/01/simple-solution-for-mousewheel-events.html?referer=');">here.</a></p>
<p>I tested in Safari and FF on Mac, and it worked well.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sandrohaag.com/blog/2009/09/21/mouse-wheel-event-on-mac/feed/</wfw:commentRss>
		</item>
		<item>
		<title>AS3 Scrollbar v2</title>
		<link>http://www.sandrohaag.com/blog/2009/09/10/as3-scrollbar-v2/</link>
		<comments>http://www.sandrohaag.com/blog/2009/09/10/as3-scrollbar-v2/#comments</comments>
		<pubDate>Thu, 10 Sep 2009 19:37:39 +0000</pubDate>
		<dc:creator>Sandro Haag</dc:creator>
		
		<category><![CDATA[Actionscript]]></category>

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

		<guid isPermaLink="false">http://www.sandrohaag.com/blog/?p=80</guid>
		<description><![CDATA[Hey!
I did some adjustments on the AS3 Scrollbar, and added a new method.
The getter/setter method gap is used to control the space after the content. The default value is 0. If you set it to 100, for example, the content will scroll more than usual, and will be a gap between the end of the [...]]]></description>
			<content:encoded><![CDATA[<p>Hey!</p>
<p>I did some adjustments on the AS3 Scrollbar, and added a new method.</p>
<p>The getter/setter method gap is used to control the space after the content. The default value is 0. If you set it to 100, for example, the content will scroll more than usual, and will be a gap between the end of the content and the mask. This can solve some spacement problems that sometimes happen.</p>
<p><a href="http://sandrohaag.com/labs/scrollbar/v2/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/sandrohaag.com/labs/scrollbar/v2/?referer=');">Click here</a> to see a simple demo.<br />
<a href="http://sandrohaag.com/labs/scrollbar/v2/scrollbar_v2.zip" onclick="pageTracker._trackPageview('/outgoing/sandrohaag.com/labs/scrollbar/v2/scrollbar_v2.zip?referer=');">Click here</a> to download the new sample files.</p>
<p><strong>TODO list</strong><br />
- Add the possibility of the scrollbar be horizontal<br />
- Add blur functionality<br />
- Better up the usage<br />
- Make it more flexible<br />
- Make the tween works independent, so you can adapt to any tween engine</p>
<p>Please, report me the bugs and suggestions.</p>
<p>See ya!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sandrohaag.com/blog/2009/09/10/as3-scrollbar-v2/feed/</wfw:commentRss>
		</item>
		<item>
		<title>AS3 Scrollbar</title>
		<link>http://www.sandrohaag.com/blog/2009/07/27/as3-scrollbar/</link>
		<comments>http://www.sandrohaag.com/blog/2009/07/27/as3-scrollbar/#comments</comments>
		<pubDate>Mon, 27 Jul 2009 19:20:53 +0000</pubDate>
		<dc:creator>Sandro Haag</dc:creator>
		
		<category><![CDATA[Actionscript]]></category>

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

		<guid isPermaLink="false">http://www.sandrohaag.com/blog/?p=72</guid>
		<description><![CDATA[Hey!
Scrollbar was always something that I needed, but also something that I never spent time to create. But, things change and here is the first version of the AS3 Scrollbar.
Click here to see a simple demo.
Click here to download the sample files.
It is very simple to use, and has some nice features. You can stop [...]]]></description>
			<content:encoded><![CDATA[<p>Hey!</p>
<p>Scrollbar was always something that I needed, but also something that I never spent time to create. But, things change and here is the first version of the AS3 Scrollbar.</p>
<p><a href="http://sandrohaag.com/labs/scrollbar/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/sandrohaag.com/labs/scrollbar/?referer=');">Click here</a> to see a simple demo.<br />
<a href="http://sandrohaag.com/labs/scrollbar/scrollbar.zip" onclick="pageTracker._trackPageview('/outgoing/sandrohaag.com/labs/scrollbar/scrollbar.zip?referer=');">Click here</a> to download the sample files.</p>
<p>It is very simple to use, and has some nice features. You can stop and restart all its events by simple using the cancel and run method.</p>
<p>It is documented in the class, but if you have some problems or find some bugs, please reply on this post or email me. </p>
<p>Thanks!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sandrohaag.com/blog/2009/07/27/as3-scrollbar/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Removing a FLVPlayBack Instance</title>
		<link>http://www.sandrohaag.com/blog/2009/06/29/removing-a-flvplayback-instance/</link>
		<comments>http://www.sandrohaag.com/blog/2009/06/29/removing-a-flvplayback-instance/#comments</comments>
		<pubDate>Mon, 29 Jun 2009 20:59:49 +0000</pubDate>
		<dc:creator>Sandro Haag</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.sandrohaag.com/blog/?p=68</guid>
		<description><![CDATA[Hey!
Well, remove a FLVPlayBack instance is more complicated than you can possible imagine!
If you try to remove one, just using this:
removeChild(player);
You will notice that actually the player is there, you can hear it (if it has sound, of course :P)
So, just do this:
player.getVideoPlayer(player.activeVideoPlayerIndex).close();
player.activeVideoPlayerIndex = player.activeVideoPlayerIndex + 1;
player.visibleVideoPlayerIndex = player.activeVideoPlayerIndex;
Yeap, Adobe sometimes doesn&#8217;t help us!  [...]]]></description>
			<content:encoded><![CDATA[<p>Hey!</p>
<p>Well, remove a FLVPlayBack instance is more complicated than you can possible imagine!<br />
If you try to remove one, just using this:<br />
<code>removeChild(player);</code><br />
You will notice that actually the player is there, you can hear it (if it has sound, of course :P)</p>
<p>So, just do this:<br />
<code>player.getVideoPlayer(player.activeVideoPlayerIndex).close();<br />
player.activeVideoPlayerIndex = player.activeVideoPlayerIndex + 1;<br />
player.visibleVideoPlayerIndex = player.activeVideoPlayerIndex;</code></p>
<p>Yeap, Adobe sometimes doesn&#8217;t help us! <img src='http://www.sandrohaag.com/blog/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.sandrohaag.com/blog/2009/06/29/removing-a-flvplayback-instance/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Randomizing an Array</title>
		<link>http://www.sandrohaag.com/blog/2009/05/25/randomize-an-array/</link>
		<comments>http://www.sandrohaag.com/blog/2009/05/25/randomize-an-array/#comments</comments>
		<pubDate>Mon, 25 May 2009 17:27:10 +0000</pubDate>
		<dc:creator>Sandro Haag</dc:creator>
		
		<category><![CDATA[Actionscript]]></category>

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

		<guid isPermaLink="false">http://www.sandrohaag.com/blog/?p=46</guid>
		<description><![CDATA[Hi!
Here is a simple example of how to sort the items of an Array and get a randomized Array:
function sortArray (original:Array) : Array
{
   var temp:Array = original;
   var sort:Array = [];

   while (temp.length &#62; 0)
   {
      var r:int = Math.random() * temp.length;
 [...]]]></description>
			<content:encoded><![CDATA[<p>Hi!</p>
<p>Here is a simple example of how to sort the items of an Array and get a randomized Array:</p>
<pre><code>function sortArray (original:Array) : Array
{
   var temp:Array = original;
   var sort:Array = [];

   while (temp.length &gt; 0)
   {
      var r:int = Math.random() * temp.length;
      sort.push(temp[r]);
      temp.splice(r, 1);
   }

   return sort;
}</code></pre>
<p>Now, just execute the method, passing as parameter the Array that you want to randomize.</p>
<p><code>var original:Array = [0, 1, 2, 3, 4];<br />
var randomized:Array = sortArray(original);<br />
trace(&#8221;result: &#8221; + randomized); // result: 3, 1, 4, 0, 2</code></p>
<p>That&#8217;s it! </p>
]]></content:encoded>
			<wfw:commentRss>http://www.sandrohaag.com/blog/2009/05/25/randomize-an-array/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Zinc 3.0</title>
		<link>http://www.sandrohaag.com/blog/2009/05/18/zinc-30/</link>
		<comments>http://www.sandrohaag.com/blog/2009/05/18/zinc-30/#comments</comments>
		<pubDate>Mon, 18 May 2009 13:29:26 +0000</pubDate>
		<dc:creator>Sandro Haag</dc:creator>
		
		<category><![CDATA[Actionscript]]></category>

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

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

		<guid isPermaLink="false">http://www.sandrohaag.com/blog/?p=36</guid>
		<description><![CDATA[Hey!
Yes, a long time has passed since the last post. So here I am.
I am using Zinc 3.0 for a project, and here is my report of it.
In a few words, I can say that it is good, but not better than Adobe AIR.
It is a little complicated in the beggining, cause doesn`t have documentation. [...]]]></description>
			<content:encoded><![CDATA[<p>Hey!</p>
<p>Yes, a long time has passed since the last post. So here I am.</p>
<p>I am using Zinc 3.0 for a project, and here is my report of it.<br />
In a few words, I can say that it is good, but not better than Adobe AIR.<br />
It is a little complicated in the beggining, cause doesn`t have documentation. The only doc available is <a title="here" href="http://www.multidmedia.com/support/livedocs/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.multidmedia.com/support/livedocs/?referer=');">here</a>, and it doesn&#8217;t  help so much.</p>
<p>To give an example, If I don&#8217;t do this:<br />
<code>mdm.Application.init(MovieClip(this), onInit);</code><br />
The functions that I will execute will not work, but it will not throw me any error.<br />
I have spent a considerable time to discover that I need to initiliaze the mdm classes.</p>
<p>When you have all configured, and familiared with the Zinc, it is kind&#8217;a easy to use. A lot of things you do in the Zinc Builder, on graphic mode. I guess the main problem of Zinc is the documentation, cause I think you can do everything with it, you just have to know how. Another problem is that there are not a lot of users, so this turns the thing a little bit complicated when you need some help.</p>
<p>Well, if someone has some question about it, just post here.</p>
<p>Thanks!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sandrohaag.com/blog/2009/05/18/zinc-30/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Regular Expressions</title>
		<link>http://www.sandrohaag.com/blog/2009/01/30/regular-expressions/</link>
		<comments>http://www.sandrohaag.com/blog/2009/01/30/regular-expressions/#comments</comments>
		<pubDate>Sat, 31 Jan 2009 01:40:12 +0000</pubDate>
		<dc:creator>Sandro Haag</dc:creator>
		
		<category><![CDATA[Actionscript]]></category>

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

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

		<guid isPermaLink="false">http://www.sandrohaag.com/blog/?p=19</guid>
		<description><![CDATA[Regular Expressions is one of the great things that Adobe has done in Actionscript 3. It simplifies the way that you do the validation of email, birthdate, cep&#8230;
Almost all programming languages have Regular Expressions, the only thing that modify, is the usage.
Here are some examples:
Email
var regExp:RegExp = /^[a-z][w.-]+@w[w.-]+.[w.-]*[a-z][a-z]$/i;
var isValid:Boolean = regExp.test(&#8221;hahahaag@gmail.com&#8221;);
trace(isValid); // true
Birthdate
This is one [...]]]></description>
			<content:encoded><![CDATA[<p>Regular Expressions is one of the great things that Adobe has done in Actionscript 3. It simplifies the way that you do the validation of email, birthdate, cep&#8230;</p>
<p>Almost all programming languages have Regular Expressions, the only thing that modify, is the usage.</p>
<p>Here are some examples:</p>
<p><strong>Email</strong></p>
<p><code>var regExp:RegExp = /^[a-z][w.-]+@w[w.-]+.[w.-]*[a-z][a-z]$/i;<br />
var isValid:Boolean = regExp.test(&#8221;hahahaag@gmail.com&#8221;);<br />
trace(isValid); // true</code></p>
<p><strong>Birthdate</strong></p>
<p>This is one of the longest Regular Expression that I&#8217;ve used. It validates the birthdate perfect, including leap year.</p>
<p><code>var regExp:RegExp = /^(((0[1-9]|[12][0-9]|3[01])([/])(0[13578]|10|12)([/])([1-2][0,9][0-9][0-9]))|(([0][1-9]|[12][0-9]|30)([/])(0[469]|11)([/])([1-2][0,9][0-9][0-9]))|((0[1-9]|1[0-9]|2[0-8])([/])(02)([/])([1-2][0,9][0-9][0-9]))|((29)(.|-|-)(02)([/])([02468][048]00))|((29)([/])(02)([/])([13579][26]00))|((29)([/])(02)([/])([0-9][0-9][0][48]))|((29)([/])(02)([/])([0-9][0-9][2468][048]))|((29)([/])(02)([/])([0-9][0-9][13579][26])))$/i;<br />
var isValid:Boolean = regExp.test(&#8221;16/06/1986&#8243;);<br />
trace(isValid); // true</code></p>
<p>You can find many others, searching at Google. The usage is the same.</p>
<p>If somebody finds others interesting RegExp, please send it to me.</p>
<p>Good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sandrohaag.com/blog/2009/01/30/regular-expressions/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
