<?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>Paul's Flex Bits (and stuff)</title>
	<atom:link href="http://flexbits.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://flexbits.wordpress.com</link>
	<description>One Yahoo!'s Experience With Adobe Flex</description>
	<lastBuildDate>Mon, 26 Jan 2009 21:03:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='flexbits.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Paul's Flex Bits (and stuff)</title>
		<link>http://flexbits.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://flexbits.wordpress.com/osd.xml" title="Paul&#039;s Flex Bits (and stuff)" />
	<atom:link rel='hub' href='http://flexbits.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Forcing ComboBox to use htmlText</title>
		<link>http://flexbits.wordpress.com/2009/01/26/forcing-combobox-to-use-htmltext/</link>
		<comments>http://flexbits.wordpress.com/2009/01/26/forcing-combobox-to-use-htmltext/#comments</comments>
		<pubDate>Mon, 26 Jan 2009 21:00:16 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[combobox]]></category>
		<category><![CDATA[htmltext]]></category>

		<guid isPermaLink="false">http://flexbits.wordpress.com/?p=18</guid>
		<description><![CDATA[If your datasource values are in html format (I use &#60;b&#62;&#60;/b&#62; frequently to provide simple formatting and highlighting), you can simply force the textInput control that handles the display of the selected item text to use its htmlText field. override protected function updateDisplayList(w:Number, h:Number):void { &#160;&#160;&#160;&#160;&#160;super.updateDisplayList(w, unscaledHeight); &#160;&#160;&#160;&#160;&#160;// force use of htmlText &#160;&#160;&#160;&#160;&#160;textInput.htmlText = selectedLabel; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flexbits.wordpress.com&amp;blog=3671160&amp;post=18&amp;subd=flexbits&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If your datasource values are in html format (I use &lt;b&gt;&lt;/b&gt; frequently to provide simple formatting and highlighting), you can simply force the textInput control that handles the display of the selected item text to use its htmlText field.<br />
<code><br />
override protected function updateDisplayList(w:Number, h:Number):void<br />
{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;super.updateDisplayList(w, unscaledHeight);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// force use of htmlText<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;textInput.htmlText = selectedLabel;<br />
}<br />
</code><br />
Not a completely robust solution, but it works nicely for me.  Occasionally I&#8217;ll use this with a custom list item renderer that does the same thing.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/flexbits.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/flexbits.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/flexbits.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/flexbits.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/flexbits.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/flexbits.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/flexbits.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/flexbits.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/flexbits.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/flexbits.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/flexbits.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/flexbits.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/flexbits.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/flexbits.wordpress.com/18/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flexbits.wordpress.com&amp;blog=3671160&amp;post=18&amp;subd=flexbits&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://flexbits.wordpress.com/2009/01/26/forcing-combobox-to-use-htmltext/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">pcameron41</media:title>
		</media:content>
	</item>
		<item>
		<title>Simple Flex Number Formatting</title>
		<link>http://flexbits.wordpress.com/2008/09/04/simple-flex-number-formatting/</link>
		<comments>http://flexbits.wordpress.com/2008/09/04/simple-flex-number-formatting/#comments</comments>
		<pubDate>Thu, 04 Sep 2008 14:52:46 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[NumberBase]]></category>
		<category><![CDATA[NumberBase.formatPrecision()]]></category>
		<category><![CDATA[NumberBase.formatThousands()]]></category>
		<category><![CDATA[NumberFormatter]]></category>

		<guid isPermaLink="false">http://flexbits.wordpress.com/?p=14</guid>
		<description><![CDATA[I&#8217;m sure this is something that most Flex developers know all about, but I was (as usual) going down the wrong rabbit hole (NumberFormatter) before I discovered NumberBase. What I wanted was to get a number formatted like &#8220;x,xxx.xx&#8221;. I want two decimal points at all times, even when they would be zero (eg. 1,234.00). [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flexbits.wordpress.com&amp;blog=3671160&amp;post=14&amp;subd=flexbits&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m sure this is something that most Flex developers know all about, but I was (as usual) going down the wrong rabbit hole (<code>NumberFormatter</code>) before I discovered <code>NumberBase</code>.</p>
<p>What I wanted was to get a number formatted like &#8220;x,xxx.xx&#8221;.  I want two decimal points at all times, even when they would be zero (eg. 1,234.00).</p>
<p>As I mentioned, I found <code><a href="http://livedocs.adobe.com/flex/3/langref/mx/formatters/NumberBase.html">NumberBase</a></code>, which has all sorts of cool number formatting and parsing functions.</p>
<p><a href="http://livedocs.adobe.com/flex/3/langref/mx/formatters/NumberBase.html#formatThousands()"><code>NumberBase.formatThousands()</code></a> provides the commas for the thousands, and I&#8217;m using <code><a href="http://livedocs.adobe.com/flex/3/langref/mx/formatters/NumberBase.html#formatPrecision()">NumberBase.formatPrecision()</a> </code>to add the decimal points:</p>
<p><code>var b:NumberBase = new NumberBase();<br />
return b.formatPrecision(b.formatThousands(team.pointsTotal.toString()), 2);</code></p>
<p>I would imagine that this tip applies best to places where you are formatting numbers in ActionScript (as opposed to MXML)</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/flexbits.wordpress.com/14/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/flexbits.wordpress.com/14/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/flexbits.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/flexbits.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/flexbits.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/flexbits.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/flexbits.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/flexbits.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/flexbits.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/flexbits.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/flexbits.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/flexbits.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/flexbits.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/flexbits.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/flexbits.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/flexbits.wordpress.com/14/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flexbits.wordpress.com&amp;blog=3671160&amp;post=14&amp;subd=flexbits&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://flexbits.wordpress.com/2008/09/04/simple-flex-number-formatting/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">pcameron41</media:title>
		</media:content>
	</item>
		<item>
		<title>Flex Builder: An internal build error has occurred</title>
		<link>http://flexbits.wordpress.com/2008/07/16/flex-builder-an-internal-build-error-has-occurred/</link>
		<comments>http://flexbits.wordpress.com/2008/07/16/flex-builder-an-internal-build-error-has-occurred/#comments</comments>
		<pubDate>Wed, 16 Jul 2008 14:23:50 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[switch]]></category>

		<guid isPermaLink="false">http://flexbits.wordpress.com/?p=9</guid>
		<description><![CDATA[So this error caused me some wasted time yesterday. I was happily coding away, most likely listening to some old school gangsta rap (cause I keeps it real), when this uninformative error stopped me in my tracks. &#8220;An internal build error has occurred. Right-click for more information&#8221; So I decided to play along. I right-clicked [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flexbits.wordpress.com&amp;blog=3671160&amp;post=9&amp;subd=flexbits&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So this error caused me some wasted time yesterday.  I was happily coding away, most likely listening to some old school gangsta rap (cause I keeps it real), when this uninformative error stopped me in my tracks.</p>
<p>&#8220;An internal build error has occurred.  Right-click for more information&#8221;</p>
<p>So I decided to play along.  I right-clicked and selected &#8220;More Information&#8221; from the context menu.  This opened up a web page <a href="http://learn.adobe.com/wiki/display/Flex/Flex+Builder+3+Compiler+Errors" target="_blank">describing how to get more information about Flex Builder errors</a>.</p>
<p>Here&#8217;s where I made my mistake.  I decided to read the top portion of that page and followed the instructions to view the specific error in the Flex Builder logs.  I chased the error down that particular rabbit hole for quite some time.</p>
<p>What I should have done was noticed the little &#8220;Common Errors&#8221; section talking about ASC-2839.</p>
<p>Evidently there&#8217;s a Flex Builder bug that throws this wonderful error when you have an empty switch statement.  Of course, that&#8217;s exactly what I had.<br />
<code><br />
				switch(event.kind)<br />
				{<br />
				}<br />
</code></p>
<p>So kids, don&#8217;t do what Donny Don&#8217;t does.  Had I read the entire &#8220;More Information&#8221; page before plowing headlong down the first path presented, I would have saved quite a bit of time. </p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/flexbits.wordpress.com/9/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/flexbits.wordpress.com/9/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/flexbits.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/flexbits.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/flexbits.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/flexbits.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/flexbits.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/flexbits.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/flexbits.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/flexbits.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/flexbits.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/flexbits.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/flexbits.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/flexbits.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/flexbits.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/flexbits.wordpress.com/9/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flexbits.wordpress.com&amp;blog=3671160&amp;post=9&amp;subd=flexbits&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://flexbits.wordpress.com/2008/07/16/flex-builder-an-internal-build-error-has-occurred/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">pcameron41</media:title>
		</media:content>
	</item>
		<item>
		<title>Flex Binding Chains</title>
		<link>http://flexbits.wordpress.com/2008/06/20/flex-binding-chains/</link>
		<comments>http://flexbits.wordpress.com/2008/06/20/flex-binding-chains/#comments</comments>
		<pubDate>Fri, 20 Jun 2008 21:01:29 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[binding]]></category>
		<category><![CDATA[component]]></category>
		<category><![CDATA[databinding]]></category>

		<guid isPermaLink="false">http://flexbits.wordpress.com/?p=8</guid>
		<description><![CDATA[I recently had an issue where I could not get binding in one of my custom components to work. I was simply testing some things out and has a label tag bound to the length property on one of my data model objects. The problem was that the text was not being updated. &#60; mx:Label [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flexbits.wordpress.com&amp;blog=3671160&amp;post=8&amp;subd=flexbits&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I recently had an issue where I could not get binding in one of my custom components to work.  I was simply testing some things out and has a label tag bound to the length property on one of my data model objects.  The problem was that the text was not being updated.</p>
<pre>&lt; mx:Label text='{obj.anotherObject.yetAnotherObject.length}' /&gt;</pre>
<p>I initially thought that it might be due to the fact that this object was inherited and the bindable stuff was in the parent class, but it didn&#8217;t change when I moved the stuff into the class itself.  Next up, blame it on the fact that it was a custom binding job with a read only property:</p>
<pre>[Bindable("lengthChanged")]
public function get length():int
{
     return _length;
}

private function addObject(obj:Object, id:String):void
{
     _objects[id] = obj;
     _length++;
     dispatchEvent(new Event("lengthChanged"));
}</pre>
<p>(Or something like that, the code has since changed).</p>
<p>This too turned out to be not the case.  I changed the property to be a simple public variable on a [Bindable] class.  No joy.</p>
<p>I finally figured out that I had to cast the second to last value in the property chain to its proper type.  This allowed the compiler to pick up the proper events and add the proper event listeners (or whatever other data binding voodoo that it does).</p>
<pre>&lt; mx:Label text='{YetAnotherObjectType(obj.anotherObject.yetAnotherObject).length}' /&gt;</pre>
<p>Works like a charm.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/flexbits.wordpress.com/8/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/flexbits.wordpress.com/8/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/flexbits.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/flexbits.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/flexbits.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/flexbits.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/flexbits.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/flexbits.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/flexbits.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/flexbits.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/flexbits.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/flexbits.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/flexbits.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/flexbits.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/flexbits.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/flexbits.wordpress.com/8/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flexbits.wordpress.com&amp;blog=3671160&amp;post=8&amp;subd=flexbits&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://flexbits.wordpress.com/2008/06/20/flex-binding-chains/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">pcameron41</media:title>
		</media:content>
	</item>
		<item>
		<title>Controlling Flex swf Size via Judicious Font Embedding</title>
		<link>http://flexbits.wordpress.com/2008/05/12/controlling-flex-swf-size-via-judicious-font-embedding/</link>
		<comments>http://flexbits.wordpress.com/2008/05/12/controlling-flex-swf-size-via-judicious-font-embedding/#comments</comments>
		<pubDate>Mon, 12 May 2008 19:07:11 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[Flex flash swf font embed unicodeRange]]></category>

		<guid isPermaLink="false">http://flexbits.wordpress.com/?p=5</guid>
		<description><![CDATA[Embedding fonts in your application can quickly cause your swf to balloon in size.  When it simply cannot be avoided, you can try to limit the damage by only embedding the glyphs (characters) that you plan on actually displaying in your application. For example, in my current application, we needed a countdown clock.  The designers [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flexbits.wordpress.com&amp;blog=3671160&amp;post=5&amp;subd=flexbits&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Embedding fonts in your application can quickly cause your swf to balloon in size.  When it simply cannot be avoided, you can try to limit the damage by only embedding the glyphs (characters) that you plan on actually displaying in your application.</p>
<p>For example, in my current application, we needed a countdown clock.  The designers were kind enough to send me a cool scoreboard font, and I embedded it in the app.</p>
<p><code>@font-face {<br />
src:url("../fonts/scoreboard.ttf");<br />
fontFamily: scoreboard;<br />
fontWeight: normal;<br />
unicodeRange: U+0030-U+003A;<br />
}</code></p>
<p>By simply adding that <code>unicodeRange</code> value, I was able to decrease the size of my compile swf by 24k.  Not the largest of differences, but when you are embedding multiple fonts, the differences can add up fairly quickly.</p>
<p>What happened there?  Well, we told the Flex compiler to only include the glyphs between 0030 and 003A.  0030 &#8211; 0039 are the digits 0-9 while, luckily for us, 003A is the colon character.  Those are the only glyphs that we need for our ticker.</p>
<p>You can find complete lists of unicode codes at the <a href="http://www.unicode.org/charts/" target="_blank">Unicode web site</a>.  As well, <a href="http://livedocs.adobe.com/flex/3/html/help.html?content=fonts_07.html" target="_blank">Adobe livedocs</a> has an article with a few more useful ranges listed and more information on <code>unicodeRange</code>.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/flexbits.wordpress.com/5/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/flexbits.wordpress.com/5/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/flexbits.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/flexbits.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/flexbits.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/flexbits.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/flexbits.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/flexbits.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/flexbits.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/flexbits.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/flexbits.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/flexbits.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/flexbits.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/flexbits.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/flexbits.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/flexbits.wordpress.com/5/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flexbits.wordpress.com&amp;blog=3671160&amp;post=5&amp;subd=flexbits&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://flexbits.wordpress.com/2008/05/12/controlling-flex-swf-size-via-judicious-font-embedding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">pcameron41</media:title>
		</media:content>
	</item>
		<item>
		<title>Adobe&#8217;s new Flash socket policy rules</title>
		<link>http://flexbits.wordpress.com/2008/05/07/adobes-new-flash-socket-policy-rules/</link>
		<comments>http://flexbits.wordpress.com/2008/05/07/adobes-new-flash-socket-policy-rules/#comments</comments>
		<pubDate>Wed, 07 May 2008 21:37:39 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[crossdomain.xml]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[flash player]]></category>
		<category><![CDATA[policy]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[socket]]></category>

		<guid isPermaLink="false">http://flexbits.wordpress.com/?p=3</guid>
		<description><![CDATA[With the release of Flash Player 9,0,124, Adobe has decided to change the way that socket policy files are handled. They have put together a 7 page article that gives an overview of the issue, but does not really provide enough specific information to let you solve the problem. The product on which I am [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flexbits.wordpress.com&amp;blog=3671160&amp;post=3&amp;subd=flexbits&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>With the release of Flash Player 9,0,124, Adobe has decided to change the way that socket policy files are handled.  They have put together a <a href="http://www.adobe.com/devnet/flashplayer/articles/fplayer9_security.html" target="_blank">7 page article</a> that gives an overview of the issue, but does not really provide enough specific information to let you solve the problem.</p>
<p>The product on which I am currently working uses a socket server on the back end.  The client is in constant communication with this server (we also use a crossdomain.xml to allow us to access web services, but that stuff hasn&#8217;t changed).</p>
<p>Prior to the latest Flash player, we could simply serve a crossdomain.xml via a web server on port 80 and that would allow the client to connect on the socket that we specified.  As of the upgrade, this no longer works.</p>
<p>After reading through the limited info that we could find about this upgrade, we finally figured out what our problem was; <strong>in order for a socket policy file to work, it must be served via a socket server</strong> (as opposed to an HTTP server).  If a policy file is served via HTTP, it only works to allow HTTP requests (like <code>HTTPService</code>).</p>
<p>There was repeated mention of a policy socket server in the Adobe article, but there were no concrete examples.  So one of our backend types (thanks Dave) whipped one up.  It works like a charm.  Basically, this server spews out the XML content of a socket policy file (think crossdomain.xml) whenever a client connects to it.</p>
<p>I&#8217;m using <code>Security.loadPolicyFile('xmlsocket://' + serverName + ':' + socketPolicyPort);</code> to load the policy info in my client.  This is required because we are not using the Adobe &#8220;standard&#8221; of serving these policies on port 843 which would allow the client to automatically load the policy without explicit code in the client.</p>
<p>The contents of the policy data served looks like this:<br />
<code><br />
&lt;?xml version="1.0" encoding="UTF-8"?&gt;<br />
&lt;cross-domain-policy xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.adobe.com/xml/schemas/PolicyFileSocket.xsd"&gt;<br />
&lt;allow-access-from domain="[redacted]" to-ports="[redacted]" secure="false"/&gt;<br />
&lt;/cross-domain-policy&gt;<br />
</code><br />
The <code>allow-access-from</code> line is where you make your money.  The <code>from</code> attribute specifies that this line applies to swfs served from these locations (*.yourdomain.com for example).  The <code>to-ports</code> attribute lists the port(s) on this server that you will allow access to.  You can specify &#8220;7400&#8243;, &#8220;7500, 7502&#8243; or &#8220;7600-7610&#8243;.  You can even get crazy and specify &#8220;7700, 7702, 7800-7820&#8243;.  I&#8217;m pretty sure the <code>secure</code> attribute is only used for HTTP policy files, but we still have it there because it makes us happy (and because we totally cut and pasted this from our old HTTP crossdomain.xml).</p>
<p>Hope this helps.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/flexbits.wordpress.com/3/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/flexbits.wordpress.com/3/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/flexbits.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/flexbits.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/flexbits.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/flexbits.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/flexbits.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/flexbits.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/flexbits.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/flexbits.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/flexbits.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/flexbits.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/flexbits.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/flexbits.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/flexbits.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/flexbits.wordpress.com/3/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flexbits.wordpress.com&amp;blog=3671160&amp;post=3&amp;subd=flexbits&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://flexbits.wordpress.com/2008/05/07/adobes-new-flash-socket-policy-rules/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">pcameron41</media:title>
		</media:content>
	</item>
	</channel>
</rss>
