<?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>t-roy.net*</title>
	<atom:link href="http://www.t-roy.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.t-roy.net</link>
	<description>blog by designer troy ginbey</description>
	<pubDate>Sun, 28 Sep 2008 14:44:25 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
	<language>en</language>
			<item>
		<title>Making the first paragraph bold with CSS</title>
		<link>http://www.t-roy.net/2008/09/28/making-the-first-paragraph-bold-with-css/</link>
		<comments>http://www.t-roy.net/2008/09/28/making-the-first-paragraph-bold-with-css/#comments</comments>
		<pubDate>Sun, 28 Sep 2008 14:27:39 +0000</pubDate>
		<dc:creator>T-roy</dc:creator>
		
		<category><![CDATA[CSS]]></category>

		<category><![CDATA[Adjacent Siblings]]></category>

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

		<guid isPermaLink="false">http://www.t-roy.net/?p=29</guid>
		<description><![CDATA[With CSS, it&#8217;s possible to make the first element after another element look different to the rest. Lets say you have a title, and two paragraphs afterwards e.g.:
&#60;h3&#62;My Paragraph Title&#60;/h3&#62;
&#60;p&#62;This is paragraph one.&#60;/p&#62;
&#60;p&#62;This is paragraph two.&#60;/p&#62;
To make the first paragraph after the title bold, you use what&#8217;s called an &#8216;adjacent sibling selector&#8216;. This allows you [...]]]></description>
			<content:encoded><![CDATA[<p>With CSS, it&#8217;s possible to make the first element after another element look different to the rest. Lets say you have a title, and two paragraphs afterwards e.g.:</p>
<p><code>&lt;h3&gt;My Paragraph Title&lt;/h3&gt;<br />
&lt;p&gt;This is paragraph one.&lt;/p&gt;<br />
&lt;p&gt;This is paragraph two.&lt;/p&gt;</code></p>
<p>To make the first paragraph after the title bold, you use what&#8217;s called an &#8216;<strong>adjacent sibling selector</strong>&#8216;. This allows you to target an element which follows another element. In this case, the first <strong>p</strong> element follows an <strong>h3</strong> element. To use CSS to say that you want the first <strong>p</strong> tag after an <strong>h3</strong> tag to be set in bold, your code would look like this:</p>
<p><code><br />
h3 + p {font-weight: bold;}<br />
</code></p>
<p>Now each time a <strong>p</strong> tag follows an <strong>h3</strong> tag&#8230; it is set to bold. Nice.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.t-roy.net/2008/09/28/making-the-first-paragraph-bold-with-css/feed/</wfw:commentRss>
		</item>
		<item>
		<title>New CSS category</title>
		<link>http://www.t-roy.net/2008/09/28/new-css-category/</link>
		<comments>http://www.t-roy.net/2008/09/28/new-css-category/#comments</comments>
		<pubDate>Sun, 28 Sep 2008 13:59:59 +0000</pubDate>
		<dc:creator>T-roy</dc:creator>
		
		<category><![CDATA[CSS]]></category>

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

		<category><![CDATA[Web Standards]]></category>

		<guid isPermaLink="false">http://www.t-roy.net/?p=27</guid>
		<description><![CDATA[I&#8217;ve decided to add a new category to my blog - CSS. It&#8217;s been a topic I&#8217;ve wanted to write about for a while now, only if to learn a thing or two along the way. I&#8217;m going to cover all things to do with CSS - from Learning CSS, CSS techniques, Browser hacks and [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve decided to add a new category to my blog - CSS. It&#8217;s been a topic I&#8217;ve wanted to write about for a while now, only if to learn a thing or two along the way. I&#8217;m going to cover all things to do with CSS - from <strong>Learning CSS</strong>, <strong>CSS techniques</strong>, <strong>Browser hacks</strong> and <strong>CSS best practices</strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.t-roy.net/2008/09/28/new-css-category/feed/</wfw:commentRss>
		</item>
		<item>
		<title>iPhones make you a better person.</title>
		<link>http://www.t-roy.net/2008/08/30/iphones-make-you-a-better-person/</link>
		<comments>http://www.t-roy.net/2008/08/30/iphones-make-you-a-better-person/#comments</comments>
		<pubDate>Sat, 30 Aug 2008 08:27:36 +0000</pubDate>
		<dc:creator>T-roy</dc:creator>
		
		<category><![CDATA[General Rantings]]></category>

		<guid isPermaLink="false">http://www.t-roy.net/?p=24</guid>
		<description><![CDATA[Yep&#8230; They make you smarter, more interesting, and give you those good looking friends you see on commercials. I literally haven&#8217;t put it down since I walked out of the shop with it yesterday&#8230; Sorry Sarah! :)
]]></description>
			<content:encoded><![CDATA[<p>Yep&#8230; They make you smarter, more interesting, and give you those good looking friends you see on commercials. I literally haven&#8217;t put it down since I walked out of the shop with it yesterday&#8230; Sorry Sarah! :)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.t-roy.net/2008/08/30/iphones-make-you-a-better-person/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Calling an ActionScript function from Flash</title>
		<link>http://www.t-roy.net/2008/07/16/calling-an-actionscript-function-from-flash/</link>
		<comments>http://www.t-roy.net/2008/07/16/calling-an-actionscript-function-from-flash/#comments</comments>
		<pubDate>Wed, 16 Jul 2008 02:25:40 +0000</pubDate>
		<dc:creator>T-roy</dc:creator>
		
		<category><![CDATA[Adobe Flash]]></category>

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

		<guid isPermaLink="false">http://www.t-roy.net/?p=23</guid>
		<description><![CDATA[This is pretty cool&#8230; being able to control your Flash movies from your HTML page through JavaScript.
To do this, you need to make use of Flash&#8217;s ExternalInterface (from Flash 8+)
Your flash code will look something like this:
import flash.external.ExternalInterface;
function stopVideoPlaying() {
  myVideo.stop();
}
ExternalInterface.addCallback("stopVideoPlaying", this, stopVideoPlaying);
The first line imports the External Interface. The next is three lines [...]]]></description>
			<content:encoded><![CDATA[<p>This is pretty cool&#8230; being able to control your Flash movies from your HTML page through JavaScript.</p>
<p>To do this, you need to make use of Flash&#8217;s ExternalInterface (from Flash 8+)</p>
<p>Your flash code will look something like this:</p>
<p><code>import flash.external.ExternalInterface;<br />
function stopVideoPlaying() {<br />
  myVideo.stop();<br />
}<br />
ExternalInterface.addCallback("stopVideoPlaying", this, stopVideoPlaying);</code></p>
<p>The first line imports the External Interface. The next is three lines is the function we want to call from our HTML page.</p>
<p>Finally, we add an addCallBack method, which, in order, defines the JavaScript function to listen for, the target, and the function to call when the callBack is received.</p>
<p>The JavaScript code will look like this:</p>
<p><code>window.onload = function() {<br />
  if(navigator.appName.indexOf("Microsoft") != -1) {<br />
    flash = window.swfVideo;<br />
  }else {<br />
    flash = window.document.swfVideo;<br />
  }<br />
}<br />
function stopFlashVideo() {<br />
  flash.stopVideoPlaying();<br />
}</code></p>
<p>Then, to call the Javascript method, just make sure your Flash is given an id name of swfVideo, then call the JavaScript function <strong>stopFlashVideo</strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.t-roy.net/2008/07/16/calling-an-actionscript-function-from-flash/feed/</wfw:commentRss>
		</item>
		<item>
		<title>scale9Grid in AS3.0</title>
		<link>http://www.t-roy.net/2008/05/25/scale9grid-in-as30/</link>
		<comments>http://www.t-roy.net/2008/05/25/scale9grid-in-as30/#comments</comments>
		<pubDate>Sun, 25 May 2008 04:21:16 +0000</pubDate>
		<dc:creator>T-roy</dc:creator>
		
		<category><![CDATA[AS3.0 Fundamentals]]></category>

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

		<guid isPermaLink="false">http://www.t-roy.net/?p=22</guid>
		<description><![CDATA[Wow&#8230; every so often you stumble upon something that you know will change the way you design forever. I was flicking through the ACP (Adobe Certified Professional) Exam Guide for Flash CS3 (as you do on a Sunday), and came across something I didn&#8217;t recognise - scale9Grid.
scale9Grid divides a display object into 9 regions, allowing [...]]]></description>
			<content:encoded><![CDATA[<p>Wow&#8230; every so often you stumble upon something that you know will change the way you design forever. I was flicking through the ACP (Adobe Certified Professional) Exam Guide for Flash CS3 (as you do on a Sunday), and came across something I didn&#8217;t recognise - scale9Grid.</p>
<p>scale9Grid divides a display object into 9 regions, allowing different rules to be applied to it when the object is scaled.</p>
<p>How is this useful?? Well.. think about designing a simple content area with rounded corners. You want the content area scale vertically as the amount of text it holds increases. With any normal object with rounded corners, as you scale it&#8217;s height, the corners would scale and distort the more it is verticaly scaled. Enter scale9Grid. With one line of code, you can define the regions of the rounded rectangle to allow for distortion free scaling&#8230; Here&#8217;s an example:</p>
<p><code>myRoundedRectangle.scale9Grid = new Rectangle(10,10,300,600);</code></p>
<p>The above code adds a scale9Grid to a rounded rectangle object - meaning when it is scaled, the rounded corners will stay the same&#8230;. Brilliant!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.t-roy.net/2008/05/25/scale9grid-in-as30/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Array Methods in AS3.0</title>
		<link>http://www.t-roy.net/2008/05/22/array-methods-in-as30/</link>
		<comments>http://www.t-roy.net/2008/05/22/array-methods-in-as30/#comments</comments>
		<pubDate>Thu, 22 May 2008 02:30:15 +0000</pubDate>
		<dc:creator>T-roy</dc:creator>
		
		<category><![CDATA[AS3.0 Fundamentals]]></category>

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

		<guid isPermaLink="false">http://www.t-roy.net/?p=18</guid>
		<description><![CDATA[I&#8217;ve been using Array for a while now - but don&#8217;t frequently use all of it&#8217;s methods&#8230; so I&#8217;m going to go through the ones I don&#8217;t use a lot&#8230;.
Array.sort();
var beers:Array = ["Fosters", "Alpha", "VB", "Asahi"];
beers.sort(); // default sort
trace(beers); // output: Angelou,Blake,Dante,cummings
beers.sort(Array.CASEINSENSITIVE);
trace(beers); // output: Alpha,asahi,Fosters,VB
beers.sort(Array.DESCENDING);
trace(beers); // output: asahi,VB,Fosters,Alpha
beers.sort(Array.DESCENDING &#124; Array.CASEINSENSITIVE);
trace(beers); // output: VB,Fosters,asahi,Alpha
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using Array for a while now - but don&#8217;t frequently use all of it&#8217;s methods&#8230; so I&#8217;m going to go through the ones I don&#8217;t use a lot&#8230;.</p>
<p><strong>Array.sort();</strong></p>
<p><code>var beers:Array = ["Fosters", "Alpha", "VB", "Asahi"];<br />
beers.sort(); // default sort<br />
trace(beers); // output: Angelou,Blake,Dante,cummings</p>
<p>beers.sort(Array.CASEINSENSITIVE);<br />
trace(beers); // output: Alpha,asahi,Fosters,VB</p>
<p>beers.sort(Array.DESCENDING);<br />
trace(beers); // output: asahi,VB,Fosters,Alpha</p>
<p>beers.sort(Array.DESCENDING | Array.CASEINSENSITIVE);<br />
trace(beers); // output: VB,Fosters,asahi,Alpha</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.t-roy.net/2008/05/22/array-methods-in-as30/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Adding &#038; removing display objects from the display list in AS3.0</title>
		<link>http://www.t-roy.net/2008/05/21/adding-display-objects-to-the-display-list-in-as30/</link>
		<comments>http://www.t-roy.net/2008/05/21/adding-display-objects-to-the-display-list-in-as30/#comments</comments>
		<pubDate>Wed, 21 May 2008 07:33:38 +0000</pubDate>
		<dc:creator>T-roy</dc:creator>
		
		<category><![CDATA[AS3.0 Fundamentals]]></category>

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

		<guid isPermaLink="false">http://www.t-roy.net/?p=21</guid>
		<description><![CDATA[package {
	import flash.display.*;
	import flash.text.TextField;
	public class AS3Tester extends Sprite {
		public function AS3Tester() {
			var myTextContainer:TextField = new TextField();
			myTextContainer.text = "I like beer";
			this.addChild(myTextContainer);
		}
	}
}
In the above code, I create a variable to reference a new TextField object, and set it&#8217;s text to &#8220;I like beer&#8221;. This alone wont add the TextField to the stage. To do this I then [...]]]></description>
			<content:encoded><![CDATA[<p><code>package {<br />
	import flash.display.*;<br />
	import flash.text.TextField;</p>
<p>	public class AS3Tester extends Sprite {<br />
		public function AS3Tester() {<br />
			var myTextContainer:TextField = new TextField();<br />
			myTextContainer.text = "I like beer";<br />
			this.addChild(myTextContainer);<br />
		}<br />
	}<br />
}</code></p>
<p>In the above code, I create a variable to reference a new TextField object, and set it&#8217;s text to &#8220;I like beer&#8221;. This alone wont add the TextField to the stage. To do this I then need to use the addChild method to add it to the display list:</p>
<p><code>addChild(child:DisplayObject):DisplayObject </code></p>
<p>addChild is a method of DisplayObjectContainer. When a DisplayObjectContainer (a Sprite, a Loader or the Stage) calls the addChild method, it adds a child DisplayObject instance to that DisplayObjectContainer instance.</p>
<p>To remove an object from the display list is the reverse:<br />
<code>removeChild(child:DisplayObject):DisplayObject</code></p>
<p>So the code to remove the TexField above would be:<br />
<code>this.removeChild(myTextContainer);</code></p>
<p>If I wanted to add a display object instance to a specific DisplayObjectContainer instance, I use addChildAt:<br />
<code>addChildAt(child:DisplayObject, index:int):DisplayObject</code></p>
<p>Here&#8217;s an example of the code in use:</p>
<p><code>var myDisplayContainer:Sprite = new Sprite();</p>
<p>var myFirstSprite:Sprite = new Sprite();<br />
var mySecondSprite:Sprite = new Sprite();</p>
<p>myDisplayContainer.addChild(myFirstSprite);<br />
myDisplayContainer.addChildAt(mySecondSprite, 0);</p>
<p>this.addChild(myDisplayContainer);</code></p>
<p>The above code first creates a DisplayObjectContainer called <strong>myDisplayContainer</strong>, then adds a Sprite (<strong>myFirstSprite</strong>) to it. Then using <strong>addChildAt</strong>, a second sprite is added to myDisplayContainer <strong>at index 0</strong>, which is the back of the list - meaning it will be displayed <strong>underneath</strong> myFirstSprite.</p>
<p>The final line adds the <strong>myDisplayContainer</strong> to the stage.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.t-roy.net/2008/05/21/adding-display-objects-to-the-display-list-in-as30/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Display List Programming in AS3.0</title>
		<link>http://www.t-roy.net/2008/05/20/display-list-programming-in-as30/</link>
		<comments>http://www.t-roy.net/2008/05/20/display-list-programming-in-as30/#comments</comments>
		<pubDate>Tue, 20 May 2008 01:43:12 +0000</pubDate>
		<dc:creator>T-roy</dc:creator>
		
		<category><![CDATA[AS3.0 Fundamentals]]></category>

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

		<guid isPermaLink="false">http://www.t-roy.net/?p=20</guid>
		<description><![CDATA[Display List programming is a big part of ActionScript 3.0&#8230; Basically anything that is visually added to the stage must be added to Flash&#8217;s Display List hierarchy.
In the next few posts I&#8217;m going to go through a few core display programming tasks&#8230;

Adding display objects to the display list 
Removing objects from the display list
Moving objects [...]]]></description>
			<content:encoded><![CDATA[<p>Display List programming is a big part of ActionScript 3.0&#8230; Basically anything that is visually added to the stage must be added to Flash&#8217;s Display List hierarchy.</p>
<p>In the next few posts I&#8217;m going to go through a few core display programming tasks&#8230;</p>
<ul>
<li>Adding display objects to the display list </li>
<li>Removing objects from the display list</li>
<li>Moving objects among display containers </li>
<li>Moving objects in front of or behind other objects</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.t-roy.net/2008/05/20/display-list-programming-in-as30/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Taking out the trash in AS3.0</title>
		<link>http://www.t-roy.net/2008/05/19/taking-out-the-trash-in-as30/</link>
		<comments>http://www.t-roy.net/2008/05/19/taking-out-the-trash-in-as30/#comments</comments>
		<pubDate>Mon, 19 May 2008 09:25:29 +0000</pubDate>
		<dc:creator>T-roy</dc:creator>
		
		<category><![CDATA[AS3.0 Fundamentals]]></category>

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

		<guid isPermaLink="false">http://www.t-roy.net/?p=19</guid>
		<description><![CDATA[Garbage collection is a BIG deal in AS3 - Adobe have a couple of good articles articles which explains the theory&#8230;
http://www.adobe.com/devnet/flashplayer/articles/garbage_collection.html
http://www.adobe.com/devnet/flashplayer/articles/resource_management.html
]]></description>
			<content:encoded><![CDATA[<p>Garbage collection is a BIG deal in AS3 - Adobe have a couple of good articles articles which explains the theory&#8230;<br />
<a href="http://www.adobe.com/devnet/flashplayer/articles/garbage_collection.html">http://www.adobe.com/devnet/flashplayer/articles/garbage_collection.html</a><br />
<a href="http://www.adobe.com/devnet/flashplayer/articles/resource_management.html">http://www.adobe.com/devnet/flashplayer/articles/resource_management.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.t-roy.net/2008/05/19/taking-out-the-trash-in-as30/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Uses for XMLList</title>
		<link>http://www.t-roy.net/2008/05/18/uses-for-xmllist/</link>
		<comments>http://www.t-roy.net/2008/05/18/uses-for-xmllist/#comments</comments>
		<pubDate>Sun, 18 May 2008 11:01:54 +0000</pubDate>
		<dc:creator>T-roy</dc:creator>
		
		<category><![CDATA[AS3.0 Fundamentals]]></category>

		<guid isPermaLink="false">http://www.t-roy.net/?p=17</guid>
		<description><![CDATA[An XMLList is a great object for working with one or more XML elements. You can call methods on the elements as a group or on the individual elements in the collection. In the example below, I&#8217;ve created an XML List to store all beers from the beers XML object that have the brand &#8220;fosters&#8221;:
beers:XML [...]]]></description>
			<content:encoded><![CDATA[<p>An XMLList is a great object for working with one or more XML elements. You can call methods on the elements as a group or on the individual elements in the collection. In the example below, I&#8217;ve created an XML List to store all beers from the beers XML object that have the brand &#8220;fosters&#8221;:</p>
<p><code>beers:XML = XML;<br />
showBeersByBrand("alpha");<br />
private function showBeersByBrand(name:String):void {<br />
  var results:XMLList = beers.beer.(@brand == name);<br />
  showList(results);<br />
}<br />
private function showList(list:XMLList):void {<br />
  var item:XML;<br />
  for each(item in list) {<br />
    trace("item: " + item.toXMLString());<br />
  }<br />
}<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.t-roy.net/2008/05/18/uses-for-xmllist/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
