<?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>Brady White &#187; compiled css</title>
	<atom:link href="http://www.bradywhite.net/tag/compiled-css/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bradywhite.net</link>
	<description>Adobe Flex/Flash and Life</description>
	<lastBuildDate>Tue, 18 May 2010 15:49:13 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Flex 3 &#8211; How to load a  complied css swf</title>
		<link>http://www.bradywhite.net/2008/05/05/flex-3-how-to-load-a-complied-css-swf/</link>
		<comments>http://www.bradywhite.net/2008/05/05/flex-3-how-to-load-a-complied-css-swf/#comments</comments>
		<pubDate>Mon, 05 May 2008 15:25:26 +0000</pubDate>
		<dc:creator>Brady White</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[compiled css]]></category>
		<category><![CDATA[swf]]></category>

		<guid isPermaLink="false">http://bradywhite.net/?p=69</guid>
		<description><![CDATA[When attempting to load external compiled css swfs that have an embedded font into my flex application I was getting this error: Unable to load style(SWF is not a loadable module).  This is reported as an official bug on adobe's site at:  <a href="http://bugs.adobe.com/jira/browse/SDK-15393">Enable Local App to load RunTime CSS.swf from Server</a>

To solve this, you require two things.
<ol>
	<li>Crossdomain Policy</li>
	<li>Local Apache Web Server</li>
</ol>

Regardless if this is a bug, the host server still needs a crossdomain policy at the root of the domain.  Here's an <a href="http://curtismorley.com/2007/09/01/flash-flex-tutorial-how-to-create-a-crossdomainxml-file/">example crossdomain.xml policy</a>.

The next problem is that you cannot load external compiled swfs from a
document root (c:/my documents/flex projects/myProject/myProject.html) until the bug is fixed.

<strong>PC Users:</strong>
What I did is installed <a href="http://www.easyphp.org/index.php">easyphp</a>.  Next, I set up an alias in easyphp to my bin folder so that when I access the url http://127.0.0.1/myProject/myProject.html it loads up my bin
directory.  Also in my debug settings in flex I set the default debug and run path to launch as http://127.0.0.1/myProject/myProject.html.

Now my css/style swfs are loading great remotely.  The only downside is having to run easyphp on top of everything just to load in my external compiled font swfs.

<strong>Mac Users:</strong>
<i>Thanks to <a href="http://www.barrand.net">Bryce Barrand</a></i>
<ul>
<li> go to system preferences</li>
<li> click on sharing</li>
<li> click on "web sharing" (this will turn on the automatically installed version of apache)</li>
<li> edit apache's httpd.conf file (should be found at disk/private/etc/apache2/httpd.conf)</li>
<li> Find the line that says /Directory>
<li> Just after that, add an Alias for each project that you want to test such as this:

Alias /nameOfAlias /pathToYourFlexBinFolder</li>

<li>Set your directory node attribute to "/pathToYourFlexBinFolder".  Set the directory node value to:


   Options Indexes FollowSymLinks MultiViews<br />
    AllowOverride None<br />
    Order allow,deny<br />
    Allow from all<br /></li>

<li>Restart the webserver by unchecking and rechecking the "web sharing"  checkbox</li>
</li></ul>
should be good to go after this. you can see the results by going to http://localhost/nameOfAlias in your browser <br />]]></description>
			<content:encoded><![CDATA[<p>When attempting to load external compiled css swfs that have an embedded font into my flex application I was getting this error: Unable to load style(SWF is not a loadable module).  This is reported as an official bug on adobe&#8217;s site at:  <a href="http://bugs.adobe.com/jira/browse/SDK-15393">Enable Local App to load RunTime CSS.swf from Server</a></p>
<p>To solve this, you require two things.</p>
<ol>
<li>Crossdomain Policy</li>
<li>Local Apache Web Server</li>
</ol>
<p>Regardless if this is a bug, the host server still needs a crossdomain policy at the root of the domain.  Here&#8217;s an <a href="http://curtismorley.com/2007/09/01/flash-flex-tutorial-how-to-create-a-crossdomainxml-file/">example crossdomain.xml policy</a>.</p>
<p>The next problem is that you cannot load external compiled swfs from a<br />
document root (c:/my documents/flex projects/myProject/myProject.html) until the bug is fixed.</p>
<p><strong>PC Users:</strong><br />
What I did is installed <a href="http://www.easyphp.org/index.php">easyphp</a>.  Next, I set up an alias in easyphp.  Right click on the &#8216;easyphp&#8217; icon in the taskbar -> administration.  I set the alias to my bin folder of my project so that when I access the url http://127.0.0.1/myProject/myProject.html it loads up my bin directory.  Also in my debug settings in flex I set the default debug and run path to launch as http://127.0.0.1/myProject/myProject.html.</p>
<p>Now my css/style swfs are loading great remotely.  The only downside is having to run easyphp on top of everything just to load in my external compiled font swfs.</p>
<p><strong>Mac Users:</strong><br />
<i>Thanks to <a href="http://www.barrand.net">Bryce Barrand</a></i></p>
<ul>
<li> go to system preferences</li>
<li> click on sharing</li>
<li> click on &#8220;web sharing&#8221; (this will turn on the automatically installed version of apache)</li>
<li> edit apache&#8217;s httpd.conf file (should be found at disk/private/etc/apache2/httpd.conf)</li>
<li> Find the line that says /Directory>
<li> Just after that, add an Alias for each project that you want to test such as this:
<p>Alias /nameOfAlias /pathToYourFlexBinFolder</li>
<li>Set your directory node attribute to &#8220;/pathToYourFlexBinFolder&#8221;.  Set the directory node value to:
<p>   Options Indexes FollowSymLinks MultiViews<br />
    AllowOverride None<br />
    Order allow,deny<br />
    Allow from all</li>
<li>Restart the webserver by unchecking and rechecking the &#8220;web sharing&#8221;  checkbox</li>
</li>
</ul>
<p>should be good to go after this. you can see the results by going to http://localhost/nameOfAlias in your browser </p>
]]></content:encoded>
			<wfw:commentRss>http://www.bradywhite.net/2008/05/05/flex-3-how-to-load-a-complied-css-swf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
