<?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>Flex Examples &#187; Compiler</title>
	<atom:link href="http://blog.flexexamples.com/category/compiler/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Wed, 26 Jan 2011 18:09:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Using the Halo theme in Flex 4</title>
		<link>http://blog.flexexamples.com/2009/07/14/using-the-halo-theme-in-flex-4/</link>
		<comments>http://blog.flexexamples.com/2009/07/14/using-the-halo-theme-in-flex-4/#comments</comments>
		<pubDate>Wed, 15 Jul 2009 06:55:58 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[beta1]]></category>
		<category><![CDATA[Compiler]]></category>
		<category><![CDATA[Flex Builder]]></category>
		<category><![CDATA[Gumbo]]></category>
		<category><![CDATA[theme]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/?p=1198</guid>
		<description><![CDATA[<p>The following example shows how you can set the Halo controls to use the old Halo skins instead of the new Spark skins in Flex 4 by setting the -theme compiler option to the Halo theme (halo.swc).</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="">View MXML</a></p> &#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62; &#60;!-- http://blog.flexexamples.com/2009/07/14/using-the-halo-theme-in-flex-4/ --&#62; &#60;s:Application name=&#34;Spark_Halo_theme_test&#34; [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can set the Halo controls to use the old Halo skins instead of the new Spark skins in Flex 4 by setting the -theme compiler option to the Halo theme (halo.swc).</p>
<p>Full code after the jump.</p>
<p><span id="more-1198"></span></p>
<p class="alert">The following example(s) require Flash Player 10 and the Adobe Flex 4 SDK. To download the Adobe Flash Builder 4 trial, see <a href="http://bit.ly/crThlI">http://www.adobe.com/products/flex/</a>. To download the latest nightly build of the Flex 4 SDK, see <a href="http://bit.ly/Flex4SDK">http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4</a>.<br/><strong>For more information on getting started with Flex 4 and Flash Builder 4, see the official <a href="http://bit.ly/dCkecm">Adobe Flex Team blog</a>.</strong></p>
<p class="download"><a href="">View MXML</a></p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2009/07/14/using-the-halo-theme-in-flex-4/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> name=<span style="color: #ff0000;">&quot;Spark_Halo_theme_test&quot;</span></span>
<span style="color: #000000;">        xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span></span>
<span style="color: #000000;">        xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span></span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/halo&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:VGroup</span> horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> verticalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Button</span> id=<span style="color: #ff0000;">&quot;sBtn&quot;</span></span>
<span style="color: #000000;">                label=<span style="color: #ff0000;">&quot;I'm a Spark Button&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Button</span> id=<span style="color: #ff0000;">&quot;hBtn&quot;</span></span>
<span style="color: #000000;">                label=<span style="color: #ff0000;">&quot;I'm a Halo Button&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:VGroup</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p>Finally, you need to change your Flex compiler arguments to use the halo.swc theme:<br />
1) In Flash Builder 4, select Project &gt; Properties from the main menu.<br />
2) Select <em>Flex Compiler</em> from the left menu.<br />
3) In the <em>Additional compiler arguments</em> text field, add the following argument:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">-theme=${flexlib}/themes/Halo/halo.swc</pre></div></div>

<p>4) Click the OK button to apply the changes and close the dialog box.<br />
5) Recompile and run the application.</p>
<p class="alert">This entry is based on a beta version of the Flex 4 SDK and therefore is very likely to change as development of the Flex SDK continues. The API can (and will) change causing examples to possibly not compile in newer versions of the Flex 4 SDK.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Using the Halo theme in Flex 4 on FlexExamples.com',url: 'http://blog.flexexamples.com/2009/07/14/using-the-halo-theme-in-flex-4/',contentID: 'post-1198',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'Gumbo,theme',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2009/07/14/using-the-halo-theme-in-flex-4/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Using a custom flex-config.xml file in Flex Builder 3</title>
		<link>http://blog.flexexamples.com/2008/12/21/using-a-custom-flex-configxml-file-in-flex-builder-3/</link>
		<comments>http://blog.flexexamples.com/2008/12/21/using-a-custom-flex-configxml-file-in-flex-builder-3/#comments</comments>
		<pubDate>Sun, 21 Dec 2008 20:19:49 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[Compiler]]></category>
		<category><![CDATA[Flex Builder]]></category>
		<category><![CDATA[Flex Builder 3]]></category>
		<category><![CDATA[Fonts]]></category>
		<category><![CDATA[flex config.xml]]></category>
		<category><![CDATA[load config]]></category>
		<category><![CDATA[unicodeRange]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/12/21/using-a-custom-flex-configxml-file-in-flex-builder-3/</guid>
		<description><![CDATA[<p>The following example shows how you can use a custom configuration file in a Flex Builder Flex project by specifying an additional compiler argument, -load-config.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/LoadConfig_fonts_test/bin/srcview/source/main.mxml.html">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2008/12/21/using-a-custom-flex-configxml-file-in-flex-builder-3/ --&#62; &#60;mx:Application name="LoadConfig_fonts_test" xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white"&#62; &#60;mx:Style&#62; @font-face { src: url("assets/ARIAL.TTF"); fontFamily: "ArialEmbedded"; unicodeRange: [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can use a custom configuration file in a Flex Builder Flex project by specifying an additional compiler argument, <code>-load-config</code>.</p>
<p>Full code after the jump.</p>
<p><span id="more-908"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/LoadConfig_fonts_test/bin/srcview/source/main.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/12/21/using-a-custom-flex-configxml-file-in-flex-builder-3/ --&gt;
&lt;mx:Application name="LoadConfig_fonts_test"
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Style&gt;
        @font-face {
            src: url("assets/ARIAL.TTF");
            fontFamily: "ArialEmbedded";
            unicodeRange: "englishRange";
        }

        Text {
            fontFamily: "ArialEmbedded";
            fontSize: 32;
            color: red;
        }
    &lt;/mx:Style&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Form styleName="plain"&gt;
            &lt;mx:FormItem label="alpha:"&gt;
                &lt;mx:HSlider id="slider"
                        minimum="0.0"
                        maximum="1.0"
                        value="1.0"
                        snapInterval="0.05"
                        tickInterval="0.1"
                        liveDragging="true" /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:Text id="txt" width="300" alpha="{slider.value}"&gt;
        &lt;mx:text&gt;The quick brown fox jumps over the lazy dog. 1234567890 &#x00A9;&lt;/mx:text&gt;
    &lt;/mx:Text&gt;

&lt;/mx:Application&gt;
</pre>
<p>Next, create a custom configuration XML file named fontConfig.xml and save it in a /config/ subdirectory in your project&#8217;s /src/ directory. The folder structure isn&#8217;t important, but it helps keep the source code and configuration files separated. The fontConfig.xml file is a modified version of the flex-config.xml file found in the Flex SDK&#8217;s /frameworks/ directory. In this example we simply specify a single named font range which specifies a unicode range of U+0020 (<em>space</em>) to U+007E (~).</p>
<p class="download"><a href="">config/fontConfig.xml</a></p>
<pre class="code">
&lt;?xml version="1.0"?&gt;
&lt;flex-config&gt;
   &lt;compiler&gt;
      &lt;fonts&gt;
          &lt;!-- Defines ranges that can be used across multiple font-face declarations. --&gt;
          &lt;!-- See flash-unicode-table.xml for more examples. --&gt;
          &lt;languages&gt;
              &lt;language-range&gt;
                  &lt;lang&gt;englishRange&lt;/lang&gt;
                  &lt;range&gt;U+0020-U+007E&lt;/range&gt;
              &lt;/language-range&gt;
          &lt;/languages&gt;
      &lt;/fonts&gt;
   &lt;/compiler&gt;
&lt;/flex-config&gt;
</pre>
<p>Finally, in Flex Builder, right click on the Flex Project folder in the Flex Navigator and select Properties from the context menu. Select the Flex Compiler section of the dialog menu and in the <em>Additional compiler arguments:</em> text box add the following text:</p>
<blockquote><p>
-load-config+=config/fontConfig.xml
</p></blockquote>
<p><img src="http://blog.flexexamples.com/wp-content/uploads/LoadConfig_fonts_test/Figure1.jpg" /><br />
<strong>Figure 1.</strong> Additional compiler arguments.</p>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/LoadConfig_fonts_test/bin/srcview/">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/LoadConfig_fonts_test/bin/main.html" width="100%" height="250"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Using a custom flex-config.xml file in Flex Builder 3 on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/12/21/using-a-custom-flex-configxml-file-in-flex-builder-3/',contentID: 'post-908',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'flex config.xml,load config,unicodeRange',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2008/12/21/using-a-custom-flex-configxml-file-in-flex-builder-3/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Viewing a Flex application&#8217;s generated source code</title>
		<link>http://blog.flexexamples.com/2008/08/02/viewing-a-flex-applications-generated-source-code/</link>
		<comments>http://blog.flexexamples.com/2008/08/02/viewing-a-flex-applications-generated-source-code/#comments</comments>
		<pubDate>Sat, 02 Aug 2008 08:55:26 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[Compiler]]></category>
		<category><![CDATA[Flex 3 SDK]]></category>
		<category><![CDATA[Flex Builder 3]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/08/02/viewing-a-flex-applications-generated-source-code/</guid>
		<description><![CDATA[<p>The following example shows how you can view a Flex application&#8217;s generated source code by adding the -keep compiler argument in Flex Builder.</p> <p>To add a compiler argument in Flex Builder, launch the Project Properties dialog box by selecting Project &#62; Properties from the main menu, select the Flex Compiler option from the left menu, [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can view a Flex application&#8217;s generated source code by adding the <code>-keep</code> compiler argument in Flex Builder.</p>
<p>To add a compiler argument in Flex Builder, launch the Project Properties dialog box by selecting Project &gt; Properties from the main menu, select the <em>Flex Compiler</em> option from the left menu, and type &#8220;-keep&#8221; at the end of the <em>Additional compiler arguments</em> text input field (see Figure 1).</p>
<p><img src="http://blog.flexexamples.com/wp-content/uploads/Flex_generated_test/screenshot-1.gif" alt="Flex Builder Project Properties dialog box" border="0" /><br />
<strong><em>Figure 1. Flex Builder Project Properties dialog box.</em></strong></p>
<p>Full code after the jump.</p>
<p><span id="more-726"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/Flex_generated_test/bin/srcview/source/main.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/08/02/viewing-a-flex-applications-generated-source-code/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Label text="Right click this Flex application and select 'View Source' to view generated source code." /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/Flex_generated_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/Flex_generated_test/bin/main.html" width="100%" height="100"></iframe></p>
<p class="alert">The generated source code will appear in a /generated/ folder within the Flex Builder project&#8217;s /src/ folder. If your MXML file was named main.mxml, the generated file could be found at /generated/main-generated.as.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Viewing a Flex application\&#039;s generated source code on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/08/02/viewing-a-flex-applications-generated-source-code/',contentID: 'post-726',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: '',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2008/08/02/viewing-a-flex-applications-generated-source-code/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

