<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>art,website and SEO &#187; source code</title>
	<atom:link href="http://artfantasy.revivalx.com/category/source-code/feed/" rel="self" type="application/rss+xml" />
	<link>http://artfantasy.revivalx.com</link>
	<description></description>
	<lastBuildDate>Tue, 29 Dec 2009 22:21:34 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>[PHP] navigation</title>
		<link>http://artfantasy.revivalx.com/2009/12/05/php-navigation/</link>
		<comments>http://artfantasy.revivalx.com/2009/12/05/php-navigation/#comments</comments>
		<pubDate>Sun, 06 Dec 2009 00:24:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[source code]]></category>

		<guid isPermaLink="false">http://artfantasy.revivalx.com/?p=442</guid>
		<description><![CDATA[This basically does what the 1st one does but with more strings and a different seperator rather than &#8216;&#38;&#8217;. I don&#8217;t really want to go into too much detail on the thread so if people are confused or need explaining, reply or PM me.
That&#8217;s it for the navigation as I am not going to do [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">This basically does what the 1st one does but with more strings and a different seperator rather than &#8216;&amp;&#8217;. I don&#8217;t really want to go into too much detail on the thread so if people are confused or need explaining, reply or PM me.</p>
<p>That&#8217;s it for the navigation as I am not going to do the other due to they&#8217;re everywhere else and I wanted to be different and show everyone this method.</p>
<p style="text-align: justify;"><span id="more-442"></span><br />
&lt;?php<br />
if($_SERVER['QUERY_STRING'] == &#8220;SoD&#8221;)<br />
print &#8220;owns you!&#8221;;<br />
else<br />
print &#8220;don&#8217;t front!&#8221;;<br />
?&gt;</p>
<p>Description: Instead of calling files like ( index.php?str=blah ) , you could do ( index.php?SoD ) and it would print out &#8220;owns you!&#8221;. You can add more strings in there, this is just an example.</p>
<p>$vars = explode(&#8220;,&#8221;, urldecode(getenv(&#8216;QUERY_STRING&#8217;)));<br />
$v1 = array_shift($vars);<br />
$v2 = array_shift($vars);<br />
$v3 = array_shift($vars);</p>
<p>switch ($v1) {<br />
case &#8216;first.1&#8242;: {<br />
print(&#8220;This is v1, first string case &#8216;file.php?first.1&#8242;.&#8221;);<br />
break;<br />
}<br />
case &#8216;first.2&#8242;: {<br />
switch ($v2) {<br />
case &#8217;second&#8217;: {<br />
switch($v3) {<br />
case &#8216;third&#8217;: {<br />
print(&#8220;This is v3, the last case &#8216;file.php?first.2,second,third&#8217;.&#8221;);<br />
break;<br />
}<br />
}<br />
}<br />
}<br />
}<br />
}</p>
<p style="text-align: justify;"><img class="aligncenter size-full wp-image-443" title="Learning PHP, MySQL, and JavaScript" src="http://artfantasy.revivalx.com/wp-content/uploads/2009/12/Learning-PHP-MySQL-and-JavaScript.jpg" alt="Learning PHP, MySQL, and JavaScript" width="122" height="160" /></p>
<p><a href="http://www.amazon.com/gp/product/0596157134?ie=UTF8&amp;tag=revivproje-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0596157134">Learning PHP, MySQL, and JavaScript: A Step-By-Step Guide to Creating Dynamic Websites (Animal Guide)</a><img style="border:none !important; margin:0px !important;" src="http://www.assoc-amazon.com/e/ir?t=revivproje-20&amp;l=as2&amp;o=1&amp;a=0596157134" border="0" alt="" width="1" height="1" /></p>
]]></content:encoded>
			<wfw:commentRss>http://artfantasy.revivalx.com/2009/12/05/php-navigation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Javascript variables part 1</title>
		<link>http://artfantasy.revivalx.com/2009/11/14/javascript-variables-part-1/</link>
		<comments>http://artfantasy.revivalx.com/2009/11/14/javascript-variables-part-1/#comments</comments>
		<pubDate>Sat, 14 Nov 2009 20:11:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[source code]]></category>

		<guid isPermaLink="false">http://artfantasy.revivalx.com/?p=370</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="385" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/OPpgnzg-0iQ&amp;hl=en_US&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="480" height="385" src="http://www.youtube.com/v/OPpgnzg-0iQ&amp;hl=en_US&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://artfantasy.revivalx.com/2009/11/14/javascript-variables-part-1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Pro Flash Techniques(part3)</title>
		<link>http://artfantasy.revivalx.com/2009/11/10/pro-flash-techniquespart3/</link>
		<comments>http://artfantasy.revivalx.com/2009/11/10/pro-flash-techniquespart3/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 18:32:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[source code]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[font]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://artfantasy.revivalx.com/?p=355</guid>
		<description><![CDATA[Improving perceived load performance
A problem that effects Flash to this day is load performance . Most times, an HTML page and it’s content is downloaded and displayed before a Flash piece has finished downloading, leaving a blank white space in your page. The following techniques “fakes” the initial frame of a Flash piece with a [...]]]></description>
			<content:encoded><![CDATA[<h3 style="text-align: justify;">Improving perceived load performance</h3>
<p style="text-align: justify;">A problem that effects <strong>Flash </strong>to this day is load performance . Most times, an <strong>HTML </strong>page and it’s content is downloaded and displayed before a <strong>Flash </strong>piece has finished downloading, leaving a blank white space in your page. The following techniques “fakes” the initial frame of a <strong>Flash </strong>piece with a bit <strong>HTML/CSS</strong> . The actual <strong>Flash </strong>piece is hidden outside of the web <strong>browser</strong>’s viewport while downloading its assets. When ready for display, the <strong>Flash </strong>piece can call a bit of <strong>JavaScript</strong>, using <strong>Flash Player</strong>’s <strong>External Interface </strong>to display  the piece. We use this technique to improve perceived performance when loading our <strong>Flash </strong>media pod at <a href="www.kontain.com">www.kontain.com</a><span id="more-355"></span></p>
<p style="text-align: justify;">Resources:</p>
<p style="text-align: justify;">This particular implementation  uses the excellent<strong> SWF Object </strong>library to load and embed our <strong>Flash </strong>piece. <strong>SWF Object</strong> is available at <a href="http://www.deconcept.com/">www.deconcept.com</a> .</p>
<p style="text-align: justify;">The <strong>HTML </strong>and the full code can be found on <a href="http://www.webdesignermag.co.uk/">www.webdesignermag.co.uk</a></p>
<p style="text-align: justify;"><span style="color: #ff0000;">&lt;html&gt;</span></p>
<p style="text-align: justify;"><span style="color: #ff0000;"> &lt;head&gt;</span></p>
<p style="text-align: justify;"><span style="color: #ff0000;"> &lt;script type=”type/javascript” src=”swfobject.js”&gt;&lt;/script&gt;</span></p>
<p style="text-align: justify;"><span style="color: #ff0000;"> &lt;script type=”type/javascript”&gt;</span></p>
<p style="text-align: justify;">The <strong>CSS</strong>(<strong>CSS </strong>code goes here)</p>
<p style="text-align: justify;">The <strong>JavaScript</strong>(<strong>JavaScript </strong>code goes here)</p>
<p style="text-align: justify;"><strong>Flash </strong>and <strong>ActionScript</strong>: Frame 1</p>
<p style="text-align: justify;">Place “placeholderImage.png” on the stage in the first frame.</p>
<p style="text-align: justify;"><strong>Flash </strong>and <strong>ActionScript</strong>: Frame 2 and beyond</p>
<p style="text-align: justify;">By this time, the first frame has been downloaded and is ready for display. Call the “showFlash” <strong>JavaScript </strong>function from the second frame.</p>
<p style="text-align: justify;"><span style="color: #ff0000;">Import flash.externalExternalInterface;</span></p>
<p style="text-align: justify;"><span style="color: #ff0000;">…</span></p>
<p style="text-align: justify;"><span style="color: #ff0000;"> ExternalInterface.call(“showFlash”);</span></p>
<p style="text-align: justify;"><strong> </strong></p>
<p style="text-align: justify;"><strong> </strong></p>
<p style="text-align: justify;"><strong> </strong></p>
<p style="text-align: justify;"><strong> </strong></p>
<h3 style="text-align: justify;"><span style="color: #000000;">Dynamic font</span></h3>
<p style="text-align: justify;">A key area of any style of website is its <strong>font </strong>headers and other copy elements. Although <strong>Flash </strong>includes features to embed entire fonts in your library, a little <strong>ActionScript 3.0</strong> allows you to select only characters that will be used in your project. This may not be a big deal with smaller <strong>fonts </strong>but can slow up the loading process if the <strong>font </strong>contains multiple languages and special graphic characters. Runtime type allows fonts to load only when needed. Characters must be converted to Unicode (example,”A” becomes “U+0041”).</p>
<h3 style="text-align: justify;"><span style="color: #000000;">Int, uint Number</span></h3>
<p style="text-align: justify;">Typing in general boosts the speed of <strong>AS3 </strong>code. When it comes to numerical variable types in <strong>Flash</strong>, the platform shows some unexpected behavior.</p>
<p style="text-align: justify;">Most developers commonly believe that appropriate use of the “new”(in <strong>AS3</strong>) int, uint data types will result more optimized code therefore better performance . With other languages this is generally right in practice as well, but it is different with <strong>AS3</strong>.</p>
<p style="text-align: justify;">In reality unit types perform quite slow and they show quite a fluctuation in each case. Surprisingly , Number types execute quite fast, only a slightly slower than int.</p>
<p style="text-align: justify;">Avoiding uint types everywhere you can, appropriate use of int types and Number types will result better performance in reality.</p>
<p style="text-align: justify;">Ref: <a href="http://www.gskinner.com/blog/archives/2006/06/types_in_as3_in.html">http://www.gskinner.com/blog/archives/2006/06/types_in_as3_in.html</a></p>
<p style="text-align: justify;"><img class="aligncenter size-full wp-image-361" title="Learning ActionScript 3.0_A Beginner's Guide" src="http://artfantasy.revivalx.com/wp-content/uploads/2009/11/Learning-ActionScript-3.0_A-Beginners-Guide.jpg" alt="Learning ActionScript 3.0_A Beginner's Guide" width="131" height="160" /></p>
<p><a href="http://www.amazon.com/gp/product/059652787X?ie=UTF8&amp;tag=revivproje-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=059652787X">Learning ActionScript 3.0: A Beginner&#8217;s Guide</a><img style="border:none !important; margin:0px !important;" src="http://www.assoc-amazon.com/e/ir?t=revivproje-20&amp;l=as2&amp;o=1&amp;a=059652787X" border="0" alt="" width="1" height="1" /></p>
]]></content:encoded>
			<wfw:commentRss>http://artfantasy.revivalx.com/2009/11/10/pro-flash-techniquespart3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pro Flash Techniques(part2)</title>
		<link>http://artfantasy.revivalx.com/2009/11/05/pro-flash-techniquespart2/</link>
		<comments>http://artfantasy.revivalx.com/2009/11/05/pro-flash-techniquespart2/#comments</comments>
		<pubDate>Thu, 05 Nov 2009 22:23:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[source code]]></category>
		<category><![CDATA[CMS]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[gzip]]></category>
		<category><![CDATA[Java Script]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://artfantasy.revivalx.com/?p=343</guid>
		<description><![CDATA[How  to make a class or package import optional at compile time
Lets say you are using a package for debugging and want an easy way to turn it on and off. The idea behind it is that turning it off would also remove the import for obvious fill size reasons.
This handy solution is made possible [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><strong>How  to make a class or package import optional at compile time</strong></p>
<p style="text-align: justify;">Lets say you are using a package for debugging and want an easy way to turn it on and off. The idea behind it is that turning it off would also remove the import for obvious fill size reasons.</p>
<p style="text-align: justify;">This handy solution is made possible constants. If you define a constants. If you define a constant, for instance CONFIG::DEBUG, to a Boolean value you can turn a block of code on and off from the compilation point of view.</p>
<p style="text-align: justify;">In <strong>Flash IDE</strong>, you can set those constants in PUBLISH SETTINGS&gt; “Settings&#8230;”&gt;”Config constants”.  For other editor you can set the <strong>flex </strong>compiler command line options as follows:<span id="more-343"></span></p>
<p style="text-align: justify;">-define=CONFIG::DEBUG,true .</p>
<p style="text-align: justify;">I have a package level function, called log(), that I use in place of trace() to output in the <strong>JavaScript </strong>console. Here is how I use the compiler constant to turn that feature on and off.</p>
<p style="text-align: justify;">public function log(…args):void</p>
<p style="text-align: justify;">{</p>
<p style="text-align: justify;">CONFIG::DEBUG</p>
<p style="text-align: justify;">{</p>
<p style="text-align: justify;">[callthe debug package and pass the arguments]</p>
<p style="text-align: justify;">When CONFIG::DEBUG is set true, the log is calling the debugging package. Otherwise, the compiler ignores the entire block. Log() turns into an empty method. All references to my debugging stuff are removed, therefore not imported.</p>
<p style="text-align: justify;">All I have to do so is change one constant and all my log() methods are disabled.</p>
<p style="text-align: justify;"><strong>Squeeze for speed</strong><strong></strong></p>
<p style="text-align: justify;">So you’ve spent all that time optimizing your assets , have you considered your data?</p>
<p style="text-align: justify;">While file compression is nothing new, here’s simple solution you may have overlooked. As sites become more complex and data driven, users expect content to download at faster and faster rates, and we often find ourselves trying to optimize our work as much as possible. One area that focused on is the way we load data into our <strong>Flash </strong>sites.</p>
<p style="text-align: justify;"><strong>XML </strong>is by far and away the ‘standard ‘ in regards to maintaining  a dynamic <strong>Flash </strong>website. We figured out that I could optimize the size of <strong>XML </strong>files being loaded into <strong>Flash </strong>by compressing them. In order to do this, we turned to <strong>GZIP</strong> compression and the ability of <strong>Flash </strong>to read binary data. Since then, we have made it a standard to incorporate  <strong>GZIP</strong> compression into my workflow when involving <strong>XML </strong>data, where the resulting compressed     <strong>XML </strong>file is 85-90 percent smaller than the uncompressed original.</p>
<p style="text-align: justify;">My process works as follows:</p>
<ol style="text-align: justify;">
<li>We choose the desired <strong>XML </strong>file      we want to compress and run it through the <strong>GZIP </strong>compressor.  The output is saved as a binary <strong>GZ </strong>file.(You can download the <strong>GZIP </strong>compressor at <a href="http://www.gzip.org/">http://www.gzip.org</a> ). Compression can be done via a manual process or an automated (for      example via a <strong>CMS</strong>).</li>
<li>In Flash, I load the.gz filevia <strong> URLLoader</strong>, making sure I set the <strong>URLLoader</strong>’s dataFormat property to      binary.</li>
<li>When loaded, we save the data      as a <strong>ByteArray </strong>,uncompress it, and reset its position property to 0;</li>
<li>Using the method <strong>readUTFBytes </strong>on the <strong>byteArray </strong>object and passing the property <strong>bytesAvailable</strong>, we      convert the loaded binary file into a String which in essence is the <strong>XML </strong>we are looking for.</li>
<li>The last step is crating my XML      object, which is created by passing my converted string into the      constructor.</li>
</ol>
<p><img class="aligncenter size-full wp-image-349" title="ActionScript 3.0 in Flash CS3 Professional Essential Training" src="http://artfantasy.revivalx.com/wp-content/uploads/2009/11/ActionScript-3.0-in-Flash-CS3-Professional-Essential-Training1.jpg" alt="ActionScript 3.0 in Flash CS3 Professional Essential Training" width="112" height="160" /></p>
<p><a href="http://www.amazon.com/gp/product/1596712627?ie=UTF8&amp;tag=revivproje-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1596712627">ActionScript 3.0 in Flex Builder Essential Training</a><img style="border:none !important; margin:0px !important;" src="http://www.assoc-amazon.com/e/ir?t=revivproje-20&amp;l=as2&amp;o=1&amp;a=1596712627" border="0" alt="" width="1" height="1" /></p>
]]></content:encoded>
			<wfw:commentRss>http://artfantasy.revivalx.com/2009/11/05/pro-flash-techniquespart2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pro Flash Techniques(part1)</title>
		<link>http://artfantasy.revivalx.com/2009/11/02/top-50-pro-flash-techniquespart1/</link>
		<comments>http://artfantasy.revivalx.com/2009/11/02/top-50-pro-flash-techniquespart1/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 19:11:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[source code]]></category>

		<guid isPermaLink="false">http://artfantasy.revivalx.com/?p=331</guid>
		<description><![CDATA[Animating in a circle using ActionScript 3.0

First you need to find or create an image no bigger then 150&#215;200 pixels. Import that into the library, open up your library and drag it onto the stage.
Then, if need be you can scale your image down by selecting it. Press Ctrl+Alt +S  at the same time to [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Animating in a circle using ActionScript 3.0</strong></p>
<ol>
<li>First you need to find or create an image no bigger then 150&#215;200 pixels. Import that into the library, open up your library and drag it onto the stage.</li>
<li>Then, if need be you can scale your image down by selecting it. Press Ctrl+Alt +S  at the same time to scale your image down 50 percent.</li>
<li>Then click on your image and press F8 to convert it to a Movie Clip, making sure your registration point is centred . Then delete your Movie Clip from the stage.</li>
<li>Open up your library and right click on your Movie Clip and select linkage  and choose ‘Export for ActionScript ‘ and name the class “Image” with a capital”I”.</li>
<li>Now name your only layer “Action”, press F9 to open up your actions panel and copy the ActionScript that is. Then Ctrl+Enter to test your movie.<span id="more-331"></span></li>
</ol>
<p><strong>Using Code injection to write with Javascript code in your AS file.</strong></p>
<p>When playing with ExternalInterface.call(), sometimes you need to do more than just calling a function. For instance you can define a Javascript function that you’ll be using later. ??</p>
<p>This is simply done by using an XML:</p>
<p>Var initObJS:XML=</p>
<p>&lt;script&gt;</p>
<p>&lt;![CDATA[</p>
<p>Function(objlD)[</p>
<p>Try</p>
]]></content:encoded>
			<wfw:commentRss>http://artfantasy.revivalx.com/2009/11/02/top-50-pro-flash-techniquespart1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Shadowbox.js</title>
		<link>http://artfantasy.revivalx.com/2009/10/26/shadowbox-js/</link>
		<comments>http://artfantasy.revivalx.com/2009/10/26/shadowbox-js/#comments</comments>
		<pubDate>Mon, 26 Oct 2009 08:06:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[source code]]></category>

		<guid isPermaLink="false">http://artfantasy.revivalx.com/?p=322</guid>
		<description><![CDATA[Shadowbox is an online media viewing application that supports all of the web&#8217;s most popular media publishing formats. Shadowbox is written entirely in JavaScript and CSS and is highly customizable. Using Shadowbox, website authors can display a wide assortment of media in all major browsers without navigating users away from the linking page.
You should have [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Shadowbox is an online media viewing application that supports all of the web&#8217;s most popular media publishing formats. Shadowbox is written entirely in JavaScript and CSS and is highly customizable. Using Shadowbox, website authors can display a wide assortment of media in all major browsers without navigating users away from the linking page.</p>
<p style="text-align: justify;">You should have received a license with this distribution explaining the terms under which Shadowbox may be used. If you did not, you may obtain a copy of the license at<a href="http://shadowbox-js.com/LICENSE"> http://shadowbox-js.com/LICENSE</a></p>
<p style="text-align: justify;">
<p style="text-align: justify;">For more information, please see the Shadowbox website at <a rel=" no follow" href="http://shadowbox-js.com">http://shadowbox-js.com</a>/.</p>
]]></content:encoded>
			<wfw:commentRss>http://artfantasy.revivalx.com/2009/10/26/shadowbox-js/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
