<?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>Chris Teso &#187; Wordpress Flash CMS</title>
	<atom:link href="http://www.christeso.com/blog/index.php/category/lab/flash-wordpress-content-management-system/wordpress-flash-cms/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.christeso.com/blog</link>
	<description>Chris Teso is Director of Interactive Media, Flash Designer Developer and Portland Photographer.</description>
	<lastBuildDate>Sun, 06 Jun 2010 04:59:50 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>theGOOD.com</title>
		<link>http://www.christeso.com/blog/index.php/lab/flash-wordpress-content-management-system/thegood-com/</link>
		<comments>http://www.christeso.com/blog/index.php/lab/flash-wordpress-content-management-system/thegood-com/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 22:02:25 +0000</pubDate>
		<dc:creator>chris teso</dc:creator>
				<category><![CDATA[Content Management Systems]]></category>
		<category><![CDATA[Strategery & Industry]]></category>
		<category><![CDATA[Wordpress Flash CMS]]></category>

		<guid isPermaLink="false">http://www.christeso.com/?p=737</guid>
		<description><![CDATA[Originally posted @ http://www.thegood.com/social/index.php/category/blog/industry/thegood-com/
We&#8217;re pretty proud of our new site, so we thought we&#8217;d give some technical deets for all of our geek readers. We do hope the rest of you can appreciate it on a more laymen level.
The site is an aggregation engine that acquires feeds from both Wordpress and Yahoo Pipes. Pipes delivers [...]]]></description>
			<content:encoded><![CDATA[<p>Originally posted @ http://www.thegood.com/social/index.php/category/blog/industry/thegood-com/</p>
<p>We&#8217;re pretty proud of our <a href="http://www.thegood.com/">new site</a>, so we thought we&#8217;d give some technical deets for all of our geek readers. We do hope the rest of you can appreciate it on a more laymen level.</p>
<p>The site is an aggregation engine that acquires feeds from both Wordpress and Yahoo Pipes. Pipes delivers Twitter and other social media feeds in a nice JSON wrapper to Flash. Wordpress data is acquired via XMLRPC. We made some custom modifications to enable it to deliver some specificity, however most of it was right there for the taking. A tip of the cap to Wordpress and its open source goodness.</p>
<p>We&#8217;re able to administer the entire site content using Wordpress as the CMS talking nicely with its Flash front. Given this, the site can function as our portfolio, social aggregate, blog, and company profile all wrapped up in a of sweet.</p>
<p>If you find any bugs or ideas for improvement we&#8217;d love to hear from you. More selfishly, If you&#8217;re a potential client and dig what we&#8217;re layin&#8217; down, don&#8217;t hesitate to drop us a line. We&#8217;d love to get in bed with you.</p>
<p>Thanks, and enjoy &#8211; theGOOD team.</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow" id="twitter"  target="_blank" href="http://twitter.com/home?status=theGOOD.com%20-%20http%3A%2F%2Fwww.christeso.com%2Fblog%2Findex.php%2Flab%2Fflash-wordpress-content-management-system%2Fthegood-com%2F" title="Twitter"><img src="http://www.christeso.com/blog/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="facebook"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.christeso.com%2Fblog%2Findex.php%2Flab%2Fflash-wordpress-content-management-system%2Fthegood-com%2F&amp;t=theGOOD.com" title="Facebook"><img src="http://www.christeso.com/blog/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="digg"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.christeso.com%2Fblog%2Findex.php%2Flab%2Fflash-wordpress-content-management-system%2Fthegood-com%2F&amp;title=theGOOD.com&amp;bodytext=Originally%20posted%20%40%20http%3A%2F%2Fwww.thegood.com%2Fsocial%2Findex.php%2Fcategory%2Fblog%2Findustry%2Fthegood-com%2F%0D%0A%0D%0AWe%27re%20pretty%20proud%20of%20our%20new%20site%2C%20so%20we%20thought%20we%27d%20give%20some%20technical%20deets%20for%20all%20of%20our%20geek%20readers.%20We%20do%20hope%20the%20rest%20of%20you%20can%20appreciate" title="Digg"><img src="http://www.christeso.com/blog/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="del.icio.us"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.christeso.com%2Fblog%2Findex.php%2Flab%2Fflash-wordpress-content-management-system%2Fthegood-com%2F&amp;title=theGOOD.com&amp;notes=Originally%20posted%20%40%20http%3A%2F%2Fwww.thegood.com%2Fsocial%2Findex.php%2Fcategory%2Fblog%2Findustry%2Fthegood-com%2F%0D%0A%0D%0AWe%27re%20pretty%20proud%20of%20our%20new%20site%2C%20so%20we%20thought%20we%27d%20give%20some%20technical%20deets%20for%20all%20of%20our%20geek%20readers.%20We%20do%20hope%20the%20rest%20of%20you%20can%20appreciate" title="del.icio.us"><img src="http://www.christeso.com/blog/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="google"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.christeso.com%2Fblog%2Findex.php%2Flab%2Fflash-wordpress-content-management-system%2Fthegood-com%2F&amp;title=theGOOD.com&amp;annotation=Originally%20posted%20%40%20http%3A%2F%2Fwww.thegood.com%2Fsocial%2Findex.php%2Fcategory%2Fblog%2Findustry%2Fthegood-com%2F%0D%0A%0D%0AWe%27re%20pretty%20proud%20of%20our%20new%20site%2C%20so%20we%20thought%20we%27d%20give%20some%20technical%20deets%20for%20all%20of%20our%20geek%20readers.%20We%20do%20hope%20the%20rest%20of%20you%20can%20appreciate" title="Google Bookmarks"><img src="http://www.christeso.com/blog/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow" id="print"  target="_blank" href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.christeso.com%2Fblog%2Findex.php%2Flab%2Fflash-wordpress-content-management-system%2Fthegood-com%2F&amp;partner=sociable" title="Print"><img src="http://www.christeso.com/blog/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.christeso.com/blog/index.php/lab/flash-wordpress-content-management-system/thegood-com/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Wordpress Flash Navigation</title>
		<link>http://www.christeso.com/blog/index.php/lab/wordpress-as3-flash-navigation/</link>
		<comments>http://www.christeso.com/blog/index.php/lab/wordpress-as3-flash-navigation/#comments</comments>
		<pubDate>Thu, 19 Mar 2009 18:35:52 +0000</pubDate>
		<dc:creator>chris teso</dc:creator>
				<category><![CDATA[Actionscript Classes]]></category>
		<category><![CDATA[Content Management Systems]]></category>
		<category><![CDATA[Laboratory]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[Wordpress AS3 Flash Navigation]]></category>
		<category><![CDATA[Wordpress Flash CMS]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[classes]]></category>
		<category><![CDATA[cms]]></category>
		<category><![CDATA[content management]]></category>
		<category><![CDATA[dynamic]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[navigation]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[xmlrpc]]></category>

		<guid isPermaLink="false">http://www.christeso.com/?p=670</guid>
		<description><![CDATA[lab]]></description>
			<content:encoded><![CDATA[<p>Consider this beta, and not heavily tested. Just wanted to get it out there while I&#8217;m still working on it.</p>
<p>For a recent project a client wanted more control over the display of their <a href="http://wordpress.org/" target="_blank">Wordpress</a> navigation. They wanted to be able to use any font. They also wanted a dynamic fold-able navigation that enables access to all categories without re-loading the page. This was a perfect project for me since I use Wordpress all over the mofo place. For example, you can see the navigation in use over there to the right. Also, as I&#8217;ve stated previously, I’m a big fan of <a href="http://www.christeso.com/index.php/portfolio/istream-a-flickr-vimeo-wordpress-google-controlled-website/" target="_self">leveraging</a> the many publishing outlets I already use. So, I buit the nav in Flash connecting to Wordpress via <a href="http://www.xmlrpc.com/" target="_blank">XMLRPC</a> using some classes from <a href="http://mattism.com/" target="_blank">http://mattism.com/</a>. This essentially allows me to use Wordpress as a content management system for Flash. You could obviously see how this could be applied to <a href="http://www.christeso.com/index.php/portfolio/istream-a-flickr-vimeo-wordpress-google-controlled-website/" target="_self">entire sites</a>, like I have with my <a href="http://www.christeso.com/index.php/portfolio/istream-a-flickr-vimeo-wordpress-google-controlled-website/" target="_self">homepage</a>. I&#8217;ve thought about building this a Wordpress plugin, and maybe down the road I will, but I doubt it as I&#8217;ll probably jump ship and start another project per usual. Besides, everyone knows you can&#8217;t make money writing Wordpress plugins.</p>
<p>How It Works:<br />
Flash calls _rpc.call(&#8221;wp.getCategories&#8221;) to xmlrpc.php which returns an array of categories. I use this array to create a bunch of MovieClip()s. These clips add TextFields as children, are sorted and have events applied to them that enable the interactions. Two fonts reside in the library. One for the top node and one for the child and grandchildren nodes.</p>
<p>Features [the current goods]:</p>
<ul>
<li>Dynamic &#8211; Works dynamically with Wordpress categories. You update your categories in Wordpress, they show properly in Flash</li>
<li>Sorting &#8211; Dynamically sorts top nodes. Controlled by Wordpress plugin <a href="http://geekyweekly.com/mycategoryorder" target="_blank">my category order</a>. For this to work I had to make a small addition to the Wordpress xmlrpc.php, located in your Wordpress root folder, to return the category term order. Added line 2776 &#8211; $struct['order'] = $cat-&gt;term_order;</li>
<li>Page recognition &#8211; Recognizes the page you&#8217;re on and dynamically opens navigation to the parent node of said page onload. I could have used XMLRPC tomake this call, I&#8217;m sure. However, I opted to pass in the page url via Flashvars and run a check to find a match. When a match is found the nav opens to it&#8217;s parent node.</li>
<li>Folding &#8211; Uses Grant Skinner <a href="http://www.gskinner.com/libraries/gtween/" target="_blank">GTween</a> for interactions.</li>
<li>Multiple &#8211; Allows posts to live under multiple category nodes.</li>
</ul>
<p>Wish List [the future goods]:</p>
<ul>
<li>Multiline &#8211; Currently only supports single line category titles, so you&#8217;re limited in char length</li>
<li>Scrolling &#8211; Currently the length of your category list is limited to the length of the swf. I plan to add functions to enable scrolling of the list based on mouseY. This will free up the nav to be as long as you desire.</li>
<li>Post count &#8211; Do people really use this though? Probably not as its annoying.</li>
<li>Levels &#8211; Currently the nav only supports 3 levels. It would be nice to be infinite.</li>
<li>Build in the rest of Wordpress feature support for tag cloud, recent comments etc.</li>
</ul>
<p>Total devel time: 2 days, or about 12 hours.</p>
<p>I&#8217;d love to see where other people take the code and what people build with it.</p>
<p>Source Code:<br />
wpNavMain.as</p>
<pre><code>/**
* wpNavMain by Chris Teso. Mar 19, 2009
* Visit www.christeso.com/blog for documentation, updates and more free code.
*
*
* Copyright (c) 2009 Chris Teso
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
**/
package
{
	import flash.display.*;

	public class wpNavMain extends Sprite
	{

		/*
		========================================================
		| Constructor
		========================================================
		*/

		public function wpNavMain ()
		{
			stage.align = StageAlign.TOP_LEFT;

			// add nav
			var wp:Wp = new Wp()
			addChild( wp )
		}
	}
}</code></pre>
<p>Wp.as</p>
<pre><code>/**
* Wp by Chris Teso. Mar 19, 2009
* Visit www.christeso.com/blog for documentation, updates and more free code.
*
*
* Copyright (c) 2009 Chris Teso
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
**/

package
{
	import com.gskinner.motion.*
	import com.mattism.http.xmlrpc.*;
	import com.mattism.http.xmlrpc.util.*;
	import flash.filters.*;
	import flash.media.*;
	import flash.ui.*;
	import flash.display.*;
	import flash.events.*;
	import flash.net.*;
	import flash.utils.*;
	import flash.geom.*;
	import flash.text.*;
	import fl.transitions.*;
	import fl.transitions.easing.*;
	import flash.system.SecurityPanel;
	import flash.system.Security;

	public class Wp extends Sprite
	{

		/*
		========================================================
		| Private Variables                         | Data Type
		========================================================
		*/
		private var _navArray:Array = new Array();
		private var _rpc:Connection;
		private var _topFont:Font = new topFont();
		private var _roadSign:Font = new roadSign();
		private var _topFmt:TextFormat = new TextFormat()
		private var _currUrl:String = ""
		private var _hideTimer:Timer

		private var _textYPad:int = 16
		private var _navSpeed:Number = .2
		/*
		========================================================
		| Constructor
		========================================================
		*/

		public function Wp ()
		{
			loadRpc()
		}

		private function checkPage()
		{
			// load in title
			var paramList:Object = this.root.loaderInfo.parameters;

			// set var to hold text
			var _currUrl:String = paramList["url"]

			//_currUrl = "http://www.christeso.com/index.php/category/portfolio/truth/truth-found/"

			// scan through array and open nav to that one
			for( var i=0;i&lt;_navArray.length;i++ )
			{
				//trace( "_currUrl = "+_currUrl+" - "+_navArray[i].link )

				if( _navArray[i].link == _currUrl )
				{
					//trace( "found match!" )

					// open it
					if( _navArray[i].childMc != null )
					{
						showGrandChildren( MovieClip( _navArray[i].childMc ) )
					}
					if( _navArray[i].grandChildMc != null )
					{
						showGrandChildren( MovieClip( _navArray[i].grandChildMc.parent ) )
					}

				}
			}
		}

		private function showGrandChildren( mc:MovieClip )
		{

			//trace( "opening grandchildren" )

			// amount to go down
			var yLeap:Number;

			// total that will be open as long as the node is not already open
			var _totOpen:int = mc.numChildren-1

			//trace( "_totOpen = "+_totOpen )

			// ok we can prob do this in one big loop
			for( var i=0;i&lt;_navArray.length;i++ )
			{
				// push down top nodes as long as they are below the top node you're on
				if( _navArray[i].mc != null )
				{
					if( _navArray[i].mc.origY &gt; MovieClip(mc.parent).origY )
					{
						yLeap = _navArray[i].mc.origY + ( _totOpen*_textYPad )
						new GTween( _navArray[i].mc, _navSpeed, {y:yLeap} )
					}
					else
					{
						yLeap = _navArray[i].mc.origY
						new GTween( _navArray[i].mc, _navSpeed, {y:yLeap} )
					}
				}

				// push down child nodes as long as they are below the node you're on and are a child of the node you're on
				if( _navArray[i].childMc != null )
				{
					if( _navArray[i].childMc.parent == mc.parent )
					{
						if( _navArray[i].childMc.origY &gt; mc.origY )
						{
							yLeap = _navArray[i].childMc.origY + ( _totOpen*_textYPad )
							new GTween( _navArray[i].childMc, _navSpeed, {y:yLeap} )
						}
						else
						{
							yLeap = _navArray[i].childMc.origY
							new GTween( _navArray[i].childMc, _navSpeed, {y:yLeap} )
						}
					}
				}

				// make grandchildren visible
				if( _navArray[i].grandChildMc != null )
				{
					if( _navArray[i].grandChildMc.parent == mc )
					{
						_navArray[i].grandChildMc.visible = true
						new GTween( _navArray[i].grandChildMc, _navSpeed, {alpha:1} )
					}
					else
					{
						new GTween( _navArray[i].grandChildMc, _navSpeed/2, {alpha:0, autoHide:true} )
					}
				}
			}
		}

		private function hideGrandChildren( e:Event )
		{
			// amount to go down
			var yLeap:Number;			

			// ok we can prob do this in one big loop
			for( var i=0;i&lt;_navArray.length;i++ )
			{
				// push up top nodes
				if( _navArray[i].mc != null )
				{
					yLeap = _navArray[i].mc.origY
					new GTween( _navArray[i].mc, _navSpeed, {y:yLeap} )
				}

				// push up child nodes
				if( _navArray[i].childMc != null )
				{
					yLeap = _navArray[i].childMc.origY
					new GTween( _navArray[i].childMc, _navSpeed, {y:yLeap} )
				}

				// make grandchildren visible
				if( _navArray[i].grandChildMc != null )
				{
					new GTween( _navArray[i].grandChildMc, _navSpeed/2, {alpha:0, autoHide:true} )
				}				

			}
		}

		private function childClick( e:Event )
		{
			var i:int = e.currentTarget.indexNum
			var srcRequest:URLRequest = new URLRequest( _navArray[i].link );
			navigateToURL( srcRequest, "" );
		}

		private function childOver( e:Event )
		{
			trace( "mouse over "+MovieClip( e.currentTarget ).name )

			// remove parent events
			MovieClip( e.currentTarget ).parent.removeEventListener( MouseEvent.CLICK, childClick )

			// stop close timer
			_hideTimer.stop()

			// show grandkids
			showGrandChildren( MovieClip( e.currentTarget ) )

		}

		private function childOut( e:Event )
		{
			trace( "mouse out "+MovieClip( e.currentTarget ).name )

			// add parent events
			MovieClip( e.currentTarget ).parent.addEventListener( MouseEvent.CLICK, childClick )

			// start timer for close
			_hideTimer.start();
		}

		private function grandChildOver( e:Event )
		{

			trace( "mouse over "+MovieClip( e.currentTarget ).name )

			// remove parent events
			MovieClip( e.currentTarget ).parent.removeEventListener( MouseEvent.CLICK, childClick )

			// handle its events
			MovieClip( e.currentTarget ).addEventListener( MouseEvent.CLICK, childClick )			

		}

		private function grandChildOut( e:Event )
		{

			trace( "mouse out "+MovieClip( e.currentTarget ).name )

			// remove parent events
			MovieClip( e.currentTarget ).parent.addEventListener( MouseEvent.CLICK, childClick )

			// handle its events
			MovieClip( e.currentTarget ).removeEventListener( MouseEvent.CLICK, childClick )			

		}

		private function orderTop()
		{
			var yPos:int = 0;
			var topCount:int = 0

			// first we need to find all unique parents
			for( var i=0;i&lt;_navArray.length;i++ )
			{
				//
				if( _navArray[i].mc != null )
				{
					// place the top
					_navArray[i].mc.y = yPos
					_navArray[i].mc.origY = yPos
					// calculate the next Y pos
					yPos = _navArray[i].mc.y + ( _navArray[i].mc.numChildren*_textYPad )+_textYPad

				}
			}
		}

		private function makeTopNode( i:int )
		{
			trace( "making top node "+_navArray[i].title+" id = "+_navArray[i].id+" parent id = "+_navArray[i].parentId )

			// create an mc holder
			var mc:MovieClip = new MovieClip()
			mc.name = _navArray[i].title
			// create a text field
			var t:TextField = new TextField()
			t.mouseEnabled = false
			t.name = "text"
			t.autoSize = TextFieldAutoSize.LEFT
			t.selectable = false
			t.embedFonts = true
			t.antiAliasType = flash.text.AntiAliasType.ADVANCED
			t.htmlText = _navArray[i].title.toUpperCase()
			_topFmt.size = 13;
			_topFmt.font = _roadSign.fontName;
			_topFmt.color = 0x666666
			//_topFmt.letterSpacing = .5
			_topFmt.kerning = true;
			t.setTextFormat( _topFmt )

			mc.addChild( t )
			addChild( mc )

			_navArray[i].mc = mc

			// events
			mc.indexNum = i
			mc.origY = mc.y
			mc.buttonMode = true
			mc.addEventListener( MouseEvent.CLICK, childClick )

			// now loop through this level and populate kids
			findChildren( _navArray[i].id, mc )
		}

		private function makeChild( i:int, par:MovieClip )
		{
			trace( "   making child "+_navArray[i].title+" id = "+_navArray[i].id+" parent id = "+_navArray[i].parentId )

			// create an mc holder
			var mc:MovieClip = new MovieClip()
			mc.name = _navArray[i].title
			// create a text field
			var t:TextField = new TextField()
			t.mouseEnabled = false
			t.name = "text"
			t.autoSize = TextFieldAutoSize.LEFT
			t.selectable = false
			t.embedFonts = true
			t.antiAliasType = flash.text.AntiAliasType.ADVANCED
			t.htmlText = _navArray[i].title.toUpperCase()
			_topFmt.size = 10;
			_topFmt.font = _topFont.fontName;
			_topFmt.color = 0xffffff
			_topFmt.letterSpacing = .5
			_topFmt.kerning = true;
			t.setTextFormat( _topFmt )

			_navArray[i].childMc = mc

			mc.y = par.numChildren*_textYPad

			mc.addChild( t )
			par.addChild( mc )

			// now loop through this level and populate kids
			findGrandChildren( _navArray[i].id, mc )

			// events
			mc.indexNum = i
			mc.origY = mc.y
			mc.buttonMode = true
			mc.addEventListener( MouseEvent.CLICK, childClick )
			mc.addEventListener( MouseEvent.MOUSE_OVER, childOver )
			mc.addEventListener( MouseEvent.MOUSE_OUT, childOut )

		}

		private function makeGrandChild( i:int, par:MovieClip )
		{
			trace( "   making grandchild "+_navArray[i].title+" id = "+_navArray[i].id+" parent id = "+_navArray[i].parentId )

			// create an mc holder
			var mc:MovieClip = new MovieClip()
			mc.name = _navArray[i].title
			// create a text field
			var t:TextField = new TextField()
			t.mouseEnabled = false
			t.name = "text"
			t.autoSize = TextFieldAutoSize.LEFT
			t.selectable = false
			t.embedFonts = true
			t.antiAliasType = flash.text.AntiAliasType.ADVANCED
			t.htmlText = _navArray[i].title.toUpperCase()
			_topFmt.size = 10;
			_topFmt.font = _topFont.fontName;
			_topFmt.color = 0x999999
			_topFmt.letterSpacing = 0
			_topFmt.kerning = true;
			t.setTextFormat( _topFmt )

			_navArray[i].grandChildMc = mc

			mc.alpha = 0
			mc.visible = false;

			mc.x = 5
			mc.y = par.numChildren*_textYPad

			mc.addChild( t )
			par.addChild( mc )

			// events
			mc.indexNum = i
			mc.buttonMode = true
			//mc.mouseChildren = false
			//mc.addEventListener( MouseEvent.CLICK, childClick )
			mc.addEventListener( MouseEvent.MOUSE_OVER, grandChildOver )
			mc.addEventListener( MouseEvent.MOUSE_OUT, grandChildOut )

		}

		private function findGrandChildren( id:int, par:MovieClip )
		{
			for( var i=0;i&lt;_navArray.length;i++ )
			{
				// hunt for children of the parent
				if( _navArray[i].parentId == id )
				{
					//trace( "-- found child "+_navArray[i].title+" | id = "+_navArray[i].id+" | parent = "+_navArray[i].parentId )
					// found one, now make a grandchild
					makeGrandChild( i, par )
				}
			}

		}

		private function findChildren( id:int, par:MovieClip )
		{
			for( var i=0;i&lt;_navArray.length;i++ )
			{
				// hunt for children of the parent
				if( _navArray[i].parentId == id )
				{
					//trace( "-- found child "+_navArray[i].title+" | id = "+_navArray[i].id+" | parent = "+_navArray[i].parentId )
					// found one, now make a child
					makeChild( i, par )
				}
			}

		}

		private function findParents()
		{

			// first we need to find all unique parents
			for( var i=0;i&lt;_navArray.length;i++ )
			{
				// analyze the node... is it a top node?
				if( _navArray[i].parentId == 0 &amp;&amp; _navArray[i].title != "Uncategorized" )
				{
					//trace( "-- found parent "+_navArray[i].title )
					// create a top node container
					makeTopNode( i )
				}

			}
		}

		private function loadRpc()
		{
			_rpc = new ConnectionImpl('blogaddress/xmlrpc.php');
			_rpc.addEventListener(Event.COMPLETE, rpcCompleteHandler);
			_rpc.addEventListener(ErrorEvent.ERROR, rpcErrorHandler);
			_rpc.addParam(0, XMLRPCDataTypes.INT);  // Blog Id
			_rpc.addParam("blogusername", XMLRPCDataTypes.STRING); // Username
			_rpc.addParam("blogpassword", XMLRPCDataTypes.STRING); // Password

			getCategories()
		}

		private function getCategories():void
		{
			_rpc.call("wp.getCategories")
		}

		private function rpcCompleteHandler(evt:Event):void
		{
			var response:Object = _rpc.getResponse();
			for(var i:String in response)
			{
				// need to first grab all the top nav categories
				trace( response[i].categoryName )
				trace( response[i].htmlUrl )
				trace( response[i].parentId )
				trace( response[i].categoryId )
				trace( response[i].order )
				trace( "------------------" )
				_navArray.push( { title:response[i].categoryName, link:response[i].htmlUrl, id:response[i].categoryId, parentId:response[i].parentId, order:response[i].order } )
			}

			// Sort the array according to your category order setting in WP
			_navArray.sortOn( "order", Array.NUMERIC )

			// setup close timer
			_hideTimer = new Timer( 500, 1 );
			_hideTimer.addEventListener( TimerEvent.TIMER, hideGrandChildren );

			findParents()
			orderTop()
			checkPage()
		}

		private function rpcErrorHandler(evt:ErrorEvent):void
		{
			var fault:MethodFault = _rpc.getFault();
		}

	}
}</code></pre>
<p>Download CS4 AS3 <a href="http://www.christeso.com/labs/code/wordpressFlashNav.zip">FLA and Classes</a></p>
<p>Enjoy.</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow" id="twitter"  target="_blank" href="http://twitter.com/home?status=Wordpress%20Flash%20Navigation%20-%20http%3A%2F%2Fwww.christeso.com%2Fblog%2Findex.php%2Flab%2Fwordpress-as3-flash-navigation%2F" title="Twitter"><img src="http://www.christeso.com/blog/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="facebook"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.christeso.com%2Fblog%2Findex.php%2Flab%2Fwordpress-as3-flash-navigation%2F&amp;t=Wordpress%20Flash%20Navigation" title="Facebook"><img src="http://www.christeso.com/blog/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="digg"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.christeso.com%2Fblog%2Findex.php%2Flab%2Fwordpress-as3-flash-navigation%2F&amp;title=Wordpress%20Flash%20Navigation&amp;bodytext=lab" title="Digg"><img src="http://www.christeso.com/blog/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="del.icio.us"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.christeso.com%2Fblog%2Findex.php%2Flab%2Fwordpress-as3-flash-navigation%2F&amp;title=Wordpress%20Flash%20Navigation&amp;notes=lab" title="del.icio.us"><img src="http://www.christeso.com/blog/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="google"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.christeso.com%2Fblog%2Findex.php%2Flab%2Fwordpress-as3-flash-navigation%2F&amp;title=Wordpress%20Flash%20Navigation&amp;annotation=lab" title="Google Bookmarks"><img src="http://www.christeso.com/blog/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow" id="print"  target="_blank" href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.christeso.com%2Fblog%2Findex.php%2Flab%2Fwordpress-as3-flash-navigation%2F&amp;partner=sociable" title="Print"><img src="http://www.christeso.com/blog/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.christeso.com/blog/index.php/lab/wordpress-as3-flash-navigation/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
