<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Lithium Flower</title>
	<atom:link href="http://carroarmato0.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://carroarmato0.wordpress.com</link>
	<description>Personal blog</description>
	<lastBuildDate>Sun, 18 Dec 2011 14:35:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='carroarmato0.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Lithium Flower</title>
		<link>http://carroarmato0.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://carroarmato0.wordpress.com/osd.xml" title="Lithium Flower" />
	<atom:link rel='hub' href='http://carroarmato0.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Fork-CMS and Lighttpd</title>
		<link>http://carroarmato0.wordpress.com/2011/09/18/fork-cms-and-lighttpd/</link>
		<comments>http://carroarmato0.wordpress.com/2011/09/18/fork-cms-and-lighttpd/#comments</comments>
		<pubDate>Sun, 18 Sep 2011 00:58:46 +0000</pubDate>
		<dc:creator>carroarmato0</dc:creator>
				<category><![CDATA[WebTech]]></category>
		<category><![CDATA[Fork]]></category>
		<category><![CDATA[CMS]]></category>
		<category><![CDATA[Lighttpd]]></category>

		<guid isPermaLink="false">http://carroarmato0.wordpress.com/?p=277</guid>
		<description><![CDATA[Fork-CMS is a young open source content management system which can be found at http://www.fork-cms.com/ The day this is posted, Fork will only work completely out of the box if you use Apache as your webserver. This is due to the fact that Fork needs to tell Apache through a .htaccess file to be treated specially &#8230; <a href="http://carroarmato0.wordpress.com/2011/09/18/fork-cms-and-lighttpd/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=carroarmato0.wordpress.com&amp;blog=352485&amp;post=277&amp;subd=carroarmato0&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Fork-CMS is a young open source content management system which can be found at <a title="http://www.fork-cms.com/" href="http://www.fork-cms.com/" target="_blank">http://www.fork-cms.com/</a></p>
<p>The day this is posted, Fork will only work completely out of the box if you use Apache as your webserver.</p>
<p>This is due to the fact that Fork needs to tell Apache through a .htaccess file to be treated specially in order to use prettier URLs.</p>
<p>For everything to work properly in Lighttpd, one must add some directives into Lighttpds configuration to obtain the same result.</p>
<p>Here is a sample configuration</p>
<blockquote>
<pre>server.modules = (
            "mod_simple_vhost",
            "mod_rewrite",
            ...
)
...
## Fork-CMS
$HTTP["host"] == "mydomain.com" {
    simple-vhost.server-root   = "/var/www/mydomain.com/forkcms"
    simple-vhost.document-root = "/default_www/"
    dir-listing.activate = "disable"
    url.rewrite = (
        "^/(.*)\.(.+)$" =&gt; "$0",
        "^/(.+)/?$" =&gt; "/index.php/$1"
    )
}</pre>
</blockquote>
<p>Here I&#8217;ve used a vHost because Fork needs to rewrite its URLs using the  root folder of your webserver as its root path, but because Fork is placed inside a subfolder, it needs to be tricked. Using vHosts will tell Lighttpd to treat a folder as a root folder for a certain domain name.</p>
<p>These are the minimal requirements to have Fork-CMS set up and functioning properly as it&#8217;s supposed to with regards to configuring Lighttpd as your webserver.</p>
<p>Additional configuration options can be added to Lighttpds configuration file to approximate the behaviour under Apache with regards to caching and compressing and so on.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/carroarmato0.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/carroarmato0.wordpress.com/277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/carroarmato0.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/carroarmato0.wordpress.com/277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/carroarmato0.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/carroarmato0.wordpress.com/277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/carroarmato0.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/carroarmato0.wordpress.com/277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/carroarmato0.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/carroarmato0.wordpress.com/277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/carroarmato0.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/carroarmato0.wordpress.com/277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/carroarmato0.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/carroarmato0.wordpress.com/277/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=carroarmato0.wordpress.com&amp;blog=352485&amp;post=277&amp;subd=carroarmato0&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://carroarmato0.wordpress.com/2011/09/18/fork-cms-and-lighttpd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fae3d0f0ef291595b61f1920dc37f89e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">carroarmato0</media:title>
		</media:content>
	</item>
		<item>
		<title>Fork-CMS: can&#8217;t load /private /blog&#8230;</title>
		<link>http://carroarmato0.wordpress.com/2010/10/15/fork-cms-cant-load-private-blog/</link>
		<comments>http://carroarmato0.wordpress.com/2010/10/15/fork-cms-cant-load-private-blog/#comments</comments>
		<pubDate>Fri, 15 Oct 2010 18:42:44 +0000</pubDate>
		<dc:creator>carroarmato0</dc:creator>
				<category><![CDATA[WebTech]]></category>

		<guid isPermaLink="false">http://carroarmato0.wordpress.com/?p=267</guid>
		<description><![CDATA[If you&#8217;re giving  Fork-CMS a try (which can be found at www.fork-cms.be), and are experiencing problems loading a lot of different pages, it might be because your Apache ignores the special .htaccess file the folks at Fork made to make some magic work. To make sure Apache looks into that file, you need to add the directive &#8230; <a href="http://carroarmato0.wordpress.com/2010/10/15/fork-cms-cant-load-private-blog/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=carroarmato0.wordpress.com&amp;blog=352485&amp;post=267&amp;subd=carroarmato0&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re giving  Fork-CMS a try (which can be found at <a title="Fork-cms" href="http://www.fork-cms.be">www.fork-cms.be</a>), and are experiencing problems loading a lot of different pages, it might be because your Apache ignores the special .htaccess file the folks at Fork made to make some magic work.</p>
<p>To make sure Apache looks into that file, you need to add the directive &#8220;<strong>AllowOverride All</strong>&#8220;, and restart Apache.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/carroarmato0.wordpress.com/267/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/carroarmato0.wordpress.com/267/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/carroarmato0.wordpress.com/267/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/carroarmato0.wordpress.com/267/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/carroarmato0.wordpress.com/267/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/carroarmato0.wordpress.com/267/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/carroarmato0.wordpress.com/267/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/carroarmato0.wordpress.com/267/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/carroarmato0.wordpress.com/267/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/carroarmato0.wordpress.com/267/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/carroarmato0.wordpress.com/267/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/carroarmato0.wordpress.com/267/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/carroarmato0.wordpress.com/267/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/carroarmato0.wordpress.com/267/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=carroarmato0.wordpress.com&amp;blog=352485&amp;post=267&amp;subd=carroarmato0&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://carroarmato0.wordpress.com/2010/10/15/fork-cms-cant-load-private-blog/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fae3d0f0ef291595b61f1920dc37f89e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">carroarmato0</media:title>
		</media:content>
	</item>
		<item>
		<title>Automaticaly Add Images in SimpleViewer</title>
		<link>http://carroarmato0.wordpress.com/2010/09/06/automaticaly-add-images-in-simpleviewer/</link>
		<comments>http://carroarmato0.wordpress.com/2010/09/06/automaticaly-add-images-in-simpleviewer/#comments</comments>
		<pubDate>Mon, 06 Sep 2010 21:03:52 +0000</pubDate>
		<dc:creator>carroarmato0</dc:creator>
				<category><![CDATA[WebTech]]></category>

		<guid isPermaLink="false">http://carroarmato0.wordpress.com/?p=262</guid>
		<description><![CDATA[I was looking for a nice Image Browser to show friends my wallpapers collection. I stumbled on simpleviewer, which is Flash based. Unfortunatly, SimpleViewer uses entries within an xml file in order to go grab the images to display. Edit:  apparently I found out that the creators of SimpleViewer already had a way to build the &#8230; <a href="http://carroarmato0.wordpress.com/2010/09/06/automaticaly-add-images-in-simpleviewer/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=carroarmato0.wordpress.com&amp;blog=352485&amp;post=262&amp;subd=carroarmato0&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I was looking for a nice Image Browser to show friends my wallpapers collection. I stumbled on <a title="Simple Viewer" href="http://www.simpleviewer.net/simpleviewer/">simpleviewer</a>, which is Flash based.</p>
<p>Unfortunatly, SimpleViewer uses entries within an xml file in order to go grab the images to display.</p>
<p><span style="color:#ff0000;">Edit:  apparently I found out that the creators of SimpleViewer already had a way to build the gallery.xml file for you </span><a title="http://www.simpleviewer.net/simpleviewer/pro/support/svbuilder.html" href="http://www.simpleviewer.net/simpleviewer/pro/support/svbuilder.html"><span style="color:#ff0000;">here</span></a><span style="color:#ff0000;">. Still I believe my script is a valide alternative way to get your gallery going <img src='http://s2.wp.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </span></p>
<p>I fixed up a nifty php script in 3 days which is able to  scan through your images, create thumbnails for both jpg/jpeg and png images and fill in the gallery.xml file for you.</p>
<p>The script can be downloaded <a title="http://carroarmato0.be/files%2Fprojects%2FSimpleViewerXmlGen%2Fgenxml.zip" href="http://carroarmato0.be/files%2Fprojects%2FSimpleViewerXmlGen%2Fgenxml.zip">here</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/carroarmato0.wordpress.com/262/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/carroarmato0.wordpress.com/262/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/carroarmato0.wordpress.com/262/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/carroarmato0.wordpress.com/262/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/carroarmato0.wordpress.com/262/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/carroarmato0.wordpress.com/262/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/carroarmato0.wordpress.com/262/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/carroarmato0.wordpress.com/262/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/carroarmato0.wordpress.com/262/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/carroarmato0.wordpress.com/262/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/carroarmato0.wordpress.com/262/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/carroarmato0.wordpress.com/262/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/carroarmato0.wordpress.com/262/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/carroarmato0.wordpress.com/262/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=carroarmato0.wordpress.com&amp;blog=352485&amp;post=262&amp;subd=carroarmato0&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://carroarmato0.wordpress.com/2010/09/06/automaticaly-add-images-in-simpleviewer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fae3d0f0ef291595b61f1920dc37f89e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">carroarmato0</media:title>
		</media:content>
	</item>
		<item>
		<title>Use Vlan Tagging on your Linux Server</title>
		<link>http://carroarmato0.wordpress.com/2010/08/28/use-vlan-tagging-on-your-linux-server/</link>
		<comments>http://carroarmato0.wordpress.com/2010/08/28/use-vlan-tagging-on-your-linux-server/#comments</comments>
		<pubDate>Sat, 28 Aug 2010 09:02:29 +0000</pubDate>
		<dc:creator>carroarmato0</dc:creator>
				<category><![CDATA[Linux Tutorial]]></category>

		<guid isPermaLink="false">http://carroarmato0.wordpress.com/?p=257</guid>
		<description><![CDATA[This tutorial was tested on a Ubuntu server, some commands and configuration files may vary. To begin you need to install the following to be able to create and use Vlans on your Ethernet card: sudo apt-get install vlan Next, make sure that the dot1Q data encapsulation has been enabled in the kernel: lsmod &#124; &#8230; <a href="http://carroarmato0.wordpress.com/2010/08/28/use-vlan-tagging-on-your-linux-server/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=carroarmato0.wordpress.com&amp;blog=352485&amp;post=257&amp;subd=carroarmato0&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This tutorial was tested on a Ubuntu server, some commands and configuration files may vary.</p>
<p>To begin you need to install the following to be able to create and use Vlans on your Ethernet card:</p>
<blockquote><p><strong><em>sudo apt-get install vlan</em></strong></p></blockquote>
<p>Next, make sure that the <strong>dot1Q </strong>data encapsulation has been enabled in the kernel:</p>
<blockquote><p><em><strong>lsmod | grep 8021q</strong> &#8211;&gt; &#8217;8021q&#8217;</em></p></blockquote>
<p>If you don&#8217;t see  &#8217;<strong>8021q</strong>&#8216; <strong> </strong>you need to enable it:</p>
<blockquote><p><strong><em>sudo modprobe 8021q</em></strong></p></blockquote>
<p>At this point, the module should be loaded, however, it won&#8217;t be enabled again after a reboot. To ensure that the module will always be loaded after reboots, you need to add it to the module loading list:</p>
<blockquote><p><em><strong>sudo sh -c &#8216;grep -q 8021q /etc/modules || echo 8021q &gt;&gt; /etc/modules&#8217;</strong></em></p></blockquote>
<p>Now you are able to add Vlans and configure them. You can create Vlans in the following way:</p>
<blockquote><p><em><strong>sudo vconfig add eth0 99</strong></em></p></blockquote>
<p>This will create Vlan99 and bind it with your eth0  Ethernet card.</p>
<p>To assign an address to it, you use the same commands to configure a network card except for 1 small detail:</p>
<blockquote><p><em><strong>sudo ifconfig eth0.99 192.168.99.1 netmask 255.255.255.0</strong></em></p></blockquote>
<p>Notice the fact that we added the  <strong>.99 </strong>to  our  ethernet card device:  ethO.99  to  assign the address to our Vlan instead of our ethernet card.</p>
<p>Your Vlan99 will be active when your ethernet card itself will be active, obviously.</p>
<p>However note that, just like the enabling of the 8021q module, your Vlan configuration isn&#8217;t permanent yet.</p>
<p>To make it permanent, you need to add the configuration to <em><strong>/etc/network/interfaces</strong></em></p>
<blockquote><p><em><strong>sudo nano <em>/etc/network/interfaces</em></strong></em></p>
<p><em><strong><em></em></strong></em><strong><em>auto eth0.99</em></strong></p>
<p><strong><em></em></strong><strong><em>iface eth0.99 inet static</em></strong></p>
<p><strong><em>address 192.168.99.1</em></strong></p>
<p><strong><em>netmask 255.255.255.0</em></strong></p>
<p><strong><em>vlan-raw-device eth0</em></strong></p></blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/carroarmato0.wordpress.com/257/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/carroarmato0.wordpress.com/257/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/carroarmato0.wordpress.com/257/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/carroarmato0.wordpress.com/257/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/carroarmato0.wordpress.com/257/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/carroarmato0.wordpress.com/257/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/carroarmato0.wordpress.com/257/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/carroarmato0.wordpress.com/257/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/carroarmato0.wordpress.com/257/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/carroarmato0.wordpress.com/257/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/carroarmato0.wordpress.com/257/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/carroarmato0.wordpress.com/257/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/carroarmato0.wordpress.com/257/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/carroarmato0.wordpress.com/257/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=carroarmato0.wordpress.com&amp;blog=352485&amp;post=257&amp;subd=carroarmato0&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://carroarmato0.wordpress.com/2010/08/28/use-vlan-tagging-on-your-linux-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fae3d0f0ef291595b61f1920dc37f89e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">carroarmato0</media:title>
		</media:content>
	</item>
		<item>
		<title>AS3: Positioning and Size problems in Sprites and MovieClips</title>
		<link>http://carroarmato0.wordpress.com/2010/08/26/as3-positioning-and-size-problems-in-sprites-and-movieclips/</link>
		<comments>http://carroarmato0.wordpress.com/2010/08/26/as3-positioning-and-size-problems-in-sprites-and-movieclips/#comments</comments>
		<pubDate>Thu, 26 Aug 2010 09:59:44 +0000</pubDate>
		<dc:creator>carroarmato0</dc:creator>
				<category><![CDATA[Webanimation]]></category>

		<guid isPermaLink="false">http://carroarmato0.wordpress.com/?p=252</guid>
		<description><![CDATA[Struggling with your Sprites or MovieClips which don&#8217;t seem to be placed in the right spot or be of the right size? Don&#8217;t worry, if there&#8217;s something I&#8217;ve learned from Flash, it&#8217;s to distrust Flash&#8217;s own positioning and size properties. Instead, use your own getters and setters and get your piece of mind. import flash.display.Sprite; public &#8230; <a href="http://carroarmato0.wordpress.com/2010/08/26/as3-positioning-and-size-problems-in-sprites-and-movieclips/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=carroarmato0.wordpress.com&amp;blog=352485&amp;post=252&amp;subd=carroarmato0&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Struggling with your Sprites or MovieClips which don&#8217;t seem to be placed in the right spot or be of the right size?</p>
<p>Don&#8217;t worry, if there&#8217;s something I&#8217;ve learned from Flash, it&#8217;s to <strong>distrust Flash&#8217;s own positioning and size properties</strong>.</p>
<p>Instead, <strong>use your own getters and setters</strong> and get your piece of mind.</p>
<blockquote><p>import flash.display.Sprite;</p>
<p>public class MyCoolObject : Sprite {</p>
<p style="padding-left:30px;">private var posX:int;</p>
<p style="padding-left:30px;">private var posY:int;</p>
<p style="padding-left:30px;">private var posZ:int;</p>
<p style="padding-left:30px;">private var sHeight:int;</p>
<p style="padding-left:30px;">private var sWidth:int;</p>
<p style="padding-left:30px;">
<p style="padding-left:30px;">public function MyCoolObject() {</p>
<p style="padding-left:30px;">}</p>
<p style="padding-left:30px;">/* Getters and Setters */</p>
<p style="padding-left:30px;">public function set X(val:int) {  this.posX = val; }</p>
<p style="padding-left:30px;">public function get X():int { return this.posX; }</p>
<p style="padding-left:30px;">public function set Y(val:int) {  this.posY = val; }</p>
<p style="padding-left:30px;">public function get Y():int { return this.posY; }</p>
<p style="padding-left:30px;">public function set Z(val:int) {  this.posZ = val; }</p>
<p style="padding-left:30px;">public function get Z():int { return this.posZ; }</p>
<p style="padding-left:30px;">public function set Height(val:int) {  this.sHeight = val; }</p>
<p style="padding-left:30px;">public function get Height():int { return this.sHeight; }</p>
<p style="padding-left:30px;">public function set Width(val:int) {  this.sWidth = val; }</p>
<p style="padding-left:30px;">public function get Width():int { return this.sWidth; }</p>
<p>}</p></blockquote>
<p>It&#8217;s a bit of overhead, but trust me, you&#8217;ll thank me later&#8230;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/carroarmato0.wordpress.com/252/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/carroarmato0.wordpress.com/252/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/carroarmato0.wordpress.com/252/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/carroarmato0.wordpress.com/252/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/carroarmato0.wordpress.com/252/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/carroarmato0.wordpress.com/252/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/carroarmato0.wordpress.com/252/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/carroarmato0.wordpress.com/252/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/carroarmato0.wordpress.com/252/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/carroarmato0.wordpress.com/252/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/carroarmato0.wordpress.com/252/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/carroarmato0.wordpress.com/252/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/carroarmato0.wordpress.com/252/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/carroarmato0.wordpress.com/252/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=carroarmato0.wordpress.com&amp;blog=352485&amp;post=252&amp;subd=carroarmato0&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://carroarmato0.wordpress.com/2010/08/26/as3-positioning-and-size-problems-in-sprites-and-movieclips/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fae3d0f0ef291595b61f1920dc37f89e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">carroarmato0</media:title>
		</media:content>
	</item>
		<item>
		<title>AS3: XML, the easy way</title>
		<link>http://carroarmato0.wordpress.com/2010/08/22/as3-xml-the-easy-way/</link>
		<comments>http://carroarmato0.wordpress.com/2010/08/22/as3-xml-the-easy-way/#comments</comments>
		<pubDate>Sun, 22 Aug 2010 19:44:41 +0000</pubDate>
		<dc:creator>carroarmato0</dc:creator>
				<category><![CDATA[Webanimation]]></category>

		<guid isPermaLink="false">http://carroarmato0.wordpress.com/?p=242</guid>
		<description><![CDATA[Haven&#8217;t been able to find a tutorial on how to make XML objects that would be worth writing about in a &#8220;XML for Dummies™&#8221; book. So hopefully after this you&#8217;ll be able to writting XML strings like crazy XML is already part of Flash globaly, so you don&#8217;t need to import it. To make this &#8230; <a href="http://carroarmato0.wordpress.com/2010/08/22/as3-xml-the-easy-way/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=carroarmato0.wordpress.com&amp;blog=352485&amp;post=242&amp;subd=carroarmato0&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Haven&#8217;t been able to find a tutorial on how to make XML objects that would be worth writing about in a &#8220;XML for Dummies™&#8221; book.</p>
<p>So hopefully after this you&#8217;ll be able to writting XML strings like crazy <img src='http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>XML is already part of Flash globaly, so you <strong>don&#8217;t need to import it</strong>.</p>
<p>To make this easier to understand, I&#8217;ll use a<strong> ComicBook</strong> as an example since I&#8217;m currently working on that project which requires the usage of XML objects.</p>
<p>In my project a ComicBook consists of the following:</p>
<ul>
<li><strong>Comic </strong> Object</li>
<li>Comic object contains an <strong>Array of Pages</strong></li>
<li>A <strong>Page </strong>object contains an<strong> Array of PageObjects</strong> (Sprites&#8230; MovieClips&#8230; etc&#8230;.)</li>
</ul>
<p><a href="http://carroarmato0.files.wordpress.com/2010/08/comicstruct.jpg"><img class="aligncenter size-medium wp-image-243" title="ComicStruct" src="http://carroarmato0.files.wordpress.com/2010/08/comicstruct.jpg?w=300&#038;h=205" alt="" width="300" height="205" /></a>Now as you could assume, all these objects are nested inside our Comic object. Using nested for-loops, you can access all the information and perform different sorts of operations.</p>
<p>Comic will therefor, be our main Node. A Parent of sorts.</p>
<p>We create our first XML object tag:</p>
<blockquote><p><strong>var comicNode:XML = new XML(&#8220;&lt;Comic/&gt;&#8221;);</strong></p></blockquote>
<p>People who know a little bit of XML and/or some knowledge about xHTML, will recognize <strong>&lt;Comic/&gt; </strong>as being a <strong>closing tag</strong>.</p>
<p>Infact, when we try to view the resulting string, we get this:</p>
<blockquote><p><strong>trace( comicNode.toXMLString() );</strong> // &#8211;&gt;  &lt;Comic/&gt;</p></blockquote>
<p>This is perfectly normal and you shouldn&#8217;t worry yet that the output isn&#8217;t  like  <strong>&lt;Comic&gt;&lt;Comic/&gt;</strong></p>
<p>Later when you&#8217;ll be adding elements to the Comic Node, you&#8217;ll see that Flash will automatically adapt the XML structure to what you&#8217;re feeding it.</p>
<p>A really nice thing is that you can dynamically add properties to your nodes, like giving it an ID, or a Name.</p>
<p>For example, every Comic book I generate needs to have a name. I can do so like this:</p>
<blockquote><p><strong>comicNode.@name = comic.Name; </strong>// &#8211;&gt;  &lt;Comic name=&#8221;TheNameOfMyComic&#8221; /&gt;</p></blockquote>
<p>As you can see, using  <strong>node.@ </strong>we can generate any attribute name we want! <strong>comic.Name </strong>happens to be a String variable in the field of my  Comic class where I store the name of it.</p>
<p>Now for the real work! Adding different Nodes to our Parent Node.</p>
<p>Because Comic  contains an Array of Pages, we need to create a For-Loop which runs through all the objects within our Array. <strong>The creation of our PageNode, is exactly the same as our ParentNode</strong>.</p>
<blockquote>
<div id="_mcePaste"><strong>for (var index:Number = 0; index &lt; comic.Length; index++) {</strong></div>
<div id="_mcePaste" style="padding-left:30px;"><strong>var pageNode:XML = new XML(&#8220;&lt;Page/&gt;&#8221;);</strong> // &#8211;&gt;  &lt;Page/&gt;</div>
<div id="_mcePaste" style="padding-left:30px;"><strong>pageNode.@id = index;</strong> //  &#8211;&gt;  &lt;Page id=&#8221;0&#8243; /&gt;</div>
<div style="padding-left:30px;">&#8230;&#8230;</div>
</blockquote>
<div>comic.Length is simply the length of my Page Array.</div>
<div>Now! We add our PageNode to our ComicNode!</div>
<div>
<blockquote>
<div style="padding-left:30px;"><strong>comicNode.appendChild(pageNode);</strong><span style="white-space:pre;"> </span> //  &#8211;&gt;  &lt;Comic name=&#8221;theNameOfTheComic&#8221;&gt;</div>
<div><span style="white-space:pre;"> </span> //   &#8211;&gt;         &lt;Page id=&#8221;0&#8243;/&gt;</div>
<div><span style="white-space:pre;"> </span> //   &#8211;&gt;  &lt;Comic/&gt;</div>
</blockquote>
<div>If you understand all this, then you&#8217;ve done it!  You should now be able to easily make your own XML structures <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </div>
</div>
<div>Here&#8217;s a complete excerpt of my code so you get the general picture:</div>
<blockquote>
<div>//Create XML</div>
<div>
<div>comicNode = new XML(&#8220;&lt;Comic/&gt;&#8221;); // &lt;Comic/&gt;</div>
<div>comicNode.@name = comic.Name;    //Adding attibute -&gt; &lt;Comic name=&#8221;theNameOfTheComic&#8221;/&gt;</div>
<div>//Add the Page objects</div>
<div style="padding-left:30px;">for (var index:Number = 0; index &lt; comic.Length; index++) {</div>
<div style="padding-left:60px;">var page:XML = new XML(&#8220;&lt;Page/&gt;&#8221;); // &lt;Page/&gt;</div>
<div style="padding-left:60px;">page.@id = index;<span style="white-space:pre;"> </span> // &lt;Page id=&#8221;0&#8243;/&gt;</div>
<div style="padding-left:60px;">comicNode.appendChild(page);<span style="white-space:pre;"> </span> //&lt;Comic name=&#8221;theNameOfTheComic&#8221;&gt;</div>
<div><span style="white-space:pre;"> </span> //   &lt;Page id=&#8221;0&#8243;/&gt;</div>
<div><span style="white-space:pre;"> </span> //&lt;Comic/&gt;</div>
<div style="padding-left:60px;">//Add the PageObjects</div>
<div style="padding-left:60px;">for (var index2:Number = 0; index2 &lt; comic.getPageByIndex(index).Length; index2++) {</div>
<div style="padding-left:90px;">var pageObjNode:XML = new XML(&#8220;&lt;PageObject/&gt;&#8221;);</div>
<div style="padding-left:90px;">var pageObj:PageObject = PageObject(comic.getPageByIndex(index).getChildAt(index2));</div>
<div style="padding-left:90px;">pageObjNode.@id = pageObj.name;</div>
<div style="padding-left:90px;">if (pageObj.movieClip.inputField != null) pageObjNode.@input = pageObj.movieClip.inputField.text;</div>
<div style="padding-left:90px;">pageObjNode.@type = pageObj.Type;</div>
<div style="padding-left:90px;">pageObjNode.@posX = pageObj.x;</div>
<div style="padding-left:90px;">pageObjNode.@posY = pageObj.y;</div>
<div style="padding-left:90px;">pageObjNode.@posZ = pageObj.z;</div>
<div style="padding-left:60px;"><span style="white-space:pre;"> </span> pageObjNode.@Width = pageObj.width;</div>
<div style="padding-left:90px;">pageObjNode.@Height = pageObj.height;</div>
<div><span style="white-space:pre;"> </span></div>
<div style="padding-left:90px;">page.appendChild(pageObjNode);</div>
<div style="padding-left:60px;">}</div>
<div style="padding-left:30px;">}</div>
</div>
</blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/carroarmato0.wordpress.com/242/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/carroarmato0.wordpress.com/242/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/carroarmato0.wordpress.com/242/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/carroarmato0.wordpress.com/242/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/carroarmato0.wordpress.com/242/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/carroarmato0.wordpress.com/242/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/carroarmato0.wordpress.com/242/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/carroarmato0.wordpress.com/242/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/carroarmato0.wordpress.com/242/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/carroarmato0.wordpress.com/242/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/carroarmato0.wordpress.com/242/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/carroarmato0.wordpress.com/242/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/carroarmato0.wordpress.com/242/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/carroarmato0.wordpress.com/242/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=carroarmato0.wordpress.com&amp;blog=352485&amp;post=242&amp;subd=carroarmato0&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://carroarmato0.wordpress.com/2010/08/22/as3-xml-the-easy-way/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fae3d0f0ef291595b61f1920dc37f89e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">carroarmato0</media:title>
		</media:content>

		<media:content url="http://carroarmato0.files.wordpress.com/2010/08/comicstruct.jpg?w=300" medium="image">
			<media:title type="html">ComicStruct</media:title>
		</media:content>
	</item>
		<item>
		<title>AS3: Default parameter value</title>
		<link>http://carroarmato0.wordpress.com/2010/08/19/actionscript-3-default-parameter-value/</link>
		<comments>http://carroarmato0.wordpress.com/2010/08/19/actionscript-3-default-parameter-value/#comments</comments>
		<pubDate>Thu, 19 Aug 2010 21:55:24 +0000</pubDate>
		<dc:creator>carroarmato0</dc:creator>
				<category><![CDATA[Webanimation]]></category>

		<guid isPermaLink="false">http://carroarmato0.wordpress.com/?p=237</guid>
		<description><![CDATA[In ActionScript 3 it&#8217;s possible to automatically assign a default value to parameters in a function. Parameters with optional value should be placed at the end of the function parameter list, while all the required ones at the begining. Parameters with default values can be ommitted. This gives us the following possibilities: function twoPlusTwoIs (result:int &#8230; <a href="http://carroarmato0.wordpress.com/2010/08/19/actionscript-3-default-parameter-value/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=carroarmato0.wordpress.com&amp;blog=352485&amp;post=237&amp;subd=carroarmato0&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In ActionScript 3 it&#8217;s possible to automatically assign a default value to parameters in a function.</p>
<p>Parameters with optional value should be placed at the end of the function parameter list, while all the required ones at the begining.</p>
<p>Parameters with default values can be ommitted. This gives us the following possibilities:</p>
<blockquote><p>function twoPlusTwoIs (result:int = 2) {</p>
<p style="padding-left:30px;">trace( &#8220;Result: &#8221; + result );</p>
<p>}</p>
<p>twoPlusTwoIs();    &#8212;&gt;  2</p>
<p>twoPlusTwoIs(3);  &#8212;&gt;  3</p></blockquote>
<p>Likewise, a more plausable usage:</p>
<blockquote><p>function enable ( val:Boolean = true ) {</p>
<p style="padding-left:30px;">someVariable = val;</p>
<p>}</p>
<p>MyFancyObject.enable();           &#8212;&gt;  true</p>
<p>MyFancyObject.enable(true);     &#8212;&gt; true</p>
<p>MyFancyObject.enable(false);     &#8212;&gt; false</p></blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/carroarmato0.wordpress.com/237/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/carroarmato0.wordpress.com/237/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/carroarmato0.wordpress.com/237/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/carroarmato0.wordpress.com/237/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/carroarmato0.wordpress.com/237/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/carroarmato0.wordpress.com/237/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/carroarmato0.wordpress.com/237/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/carroarmato0.wordpress.com/237/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/carroarmato0.wordpress.com/237/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/carroarmato0.wordpress.com/237/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/carroarmato0.wordpress.com/237/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/carroarmato0.wordpress.com/237/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/carroarmato0.wordpress.com/237/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/carroarmato0.wordpress.com/237/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=carroarmato0.wordpress.com&amp;blog=352485&amp;post=237&amp;subd=carroarmato0&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://carroarmato0.wordpress.com/2010/08/19/actionscript-3-default-parameter-value/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fae3d0f0ef291595b61f1920dc37f89e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">carroarmato0</media:title>
		</media:content>
	</item>
		<item>
		<title>VirtualBox tip when running Ubuntu Alpha/Beta releases</title>
		<link>http://carroarmato0.wordpress.com/2010/08/04/virtualbox-tip-when-running-ubuntu-alphabeta-releases/</link>
		<comments>http://carroarmato0.wordpress.com/2010/08/04/virtualbox-tip-when-running-ubuntu-alphabeta-releases/#comments</comments>
		<pubDate>Wed, 04 Aug 2010 10:53:59 +0000</pubDate>
		<dc:creator>carroarmato0</dc:creator>
				<category><![CDATA[GNU/Linux News]]></category>

		<guid isPermaLink="false">http://carroarmato0.wordpress.com/?p=232</guid>
		<description><![CDATA[If you are like me and want to keep up to date with the latest development versions of Ubuntu in a virtual machine in VirtualBox, and would like to have the Integration drivers installed and updated even during kernel updates, there is a simple trick. They also suggest that on the webpage of Virtual Box &#8230; <a href="http://carroarmato0.wordpress.com/2010/08/04/virtualbox-tip-when-running-ubuntu-alphabeta-releases/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=carroarmato0.wordpress.com&amp;blog=352485&amp;post=232&amp;subd=carroarmato0&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you are like me and want to keep up to date with the latest development versions of Ubuntu in a virtual machine in VirtualBox, and would like to have the Integration drivers installed and updated even during kernel updates, there is a simple trick.</p>
<p>They also suggest that on the webpage of Virtual Box itself, but anyway here it goes:</p>
<p>Install <strong><span style="color:#ff9900;">dkms</span></strong>, which is a framework responsible for rebuilding modules when you are using a new kernel.</p>
<blockquote><p>sudo apt-get install dkms</p></blockquote>
<p>Now every time there is a new kernel update, you won&#8217;t have to reinstall the Integration drivers for Virtual Box.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/carroarmato0.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/carroarmato0.wordpress.com/232/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/carroarmato0.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/carroarmato0.wordpress.com/232/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/carroarmato0.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/carroarmato0.wordpress.com/232/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/carroarmato0.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/carroarmato0.wordpress.com/232/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/carroarmato0.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/carroarmato0.wordpress.com/232/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/carroarmato0.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/carroarmato0.wordpress.com/232/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/carroarmato0.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/carroarmato0.wordpress.com/232/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=carroarmato0.wordpress.com&amp;blog=352485&amp;post=232&amp;subd=carroarmato0&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://carroarmato0.wordpress.com/2010/08/04/virtualbox-tip-when-running-ubuntu-alphabeta-releases/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fae3d0f0ef291595b61f1920dc37f89e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">carroarmato0</media:title>
		</media:content>
	</item>
		<item>
		<title>AS3: How to use Flash Cookies</title>
		<link>http://carroarmato0.wordpress.com/2010/08/02/as3-how-to-use-flash-cookies/</link>
		<comments>http://carroarmato0.wordpress.com/2010/08/02/as3-how-to-use-flash-cookies/#comments</comments>
		<pubDate>Mon, 02 Aug 2010 14:19:43 +0000</pubDate>
		<dc:creator>carroarmato0</dc:creator>
				<category><![CDATA[Webanimation]]></category>

		<guid isPermaLink="false">http://carroarmato0.wordpress.com/?p=228</guid>
		<description><![CDATA[At some point, you would like to store some data on the client side, say for example, to know if it&#8217;s the first time a user is accessing your Flash application/animation, and show him/her different content based on the data. Just like a Web Cookie, Flash Cookies can be used. The best or evil part &#8230; <a href="http://carroarmato0.wordpress.com/2010/08/02/as3-how-to-use-flash-cookies/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=carroarmato0.wordpress.com&amp;blog=352485&amp;post=228&amp;subd=carroarmato0&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>At some point, you would like to store some data on the client side, say for example, to know if it&#8217;s the first time a user is accessing your Flash application/animation, and show him/her different content based on the data.</p>
<p>Just like a Web Cookie, Flash Cookies can be used. The best or evil part of it, is that Flash cookies are harder to remove. In fact, they don&#8217;t go away even if the client clears all his browser cookies. That&#8217;s because it&#8217;s the Flash Player that manages those cookies obviously.</p>
<p>Making these cookies is super easy:</p>
<ol>
<li>add the import:   <strong><em><span style="color:#ff9900;">import flash.net.SharedObject;</span></em></strong></li>
<li>create your cookie object (SharedObject):    <strong><em><span style="color:#ff9900;">var cookie:SharedObject = SharedObject.getLocal(&#8220;myFlashCookie&#8221;);</span></em></strong></li>
</ol>
<p>The handy thing about it, is that you can add any kind of info in it (Note that the amount of data that you can store is limited to the size that the user has chosen in the configuration of his Flash Player, normally that&#8217;s 100Kb).</p>
<p>Here are some handy things to know:</p>
<ul>
<li><strong><span style="color:#ff9900;">cookie.size</span> </strong>:  See if our cookie contains anything ( 0 means we have a fresh cookie&#8230; mmmh fresh cookie&#8230;. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  )</li>
<li><strong><span style="color:#ff9900;">cookie.data</span></strong> :  Array containing any object that we want (please not the size limitation described above)</li>
<li><strong><span style="color:#ff9900;">cookie.data.VariableName = object</span> </strong>:  we can add any variable name to .data.</li>
<li><strong><span style="color:#ff9900;">cookie.data.VariableName</span> </strong>:  if  VariableName exists, it will return the object it is containing</li>
<li><strong><span style="color:#ff9900;">cookie.flush()</span> </strong>:  save our cookie immediately to a file (otherwise, our cookie only exists in memory during the length of the session and not being stored on the clients machine)</li>
<li><strong><span style="color:#ff9900;">cookie.clear()</span> </strong>:  deletes/clears the cookie (  :(  )</li>
</ul>
<p>Another useful thing to know is that you can call the cookie remotely.</p>
<p>Here&#8217;s a live example that I use,  I want to show the user a tutorial on how to use my application. The tutorial will only be show when the cookie is empty.</p>
<blockquote><p><span style="white-space:pre;"> </span>import flash.net.SharedObject;</p>
<p><span style="white-space:pre;"> </span>public class ComicGenerator extends MovieClip {<span style="white-space:pre;"> </span></p>
<p><span style="white-space:pre;"> </span>//Our Flash Cookie</p>
<p><span style="white-space:pre;"> </span>var cookie:SharedObject = SharedObject.getLocal(&#8220;ComicBookGenerator&#8221;);</p>
<p><span style="white-space:pre;"> </span>var forceTutorial:Boolean = false;</p>
<p><span style="white-space:pre;"> </span></p>
<p><span style="white-space:pre;"> </span>//Constructor</p>
<p><span style="white-space:pre;"> </span>public function ComicGenerator() {</p>
<p><span style="white-space:pre;"> </span>super();</p>
<p><span style="white-space:pre;"> </span>initialiseStage();</p>
<p><span style="white-space:pre;"> </span></p>
<p><span style="white-space:pre;"> </span>//Force Cookie Deletion</p>
<p><span style="white-space:pre;"> </span>if (forceTutorial) cookie.clear();</p>
<p><span style="white-space:pre;"> </span></p>
<p><span style="white-space:pre;"> </span>//Is this the first time the user sees our app?</p>
<p><span style="white-space:pre;"> </span>if (cookie.size == 0) {</p>
<p><span style="white-space:pre;"> </span>showTutorial();</p>
<p><span style="white-space:pre;"> </span>cookie.data.FirstTime = true;</p>
<p><span style="white-space:pre;"> </span>}</p>
<p><span style="white-space:pre;"> </span>else {</p>
<p><span style="white-space:pre;"> </span>showOperatingMode();</p>
<p><span style="white-space:pre;"> </span>}</p>
<p><span style="white-space:pre;"> </span>}</p>
<p>&#8230;</p></blockquote>
<p>For more information, you can go take a look at the API documentation: <a href="http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/net/SharedObject.html">http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/net/SharedObject.html</a></p>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:233px;width:1px;height:1px;"><span style="font-family:'lucida grande', tahoma, verdana, arial, sans-serif;line-height:normal;color:#333333;"><a style="cursor:pointer;color:#3b5998;text-decoration:none;" rel="nofollow" href="http://eduserv.kahosl.be/~cvanlancker/" target="_blank">http://eduserv.kahosl.be/~cvanlancker/</a></span><span style="font-family:'lucida grande', tahoma, verdana, arial, sans-serif;line-height:normal;color:#333333;">@work/Design/Src/</span></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/carroarmato0.wordpress.com/228/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/carroarmato0.wordpress.com/228/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/carroarmato0.wordpress.com/228/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/carroarmato0.wordpress.com/228/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/carroarmato0.wordpress.com/228/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/carroarmato0.wordpress.com/228/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/carroarmato0.wordpress.com/228/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/carroarmato0.wordpress.com/228/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/carroarmato0.wordpress.com/228/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/carroarmato0.wordpress.com/228/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/carroarmato0.wordpress.com/228/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/carroarmato0.wordpress.com/228/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/carroarmato0.wordpress.com/228/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/carroarmato0.wordpress.com/228/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=carroarmato0.wordpress.com&amp;blog=352485&amp;post=228&amp;subd=carroarmato0&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://carroarmato0.wordpress.com/2010/08/02/as3-how-to-use-flash-cookies/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fae3d0f0ef291595b61f1920dc37f89e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">carroarmato0</media:title>
		</media:content>
	</item>
		<item>
		<title>AS3: How to add a tiled background</title>
		<link>http://carroarmato0.wordpress.com/2010/08/02/as3-how-to-add-a-tiled-background/</link>
		<comments>http://carroarmato0.wordpress.com/2010/08/02/as3-how-to-add-a-tiled-background/#comments</comments>
		<pubDate>Mon, 02 Aug 2010 13:05:49 +0000</pubDate>
		<dc:creator>carroarmato0</dc:creator>
				<category><![CDATA[Webanimation]]></category>

		<guid isPermaLink="false">http://carroarmato0.wordpress.com/?p=224</guid>
		<description><![CDATA[Drag &#38; Drop the image you want to tile on the stage Go to the Library, you&#8217;ll see that a Bitmap has been added, change the properties of it Activate the Advanced options if it isn&#8217;t shown Select both options in Linkage, and write a Class Name,  for example &#8220;Background&#8221; From now on,  you&#8217;ll access &#8230; <a href="http://carroarmato0.wordpress.com/2010/08/02/as3-how-to-add-a-tiled-background/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=carroarmato0.wordpress.com&amp;blog=352485&amp;post=224&amp;subd=carroarmato0&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<ol>
<li>Drag &amp; Drop the image you want to tile on the stage</li>
<li>Go to the Library, you&#8217;ll see that a Bitmap has been added, change the properties of it</li>
<li>Activate the Advanced options if it isn&#8217;t shown</li>
<li>Select both options in Linkage, and write a Class Name,  for example &#8220;Background&#8221;</li>
</ol>
<p>From now on,  you&#8217;ll access your image as if it were a Class.</p>
<p>You can now make your image and tile it like so:</p>
<blockquote>
<div id="_mcePaste">var backGroundSprite:Sprite = new Sprite();</div>
<div id="_mcePaste">//Background Class is actually the linkage to background.jpg in de Library</div>
<div id="_mcePaste">backGroundSprite.graphics.beginBitmapFill(new Background(0, 0));</div>
<div id="_mcePaste">backGroundSprite.graphics.drawRect(0, 0, stage.stageWidth, stage.stageHeight);</div>
<div id="_mcePaste">backGroundSprite.graphics.endFill();</div>
<div id="_mcePaste">//Add and display on stage</div>
<div id="_mcePaste">addChild(backGroundSprite);</div>
</blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/carroarmato0.wordpress.com/224/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/carroarmato0.wordpress.com/224/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/carroarmato0.wordpress.com/224/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/carroarmato0.wordpress.com/224/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/carroarmato0.wordpress.com/224/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/carroarmato0.wordpress.com/224/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/carroarmato0.wordpress.com/224/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/carroarmato0.wordpress.com/224/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/carroarmato0.wordpress.com/224/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/carroarmato0.wordpress.com/224/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/carroarmato0.wordpress.com/224/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/carroarmato0.wordpress.com/224/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/carroarmato0.wordpress.com/224/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/carroarmato0.wordpress.com/224/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=carroarmato0.wordpress.com&amp;blog=352485&amp;post=224&amp;subd=carroarmato0&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://carroarmato0.wordpress.com/2010/08/02/as3-how-to-add-a-tiled-background/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fae3d0f0ef291595b61f1920dc37f89e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">carroarmato0</media:title>
		</media:content>
	</item>
	</channel>
</rss>
