<?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>Fabricio Medeiros blog</title>
	<atom:link href="http://blog.fabriciom.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.fabriciom.com</link>
	<description></description>
	<lastBuildDate>Mon, 15 Nov 2010 06:02:56 +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>Coding as an organic, creative, and cathartic process</title>
		<link>http://blog.fabriciom.com/2010/04/17/coding-as-an-organic-creative-and-cathartic-process/</link>
		<comments>http://blog.fabriciom.com/2010/04/17/coding-as-an-organic-creative-and-cathartic-process/#comments</comments>
		<pubDate>Sat, 17 Apr 2010 04:03:04 +0000</pubDate>
		<dc:creator>Fabricio</dc:creator>
				<category><![CDATA[Art]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Interactive]]></category>

		<guid isPermaLink="false">http://blog.fabriciom.com/?p=426</guid>
		<description><![CDATA[Worth posting it.
Quote from Processing: creative coding and computational art by Ira Greenberg:
&#8220;When I tell people I write code as my main artistic medium, they smile politely and quickly
change the subject, or they tell me about their job-seeking cousin who makes videos using
iMovie.
For nonprogrammers, code is a mysterious and intimidating construct that gets
grouped into the [...]]]></description>
			<content:encoded><![CDATA[<p>Worth posting it.</p>
<p>Quote from <a href="http://books.google.ca/books?id=WTl_7H5HUZAC&#038;dq=processing+creative+coding+and+computational+art&#038;printsec=frontcover&#038;source=bn&#038;hl=en&#038;ei=gjLJS8vmH4G0lQfLleXpCQ&#038;sa=X&#038;oi=book_result&#038;ct=result&#038;resnum=4&#038;ved=0CA8Q6AEwAw#v=onepage&#038;q&#038;f=false" target="_blank">Processing: creative coding and computational art</a> by Ira Greenberg:</p>
<p>&#8220;When I tell people I write code as my main artistic medium, they smile politely and quickly<br />
change the subject, or they tell me about their job-seeking cousin who makes videos using<br />
iMovie.<br />
For nonprogrammers, code is a mysterious and intimidating construct that gets<br />
grouped into the category of things too complicated, geeky, or time-consuming to be<br />
worth learning.<br />
At the other extreme, for some professional programmers, code is seen<br />
only as a tool to solve a technical problem—certainly not a creative medium.<br />
There is another path—a path perhaps harder to maneuver, but ultimately more rewarding<br />
than either the path of avoidance or detachment—a holistic “middle” way.<br />
This is the path the book promotes; it presents the practice of coding as an art form/art practice,<br />
rather than simply a means to an end. Although there are times when a project is scoped<br />
out, and we are simply trying to implement it, most of the time as artists, we are trying to<br />
find our way in the process of creating a project.<br />
This approach of finding and searching is one of the things that makes the artist’s journey distinctive<br />
and allows new unexpected solutions to be found. It is possible to do this in coding as well, and the<br />
Processing language facilitates and encourages such a “creative coding” approach.&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fabriciom.com/2010/04/17/coding-as-an-organic-creative-and-cathartic-process/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Facebook Open Graph</title>
		<link>http://blog.fabriciom.com/2010/04/24/facebook-open-graph/</link>
		<comments>http://blog.fabriciom.com/2010/04/24/facebook-open-graph/#comments</comments>
		<pubDate>Sat, 24 Apr 2010 04:53:36 +0000</pubDate>
		<dc:creator>Fabricio</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Design]]></category>

		<guid isPermaLink="false">http://blog.fabriciom.com/?p=434</guid>
		<description><![CDATA[Facebook for websites
According to Facebook, “The Open Graph API will allow any page on the Web to have all the features of a Facebook Page &#8211; users will be able to become a Fan of the page, it will show up on that user’s profile and in search results, and that page will be able [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://developers.facebook.com/docs/guides/web">Facebook for websites</a></p>
<p>According to Facebook, “The Open Graph API will allow any page on the Web to have all the features of a Facebook Page &#8211; users will be able to become a Fan of the page, it will show up on that user’s profile and in search results, and that page will be able to publish stories to the stream of its fans.” </p>
<p>By implementing this new service however, Facebook will become the primary authentication hub for social experiences around the web. This authentication process makes Facebook the center of user identities and the announcement of opening up developer access to emails means Facebook has literally become a wrapper for open identification. Using the APIs, the data will flow back from these sites to Facebook.</p>
<p>“Now that Facebook is willing to share user emails, Facebook Connect will become default signup for most websites.”</p>
<p>Connect is already largely successful. It’s becoming more and more rare to go to a popular site on the web that doesn’t implement it in some way (even if it’s just for commenting). But in many ways, Connect doesn’t go far enough. If Facebook truly wants to be the main hub of social data on the web, it needs more data coming in from more sites, and Open Graph can provide that. </p>
<p>Whether we like it or not, we have to understand what this move means. It impacts users, publishers, competitors and, of course, Facebook itself.</p>
<p>From the developer perspective, it adds to the development process, although many complain the API is tricky and complicated. It seems to be a huge effort from their engineering team.<br />
From the user perspective the major implication is one: privacy.<br />
In my opinion they will be able to control too much and I understand their business practices, but the user should be able to decide what and when to use something.</p>
<p>The Open Graph is a set combination of publisher plugins, semantic markup and a developer API.</p>
<p>Facebook announced simple, RDF-based markup to make the plugins smarter. In a nutshell, the markup enables publishers to say what object is on the page &#8211; a movie, a book, an event, a sports team, etc. This automatically enables semantics, that is, an understanding that the user is not just interacting with a webpage, but that he or she is liking a specific kind of thing. More importantly, the markup helps Facebook connect the users across common interests across different websites.</p>
<p>Let&#8217;s give it a try.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fabriciom.com/2010/04/24/facebook-open-graph/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Blend effect</title>
		<link>http://blog.fabriciom.com/2010/04/16/blend-effect/</link>
		<comments>http://blog.fabriciom.com/2010/04/16/blend-effect/#comments</comments>
		<pubDate>Sat, 17 Apr 2010 00:27:53 +0000</pubDate>
		<dc:creator>Fabricio</dc:creator>
				<category><![CDATA[Art]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Xperiments / Tuts]]></category>

		<guid isPermaLink="false">http://blog.fabriciom.com/?p=419</guid>
		<description><![CDATA[Using After Effects I tried to achieve a smoke type of effect.
After some research, I found out that it could be achieved without using any special plugin, just radio waves and an expression to control the amount of waves.
That&#8217;s it.
All I had to do was animate masks in the timeline, frequency and the slider control [...]]]></description>
			<content:encoded><![CDATA[<p>Using After Effects I tried to achieve a smoke type of effect.<br />
After some research, I found out that it could be achieved without using any special plugin, just radio waves and an expression to control the amount of waves.<br />
That&#8217;s it.</p>
<p>All I had to do was animate masks in the timeline, frequency and the slider control value.<br />
When I say animate, I mean keyframe it.</p>
<p>Create a background of your choice and a solid layer. Onto the solid layer apply radio waves from Effect->Generate->Radio Waves.<br />
You can adjust all properties according to mine, or play with it. Add a slider control (Expression Controls -> Slider Control) to be used in a minute. </p>
<p><img src="http://labs.fabriciom.com/tuts/blend/effects_panel.png" /></p>
<p>The way it works is:</p>
<p>1. Create different masks and apply them to the same solid layer!This is important. Radio waves can use masks instead of polygon, but only one at a time.<br />
To make it easier, bring it from Illustrator or another solid layer in AE, just copy and paste it, or, copy and paste a keyframe from that auxiliary solid layer.<br />
Of course copy in different places in time, otherwise it will be overwritten.<br />
The keyframe holds all information about the mask.</p>
<p>Just be careful, I am using &#8220;Mask 2&#8243; because I changed the first one I tried, but the number doesn&#8217;t matter.</p>
<p>Don&#8217;t worry about everything else for now.<br />
(Keyframe &#8220;Mask Path&#8221;, place keyframe for each mask)<br />
Masks on timeline:<br />
<img src="http://labs.fabriciom.com/tuts/blend/mask1.png" /><br />
<img src="http://labs.fabriciom.com/tuts/blend/mask2.png" /><br />
<img src="http://labs.fabriciom.com/tuts/blend/mask3.png" /></p>
<p>2. On the Effects panel link Radio Waves to your solid layer, or better yet, to your mask on that solid layer.</p>
<p>How it looks on the Effects panel:<br />
<img src="http://labs.fabriciom.com/tuts/blend/mask_panel.png" /></p>
<p>How it looks on the timeline:<br />
<img src="http://labs.fabriciom.com/tuts/blend/mask_panel2.png" /></p>
<p>3. Now we need an expression to control or affect Radio Waves generation. That&#8217;s when the silder control plays its part.<br />
To the Radio Waves producer point, add the following expression:</p>
<p>x=effect(&#8220;Slider Control&#8221;)(&#8220;Slider&#8221;)<br />
wiggle(1,x*200);</p>
<p>To add an expression according to <a href="http://help.adobe.com/en_US/AfterEffects/9.0/WS3878526689cb91655866c1103906c6dea-7a2ca.html" target="_blank">Adobe</a>:</p>
<p>&#8220;To add an expression to a property, select the property in the Timeline panel and choose Animation > Add Expression or press Alt+Shift+= (Windows) or Option+Shift+= (Mac OS); or Alt-click (Windows) or Option-click (Mac OS) the stopwatch button  next to the property name in the Timeline panel or Effect Controls panel.&#8221;</p>
<p>Now, you can keyframe Frequency and Slider values to get the results you want.</p>
<p>You can download my .aep file below and check out how I did it, but my suggestion is play with it!The only problem is processing, each time you change a value, it<br />
takes a while to re-render all effects. So be patient!The results are worth it!</p>
<p><a href="http://labs.fabriciom.com/tuts/blend/Blend.zip" target="_blank">Source .aep</a></p>
<p>Final result:<br />
<object width="400" height="225"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=10939101&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=10939101&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="225"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fabriciom.com/2010/04/16/blend-effect/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>No silver bullet</title>
		<link>http://blog.fabriciom.com/2010/04/06/no-silver-bullet/</link>
		<comments>http://blog.fabriciom.com/2010/04/06/no-silver-bullet/#comments</comments>
		<pubDate>Tue, 06 Apr 2010 17:07:40 +0000</pubDate>
		<dc:creator>Fabricio</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Misc]]></category>

		<guid isPermaLink="false">http://blog.fabriciom.com/?p=386</guid>
		<description><![CDATA[No Silver Bullet is a classic known paper among software engineers written by Fred Brooks.
It strips down the nature of software development, or simply the art of programming.
In its history, programming brought to this world so many paradigms related to all activities involved in the process that mastering this art is object of discussion and [...]]]></description>
			<content:encoded><![CDATA[<p>No Silver Bullet is a classic known paper among software engineers written by Fred Brooks.<br />
It strips down the nature of software development, or simply the art of programming.</p>
<p>In its history, programming brought to this world so many paradigms related to all activities involved in the process that mastering this art is object of discussion and observation in the Digital Era.</p>
<p>Certainly, it&#8217;s not as straight-forward as creating an application lay-out on Illustrator, or enhancing a picture in Photoshop or making that financial spreadsheet in Excel.<br />
From designing the app, implementing chunks of code and make them interact, to debugging the process,  the level of complexity raises in an attempt to transfer idea, concepts and the client needs into a digital medium.</p>
<p>The rise of the Internet led to very rapid growth in the demand for international information display/e-mail systems on the World Wide Web. Programmers were required to handle illustrations, maps, photographs, and other images, plus simple animation, at a rate never before seen, with few well-known methods to optimize image display/storage (such as the use of thumbnail images).</p>
<p>There is a constant demand for solutions to new ideas and more efficient communication.<br />
However, software development does not happen in the same pace as hardware development.<br />
New tendencies point to rapid-prototyping techniques turning programmers into heroes, so to speak.<br />
Therefore, which methodology and approach used in a project must be carefully chosen.</p>
<p><a href="http://en.wikipedia.org/wiki/No_Silver_Bullet">No Silver Bullet wiki</a></p>
<p><a href="http://docs.google.com/viewer?a=v&#038;q=cache:S7vydJqQeyQJ:sys.cs.rice.edu/course/comp314/10/lectures/Brooks87.pdf+no+silver+bullet&#038;hl=en&#038;gl=ca&#038;pid=bl&#038;srcid=ADGEESi5XlYGwc4V52Tpa_JlqSyWtTYPAG5w3QgSAogYqjKT49_OeBy6UycbnCoXCrRG2YSvnNagGL2t3rI5NqQ9y2a70o6en9-NQkRmAR6GYSKBlY0tbU3VNaniOKTFBUhiIn1agIbK&#038;sig=AHIEtbTz_JMc2Y8BEiIvk43bKhlvPj5dLw">No Silver Bullet paper</a></p>
<p>&#8220;The complexity of software is an essential property, not an accidental one.&#8221; We observe that this inherent complexity derives from four elements: the complexity of the problem domain, the difficulty of managing the development process, the flexibility possible through software, and the problems of characterizing the behavior of discrete systems.&#8221;<br />
Fred Brooks.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fabriciom.com/2010/04/06/no-silver-bullet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vilém Flusser &#8211; A philosopher of design</title>
		<link>http://blog.fabriciom.com/2010/04/06/vilem-flusser-a-philosopher-of-design/</link>
		<comments>http://blog.fabriciom.com/2010/04/06/vilem-flusser-a-philosopher-of-design/#comments</comments>
		<pubDate>Tue, 06 Apr 2010 05:23:40 +0000</pubDate>
		<dc:creator>Fabricio</dc:creator>
				<category><![CDATA[Art]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Misc]]></category>

		<guid isPermaLink="false">http://blog.fabriciom.com/?p=379</guid>
		<description><![CDATA[Last year I read a really awesome book written by Vilém Flusser.
He has books published in English, Portuguese and German. Unfortunately the one I read I only found in Portuguese.
Flusser describes a world fundamentally changed by the invention of the &#8220;technical image&#8221; and the mechanisms that support and define industrialized modern culture. He argues that [...]]]></description>
			<content:encoded><![CDATA[<p>Last year I read a really awesome book written by <a href="http://en.wikipedia.org/wiki/Vil%C3%A9m_Flusser" target = "_blank">Vilém Flusser</a>.</p>
<p>He has books published in English, Portuguese and German. Unfortunately the one I read I only found in Portuguese.</p>
<p>Flusser describes a world fundamentally changed by the invention of the &#8220;technical image&#8221; and the mechanisms that support and define industrialized modern culture. He argues that whereas ideas were previously interpreted by written account, the invention of photography allows the creation of images (ideas) taken at face value as truth, not interpretation that can be endlessly replicated and spread worldwide. </p>
<p>Really worth reading, specially for those that work in the interactive/design/web industry! <img src='http://blog.fabriciom.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://www.amazon.com/s?ie=UTF8&#038;rh=i%3Astripbooks%2Cp_27%3AVilem%20Flusser&#038;field-author=Vilem%20Flusser&#038;page=1" target = "_blank">Amazon Flusser book collection</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fabriciom.com/2010/04/06/vilem-flusser-a-philosopher-of-design/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HDVideoPlayer class</title>
		<link>http://blog.fabriciom.com/2010/04/05/hdvideoplayer-class/</link>
		<comments>http://blog.fabriciom.com/2010/04/05/hdvideoplayer-class/#comments</comments>
		<pubDate>Tue, 06 Apr 2010 03:50:15 +0000</pubDate>
		<dc:creator>Fabricio</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Interactive]]></category>
		<category><![CDATA[Xperiments / Tuts]]></category>

		<guid isPermaLink="false">http://blog.fabriciom.com/?p=350</guid>
		<description><![CDATA[I worked on a project where I built a video player. So far, nothing out of normality.
The issue was that we decided to set up the video dimensions on the Flash side rather than in the CMS with checkboxes or something similar.
Video dimensions vary in width and height, but also in proportion, or aspect ratio.
Wiki [...]]]></description>
			<content:encoded><![CDATA[<p>I worked on a project where I built a video player. So far, nothing out of normality.<br />
The issue was that we decided to set up the video dimensions on the Flash side rather than in the CMS with checkboxes or something similar.</p>
<p>Video dimensions vary in width and height, but also in proportion, or aspect ratio.</p>
<p><a href="http://en.wikipedia.org/wiki/File:Vector_Video_Standards2.svg" target="_blank">Wiki video standards chart</a></p>
<p>The client had all sorts of videos, 640 x 480, 400 x 300, 1280 x 720, etc.<br />
The solution is to detect the file dimensions in an onMetaData event handler and set your visual elements accordingly.<br />
For wide screen mode I decided to draw the black stripes on top and bottom.<br />
I use the NetStream and NetConnection objects to handle the video file.</p>
<p>Preview:<br />
<a href="http://labs.fabriciom.com/tuts/hdvideo/Main.html" target="_blank">HD video player</a></p>
<p>Here is the source code for the video player class.</p>
<p><font color="#FF0000">HDVideoPlayer.as:</font></p>
<pre class="brush: as3; collapse: true; gutter: false; light: false; toolbar: true; wrap-lines: false;">
package src{

	/*Import*/

	import flash.text.TextField;
	import flash.text.TextFieldAutoSize;
        import flash.text.TextFormat;
	import flash.media.SoundTransform;
	import flash.media.Video;
	import flash.net.NetConnection;
	import flash.net.NetStream;
	import flash.net.URLLoader;
	import flash.net.URLRequest;
	import flash.display.*;
	import flash.events.*;
	import flash.geom.*;

	import caurina.transitions.*;
	import caurina.transitions.properties.ColorShortcuts;

	/*Class*/
	public class HDVideoPlayer extends MovieClip {

		/*Properties*/
		private var mVideo:Video;
		private var ncVideo:NetConnection = new NetConnection();
		private var nsVideo:NetStream;
		private var netClient:Object = new Object();
		private var mySound:SoundTransform;
		private var videoDuration:Number;
		private var actualTime:Number = 0;
		private var actualTimeDragger:Number;
		private var actualLength:Number;
		private var volPercentage:Number;
		private var pctLoaded:Number;
		private var pctPlayed:Number;
		private var dragTime:Number;
		private var videoURL:String  = new String();
		private var MODE:String;

		private var mBG:Sprite = new Sprite();
		private var mBlackStripes:Sprite = new Sprite();
		private var mBGBar:Sprite = new Sprite();
		private var mProgressBar:Sprite = new Sprite();
		private var mLoadBar:Sprite = new Sprite();
		private var mDragger:Sprite = new Sprite();
		private var mControl:MovieClip = new MovieClip();
		private var mPlay:PlayPause = new PlayPause();
		private var mStop:Stop = new Stop();
		private var mVolume:Volume = new Volume();
		private var bFull:Full = new Full();
		private var bBack:Back = new Back();

		private var tAlert:TextField;
		private var format:TextFormat = new TextFormat();
		private var volEquation:Number;
		private var videoWidth:Number;
		private var videoHeight:Number;
		private var ratio:Number;
		private var diffDragger:Number = 0;
		private var overColor:uint;

		/*Constructor*/
		public function HDVideoPlayer(fileData:Object):void{
			trace(&quot;//---&gt; HDVideoPlayer&quot;);
			videoURL = fileData.file;
			overColor = 0xFFFFFF;
			ColorShortcuts.init();
			addEventListener(Event.ADDED_TO_STAGE, init);
		};

		private function init(e:Event):void{
			removeEventListener(Event.ADDED_TO_STAGE, init);
 			addEventListener(Event.REMOVED_FROM_STAGE, removedFromStage);
			buildVideo();
		};

		private function removedFromStage(e:Event):void{
			trace(&quot;// ---- HDVideoPlayer removed from stage&quot;);
			mySound.volume = 0;
			nsVideo.soundTransform = mySound;
			nsVideo.close();
			ncVideo.close();
			mVideo.clear();
			mVideo.alpha = 0;
			removeEventListener(Event.REMOVED_FROM_STAGE, removedFromStage);
		};

		public function buildVideo ():void{

			MODE = &quot;SD&quot;;

			mBG.graphics.beginFill(0x231F20, 1);
			mBG.graphics.drawRect(0, 0, 400, 364);
			mBG.graphics.endFill();
			mBG.alpha = 0;
			addChild(mBG);

			mBlackStripes.graphics.beginFill(0x000000, 1);
			mBlackStripes.graphics.drawRect(0, 0, 400, 300);
			mBlackStripes.graphics.endFill();
			addChild(mBlackStripes);

			mPlay.x = 25;
			mPlay.y = 14;
			mControl.addChild(mPlay);

			mStop.x = 64;
			mStop.y = 14;
			mControl.addChild(mStop);

			bFull.x = 175;
			bFull.y = 10;
			bFull.visible = false;
			mControl.addChild(bFull);

			bBack.x = -12;
			bBack.y = -12;
			bBack.visible = false;
			addChild(bBack);

			mVolume.x = 302;
			mVolume.y = 18;
			mControl.addChild(mVolume);

			mBGBar.graphics.beginFill(0x3F3F3F, 1);
			mBGBar.graphics.drawRect(0, 0, 400, 3);
			mBGBar.graphics.endFill();
			mBGBar.x = 0;
			mBGBar.y = 54;
			mControl.addChild(mBGBar);

			mLoadBar.graphics.beginFill(0xFFFFFF, 1);
			mLoadBar.graphics.drawRect(0, 0, 400, 3);
			mLoadBar.graphics.endFill();
			mLoadBar.x = 0;
			mLoadBar.y = 54;
			mLoadBar.width = 0;
			mControl.addChild(mLoadBar);

			mProgressBar.graphics.beginFill(0xF5F5F5, 1);
			mProgressBar.graphics.drawRect(0, 0, 400, 3);
			mProgressBar.graphics.endFill();
			mProgressBar.x = 0;
			mProgressBar.y = 54;
			mProgressBar.alpha = 0;
			mControl.addChild(mProgressBar);

			mDragger.graphics.beginFill(0xFFFFFF, 1);
			mDragger.graphics.drawRect(0, 0, 14, 7);
			mDragger.graphics.endFill();
			mDragger.x = 0;
			mDragger.y = 47;
			mControl.addChild(mDragger);

			diffDragger = mBGBar.width - mDragger.width;

			tAlert = new TextField();
                        tAlert.autoSize = TextFieldAutoSize.CENTER;
			tAlert.x = 120;
			tAlert.width = 160;
			tAlert.height = 14;
			tAlert.textColor = 0xFFFFFF;

                        format.font = &quot;Arial&quot;;
			format.bold = true;
                        format.color = 0xFFFFFF;
                        format.size = 8;
                        tAlert.defaultTextFormat = format;
			mControl.addChild(tAlert);

			mControl.y = 308;
			mControl.alpha = 0;
			addChild(mControl);

			Tweener.addTween(mDragger,{_color:overColor, time:0});

			Tweener.addTween(mControl, {alpha:1, time:1, transition:&quot;linear&quot;,
				onComplete:function(){
					connectVideo();
				}
			});

		};

		public function connectVideo ():void{
			//Video connection
			ncVideo.connect(null);
			nsVideo = new NetStream(ncVideo);
			nsVideo.client = this;
			nsVideo.bufferTime = 5;

			mVideo = new Video();
			mVideo.x = 0;
			mVideo.y = 0;
			addChild(mVideo);

			this.swapChildren(mVideo, bBack);

			mVideo.attachNetStream(nsVideo);
			nsVideo.play(videoURL);
			mVideo.smoothing = true;

			mPlay.gotoAndStop(1);
			//Sound
			mySound = nsVideo.soundTransform;
			mySound.volume = 1;
			nsVideo.soundTransform = mySound;
			//Bars
			mLoadBar.width = 0;
			mProgressBar.width = 0;
			//Listeners
			nsVideo.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);

			bFull.addEventListener(MouseEvent.MOUSE_DOWN, buildVideoHD);
			bFull.addEventListener(MouseEvent.ROLL_OVER, eventOver);
			bFull.addEventListener(MouseEvent.ROLL_OUT, eventOut);

			bBack.addEventListener(MouseEvent.MOUSE_DOWN, backVideo);
			bBack.addEventListener(MouseEvent.ROLL_OVER, eventOver);
			bBack.addEventListener(MouseEvent.ROLL_OUT, eventOut);

			mPlay.addEventListener(MouseEvent.MOUSE_DOWN, pauseVideo);
			mPlay.addEventListener(MouseEvent.ROLL_OVER, eventOver);
			mPlay.addEventListener(MouseEvent.ROLL_OUT, eventOut);

			mStop.addEventListener(MouseEvent.MOUSE_DOWN, stopVideo);
			mStop.addEventListener(MouseEvent.ROLL_OVER, eventOver);
			mStop.addEventListener(MouseEvent.ROLL_OUT, eventOut);

			mDragger.addEventListener(MouseEvent.MOUSE_DOWN, dragSeek);

			mVolume.mVolSlider.addEventListener(MouseEvent.MOUSE_DOWN, volumeScrubberClicked);
			stage.addEventListener(MouseEvent.MOUSE_UP, volumeScrubberUnClicked);
			mVolume.mVolSlider.addEventListener(MouseEvent.ROLL_OVER, volumeScrubberRolledOver);

			mLoadBar.addEventListener(Event.ENTER_FRAME, loadBar);

			mPlay.buttonMode = true;
			mStop.buttonMode = true;
			bFull.buttonMode = true;
			bBack.buttonMode = true;
			mDragger.buttonMode = true;
			mVolume.mVolSlider.buttonMode = true;

			mPlay.dispatchEvent(new MouseEvent(MouseEvent.ROLL_OUT));
			mStop.dispatchEvent(new MouseEvent(MouseEvent.ROLL_OUT));
			bFull.dispatchEvent(new MouseEvent(MouseEvent.ROLL_OUT));
			bBack.dispatchEvent(new MouseEvent(MouseEvent.ROLL_OUT));
		};

		public function eventOver (e:MouseEvent):void{
			Tweener.addTween(e.currentTarget, {alpha:1, time:0.2, transition:&quot;linear&quot;});
		};

		public function eventOut (e:MouseEvent):void{
			Tweener.addTween(e.currentTarget, {alpha:.5, time:0.2, transition:&quot;linear&quot;});
		};

		public function netStatusHandler(evt:NetStatusEvent):void{

			if(evt.info.code == &quot;NetStream.FileStructureInvalid&quot;){
				tAlert.text = &quot;File structure invalid. &quot;;
			}else if(evt.info.code == &quot;NetStream.NoSupportedTrackFound&quot;){
				tAlert.text = &quot;File is not supported. &quot;;
			}else if (evt.info.code ==  &quot;NetStream.Play.StreamNotFound&quot;) {
				tAlert.text = &quot;Error: Stream not found. &quot;;
			}else if (evt.info.code ==  &quot;NetStream.Play.Start&quot;) {
				tAlert.text = &quot;Buffering video... &quot;;
				trace(&quot;evt.info.code ---&gt;&gt;&gt; &quot;+evt.info.code+&quot;\n&quot;)
			}else if (evt.info.code ==  &quot;NetStream.Buffer.Empty&quot;) {
				tAlert.text = &quot;Buffering video... &quot;;
				trace(&quot;evt.info.code ---&gt;&gt;&gt; &quot;+evt.info.code+&quot;\n&quot;)
			}else if (evt.info.code == &quot;NetStream.Buffer.Full&quot;) {
				mPlay.gotoAndStop(2);
				trace(&quot;evt.info.code ---&gt;&gt;&gt; &quot;+evt.info.code+&quot;\n&quot;)
				tAlert.text = &quot; &quot;;
			}else if (evt.info.code ==  &quot;NetStream.Play.Stop&quot;){
				mPlay.gotoAndStop(1);
				trace(&quot;evt.info.code ---&gt;&gt;&gt; &quot;+evt.info.code+&quot;\n&quot;)
			}

		};

		public function onMetaData(obj:Object):void{
			for(var propName:String in obj){
				//trace(&quot;**Metadata video: &quot;+propName + &quot; = &quot; + obj[propName])
				if (propName == &quot;width&quot;) {
					videoWidth = obj[propName]
				}
				if (propName == &quot;height&quot;) {
					videoHeight = obj[propName]
				}
			};

			ratio = videoHeight/videoWidth;
			ratio = Number(ratio.toFixed(4));
			//trace(&quot;videoWidth original ---&gt; &quot;+videoWidth)
			//trace(&quot;videoHeight original ---&gt; &quot;+videoHeight)
			//trace(&quot;ratio ---&gt; &quot;+ratio)
			addEventListener(Event.ENTER_FRAME, dragSeekBar);
			videoDuration = obj.duration;
			setVideo();
		};

		private function setVideo():void{

			if (MODE == &quot;SD&quot;) {
				mVideo.width = 400;
				if (ratio &lt; 0.6) {
					bFull.visible = true;
					mVideo.y = 36;

				}else{
					mVideo.y = 0;
					bFull.visible = false;
				}

			}else if (MODE == &quot;HD960&quot;){
				mVideo.width = 960;
			}else if (MODE == &quot;HD640&quot;){
				mVideo.width = 640;
			}
			mVideo.height = Math.round(mVideo.width*ratio);
			trace(&quot;mVideo.height adjusted ---&gt; &quot;+mVideo.height)
		};

		public function buildVideoHD(obj:Object):void{

			if (stage.stageHeight &lt; 810) {

				MODE = &quot;HD640&quot;;

				mBG.width = 640;
				mBG.height = 424;
				mBlackStripes.width = 640;
				mBlackStripes.height = 360;
				mBGBar.width = 640;
				mLoadBar.width = 640;
				mProgressBar.width = 640;

				mControl.y = 368;
				mVolume.x = 530;
				bFull.x = 300;
				bFull.visible = false;
				bBack.x = -13;
				bBack.visible = true;
				tAlert.x = 320;

				mVideo.y = 0;
				setVideo();

				diffDragger = mBGBar.width - mDragger.width;
			}else{

				MODE = &quot;HD960&quot;;

				mBG.width = 960;
				mBG.height = 604;
				mBlackStripes.width = 960;
				mBlackStripes.height = 540;
				mBGBar.width = 960;
				mLoadBar.width = 960;
				mProgressBar.width = 960;

				mControl.y = 548;
				mVolume.x = 850;
				bFull.x = 460;
				bFull.visible = false;
				bBack.x = -13;
				bBack.visible = true;
				tAlert.x = 480;

				mVideo.y = 0;
				setVideo();

				diffDragger = mBGBar.width - mDragger.width;
			}

		};

		public function backVideo(obj:Object):void{

			MODE = &quot;SD&quot;;

			mBG.width = 400;
			mBG.height = 364;
			mBlackStripes.width = 400;
			mBlackStripes.height = 300;
			mBGBar.width = 400;
			mLoadBar.width = 400;
			mProgressBar.width = 400;

			mControl.y = 308;
			mVolume.x = 302;
			bFull.x = 175;

			bBack.visible = false;
			tAlert.x = 120;

			setVideo();

			diffDragger = mBGBar.width - mDragger.width;
		};

		public function pauseVideo(evt:MouseEvent):void{

			if (mPlay.currentFrame == 2) {
				mPlay.gotoAndStop(1);
				nsVideo.pause();
			}else{
				mPlay.gotoAndStop(2);
				setVideo();
				nsVideo.resume();
			}
		};

		public function stopVideo(evt:MouseEvent):void{
			nsVideo.pause();
			nsVideo.seek(0);
			mPlay.gotoAndStop(1);
		};

		public function loadBar(evt:Event):void{
			//trace(&quot;buffer ---&gt; &quot;+nsVideo.bufferLength)

			pctLoaded = Math.floor(nsVideo.bytesLoaded / nsVideo.bytesTotal * 100);
			Tweener.addTween(mLoadBar, {width: (mBGBar.width * pctLoaded) / 100, time:1, transition:&quot;linear&quot;});
			if (pctLoaded &gt;= 100){
				evt.currentTarget.removeEventListener(Event.ENTER_FRAME, loadBar);
			}
		};

		public function dragSeekBar(evt:Event):void{
			actualTime = nsVideo.time;
			Tweener.addTween(mDragger, {x: Math.round(actualTime / videoDuration * diffDragger), time:.1, transition:&quot;linear&quot;});
			actualTime = nsVideo.time;
			if (Math.round(actualTime) == Math.round(videoDuration)){
				Tweener.addTween(this, {time:1, transition:&quot;linear&quot;,
					onComplete:function(){
						tAlert.text = &quot;&quot;;
						nsVideo.pause();
						nsVideo.seek(0);
						mPlay.gotoAndStop(1);
					}
				});
			}
		};

		public function dragSeek(evt:Event):void{
			//actualTimeDragger = int(((evt.currentTarget.x) / mBGBar.width) * videoDuration);
			nsVideo.pause();
			removeEventListener(Event.ENTER_FRAME, dragSeekBar);
			Tweener.removeAllTweens();
			stage.addEventListener(MouseEvent.MOUSE_UP, dragSeekOut);
			evt.currentTarget.startDrag(false, new Rectangle(0,47,diffDragger,0));
		};

		public function dragSeekOut(evt:MouseEvent):void{
			dragTime = Math.round(mDragger.x / diffDragger * videoDuration);
			actualTime = dragTime;
			mDragger.x = (actualTime / videoDuration * diffDragger);
			nsVideo.seek(dragTime);
			nsVideo.resume();
			mPlay.gotoAndStop(2);
			mDragger.stopDrag();
			stage.removeEventListener(MouseEvent.MOUSE_UP, dragSeekOut);
			addEventListener(Event.ENTER_FRAME, dragSeekBar);
		};

		public function volumeScrubberClicked(evt:Event):void {
			mVolume.mVolSlider.startDrag(false, new Rectangle(8, 0, 66, 0));
			mVolume.mVolSlider.addEventListener(Event.ENTER_FRAME, volumeScrubberSlide);
		};

		public function volumeScrubberRolledOver(evt:Event):void	{
			evt.currentTarget.buttonMode = true;
		};

		public function volumeScrubberUnClicked(evt:Event):void	{
			mVolume.mVolSliderbuttonMode = false;
			mVolume.mVolSlider.stopDrag();
			mVolume.mVolSlider.removeEventListener(Event.ENTER_FRAME, volumeScrubberSlide);
		};

		public function volumeScrubberSlide(evt:Event):void{
			volEquation = (100*(evt.currentTarget.x - 8))/66;
			volPercentage = volEquation / 100;
			mySound.volume = volPercentage;
			nsVideo.soundTransform = mySound;
		};

		public function formatTime(t:int):String {
			// returns the minutes and seconds with leading zeros
			// for example: 70 returns 01:10
			var s:int = Math.round(t);
			var m:int = 0;
			if (s &gt; 0) {
				while (s &gt; 59) {
					m++;
					s -= 60;
				}
				return String((m &lt; 10 ? &quot;0&quot; : &quot;&quot;) + m + &quot;:&quot; + (s &lt; 10 ? &quot;0&quot; : &quot;&quot;) + s);
			}else {
				return &quot;00:00&quot;;
			}
		};

	};// end player class
};// end package
</pre>
<p>You can download the entire source code here:</p>
<p><a href="http://labs.fabriciom.com/tuts/hdvideo/HDVideo_source.zip" target="_blank">HDVideo_source</a></p>
<p>The library contains all the visual elements and in the <font color="#006600">Main.as</font> file you can change which video sample to play.<br />
There are three high-def videos to play with.<br />
I uploaded them separately because they are quite big.<br />
So, download it from here and place it in the video folder from the HDVideo_source.zip file.</p>
<p><a href="http://labs.fabriciom.com/tuts/hdvideo/video/videos.zip" target="_blank">Video files</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fabriciom.com/2010/04/05/hdvideoplayer-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Arduino + Flash + Wii</title>
		<link>http://blog.fabriciom.com/2010/04/06/arduino-flash-wii/</link>
		<comments>http://blog.fabriciom.com/2010/04/06/arduino-flash-wii/#comments</comments>
		<pubDate>Tue, 06 Apr 2010 05:25:15 +0000</pubDate>
		<dc:creator>Fabricio</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Interactive]]></category>

		<guid isPermaLink="false">http://blog.fabriciom.com/?p=381</guid>
		<description><![CDATA[More and more I want to have a chance to work on a project using Arduino!
Check this example out:
Arduino + Flash + Wii Nunchuck + Servos + Webcam
]]></description>
			<content:encoded><![CDATA[<p>More and more I want to have a chance to work on a project using Arduino!</p>
<p>Check this example out:<br />
<a href="http://www.iestyn.net/wp/2009/03/29/arduino-flash-wii-nunchuck-servos-webcam-part-1">Arduino + Flash + Wii Nunchuck + Servos + Webcam</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fabriciom.com/2010/04/06/arduino-flash-wii/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>CaT 2009: Open Source Everything</title>
		<link>http://blog.fabriciom.com/2010/04/06/cat-2009-open-source-everything/</link>
		<comments>http://blog.fabriciom.com/2010/04/06/cat-2009-open-source-everything/#comments</comments>
		<pubDate>Tue, 06 Apr 2010 05:36:14 +0000</pubDate>
		<dc:creator>Fabricio</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Art]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Interactive]]></category>

		<guid isPermaLink="false">http://blog.fabriciom.com/?p=383</guid>
		<description><![CDATA[Ben Fry, co-founder of Processing  and director of Seed Phyllotaxis Lab  and Carlos Ulloa, founder and creator of Papervision3D and HelloEnjoy talk about their software as well as their views on the future of open source and collaboration.
CaT 2009: Open source everything
]]></description>
			<content:encoded><![CDATA[<p>Ben Fry, co-founder of Processing  and director of Seed Phyllotaxis Lab  and Carlos Ulloa, founder and creator of Papervision3D and HelloEnjoy talk about their software as well as their views on the future of open source and collaboration.</p>
<p><a href="http://creativity-online.com/work/cat-2009-open-source-everything/16356" target="_blank">CaT 2009: Open source everything</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fabriciom.com/2010/04/06/cat-2009-open-source-everything/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick thoughts on Flash vs. HTML5</title>
		<link>http://blog.fabriciom.com/2010/04/05/quick-thoughts-on-flash-vs-html5/</link>
		<comments>http://blog.fabriciom.com/2010/04/05/quick-thoughts-on-flash-vs-html5/#comments</comments>
		<pubDate>Mon, 05 Apr 2010 18:46:15 +0000</pubDate>
		<dc:creator>Fabricio</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Business]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Misc]]></category>

		<guid isPermaLink="false">http://blog.fabriciom.com/?p=241</guid>
		<description><![CDATA[Well, recently there has been a lot of discussion on the future of Flash or the web.
Just because some known websites and companies have chosen HTML5 as an alternative for their development.
I&#8217;d like to say this is not a biased statement, but I have to point out the pros and cons of each technology accordingly [...]]]></description>
			<content:encoded><![CDATA[<p>Well, recently there has been a lot of discussion on the future of Flash or the web.<br />
Just because some known websites and companies have chosen HTML5 as an alternative for their development.</p>
<p>I&#8217;d like to say this is not a biased statement, but I have to point out the pros and cons of each technology accordingly to my perspective and past experience.</p>
<p>First, I have coded, learned, failed and succeeded with both.<br />
Back in the day I was so amused by the fact that we could code for visual purposes, at least for the web.</p>
<p>So, html came into play and it was fun understanding how all that could be wrapped with data and server-side processing.<br />
From iframes to tables and later divs the language was evolving, slowly but forward.<br />
And that is my point, it takes decades to something new get implemented in html, it took a long time to have a video tag!<br />
Not to mention that html is an interpreted language, not compiled. It needs support form other technologies such as Javascript or back-end ones.<br />
Now, the good part, it can be accessed from any browser, despite some incompatibilities, any app or device.<br />
I am pretty sure that will evolve more in the short-term, new libraries and frameworks of all kinds will be more popular, useful and reliable.</p>
<p>On the other hand, Flash which is mistakenly know only as an animation program, or a way to &#8220;make annoying banners&#8221; for some (I am serious, I heard that so many time!s) is largely used for delivering digital content on the web, such as video (Youtube owes Flash a lot!), interactivity, 3d, etc.<br />
From a basic prototyped language to a OOP version its language became a powerful resource for web development and adds that dynamic touch as if the webpage is another canvas itself.</p>
<p>There is a lot more to tell and discuss for both technologies, but to make my point clear, I am trying to say that both technologies are useful and there should be no need for such war. It reminds me of the Cold War, Coca-cola vs. Pepsi or Nike vs. Adidas, which means both sides, I mean both side supporters, are more concerned in attacking each other rather than providing better solutions for each technology.<br />
When planes first came out, we didn&#8217;t loose cars, bikes or any other type of vehicles. Unfortunately, most people depend on cars more than anything else, but people support alternatives to that.<br />
What about the user?Have we forgot it?To me this should all be about having a better experience on the web, whether it is done in Flash or HTML5. You also need a plug-in (runtime) for Java if you visit a webpage that contains Java apps or applets and still no one mentions that as a turn down for Java. Why do they do it for Flash?</p>
<p>Certainly, HTML5 will benefit the web and Flash use will decrease in the following years, but wouldn&#8217;t it be great if they both continue as the main technologies for front-end development? Who is the evil and the good guy here?</p>
<p>Behind this debate there are some many things we don&#8217;t know about it, corporations interested in increasing their profits and extinguishing competitors.<br />
My advice for users is use both, don&#8217;t complain if it&#8217;s Flash the webpage you visit, you probably don&#8217;t know how much effort there is in order to bring you that information.<br />
Also, don&#8217;t complain if that HTML5 site is killing your processor due to a canvas animation in the background. Eventually, you will have to choose one for certain apps, but don&#8217;t feel guilty in your decision, find a way to support both.<br />
For developers, be aware of what&#8217;s going on, try them both, the more you understand both, the broader will be your options when it comes to use one technology for a specific project. You may like one more than the other, but coldly analyze what fits better your skills and needs for each app you work on.</p>
<p>Below is some good articles I read in the past few days. It&#8217;s more info for you to be wisely involved in this buzz.</p>
<p><a href="http://www.alistapart.com/articles/flashstandards/" target="_blank">Dan Mall post about the Cold War of the Web</a></p>
<p><a href="http://www.kaourantin.net/2010/02/core-animation.html" target="_blank">Adobe Engineer explaining the nuances of Core Animation in Cocoa (MacOS)</a></p>
<p><a href="http://www.streaminglearningcenter.com/articles/flash-player-cpu-hog-or-hot-tamale-it-depends-.html" target="_blank">Flash Player CPU performance analysis</a></p>
<p><a href="http://techcrunch.com/2010/02/05/the-future-of-web-content-html5-flash-mobile-apps/" target="_blank">The Future of Web Content</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fabriciom.com/2010/04/05/quick-thoughts-on-flash-vs-html5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Roundoff error</title>
		<link>http://blog.fabriciom.com/2010/04/05/roundoff-error/</link>
		<comments>http://blog.fabriciom.com/2010/04/05/roundoff-error/#comments</comments>
		<pubDate>Mon, 05 Apr 2010 05:30:46 +0000</pubDate>
		<dc:creator>Fabricio</dc:creator>
				<category><![CDATA[Actionscript]]></category>

		<guid isPermaLink="false">http://blog.fabriciom.com/?p=306</guid>
		<description><![CDATA[Computers still do wrong calculations!
Adobe says: &#8220;This is not a bug in Flash. This is an example of roundoff error, a fundamental issue in floating-point arithmetic.&#8221;
Indeed, it&#8217;s true, but it&#8217;s an exception, it is bound to happen due to mathematics nature.
A floating point is not exact.
Check it out:
Adobe  Technote
]]></description>
			<content:encoded><![CDATA[<p>Computers still do wrong calculations!<br />
Adobe says: &#8220;This is not a bug in Flash. This is an example of roundoff error, a fundamental issue in floating-point arithmetic.&#8221;<br />
Indeed, it&#8217;s true, but it&#8217;s an exception, it is bound to happen due to mathematics nature.<br />
A floating point is not exact.</p>
<p>Check it out:<br />
<a href="http://kb2.adobe.com/cps/139/tn_13989.html" target="_blank">Adobe  Technote</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fabriciom.com/2010/04/05/roundoff-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

