<?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>ActionScript 3 Lover &#187; component</title>
	<atom:link href="http://as3blog.com/tag/component/feed/" rel="self" type="application/rss+xml" />
	<link>http://as3blog.com</link>
	<description>Focus on ActionScript 3</description>
	<lastBuildDate>Thu, 19 Nov 2009 04:51:08 +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 Builder中使用Flash CS3组件</title>
		<link>http://as3blog.com/as3/how-to-compile-v3-in-flex-without-fla-files/</link>
		<comments>http://as3blog.com/as3/how-to-compile-v3-in-flex-without-fla-files/#comments</comments>
		<pubDate>Fri, 06 Feb 2009 11:35:36 +0000</pubDate>
		<dc:creator>Aw</dc:creator>
				<category><![CDATA[ActionScript3]]></category>
		<category><![CDATA[component]]></category>
		<category><![CDATA[flash cs3]]></category>
		<category><![CDATA[flex builder]]></category>

		<guid isPermaLink="false">http://as3blog.com/as3/how-to-compile-v3-in-flex-without-fla-files/</guid>
		<description><![CDATA[经过我的多次测试，发现直接引用Flash的SWC包只能获得相应的代码提示，并不能完全解决纯Flex Builder编译的问题。因此，如果你想彻底抛弃FLA，又希望能用Flash CS3的组件，必须先在Flash CS3中导出一个SWC，再将这个SWC引入到Flex的Library Path中。这种解决方案来自大名鼎鼎的moockblog同学：）
As a simple example, let&#8217;s assume we want to use the V3 TextArea component in Flex Builder. Here&#8217;s the general process we follow:
1) Create a .swc file containing the desired V3 components.      2) Add the .swc file from Step 1 to the Flex Builder project&#8217;s Library [...]]]></description>
			<content:encoded><![CDATA[<p>经过我的多次测试，发现直接引用Flash的SWC包只能获得相应的代码提示，并不能完全解决纯Flex Builder编译的问题。因此，如果你想彻底抛弃FLA，又希望能用Flash CS3的组件，必须先在Flash CS3中导出一个SWC，再将这个SWC引入到Flex的Library Path中。这种解决方案来自大名鼎鼎的<a href="http://www.moock.org/blog/">moockblog</a>同学：）</p>
<blockquote><p>As a simple example, let&#8217;s assume we want to use the V3 TextArea component in Flex Builder. Here&#8217;s the general process we follow:</p>
<p>1) Create a .swc file containing the desired V3 components.      <br />2) Add the .swc file from Step 1 to the Flex Builder project&#8217;s Library path.       <br />3) Import and use the component classes.</p>
<p>To generate the .swc file in Flash CS3, we follow these steps:</p>
<p>1) Make a new Flash CS3 ActionScript 3.0 .fla file.      <br />2) Drag the desired component(s) to the Library. In this example, we&#8217;ll drag the TextArea component to the Library.       <br />3) Choose File &gt; Export &gt; Export Movie.       <br />4) For File name, enter v3components.swf. (We don&#8217;t even want the generated .swf, but there&#8217;s no other way to get the .swc to compile.)       <br />5) Select a folder in which to save the .swf file.       <br />6) Click Save.       <br />7) In the Export Flash Player dialog, check Export SWC.       <br /> <img src='http://as3blog.com/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> Click OK.</p>
<p>The preceding steps generate two files, v3components.swf and v3components.swc, both of which are placed in the folder selected in Step 5.</p>
<p>Now let&#8217;s use v3components.swc in a Flex Builder project. Follow these steps:</p>
<p>1) In Flex Builder, select File &gt; New &gt; ActionScript Project.      <br />2) For Project name, enter &quot;V3Test.as&quot;.       <br />3) Click Next.       <br />4) For Main source folder, enter &quot;src&quot;.       <br />5) For Main application file, enter &quot;V3Test.as&quot;.       <br />6) On the Library path tab, click Add SWC.       <br />7) Browse to the v3components.swc file from the preceding procedure.       <br /> <img src='http://as3blog.com/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> Click Finish.       <br />9) Update the code in V3Test.as so it looks like this:</p>
<pre>package {
  import flash.display.Sprite;
  import fl.controls.TextArea;
  public class V3Test extends Sprite {
    public function V3Test() {
      var t:TextArea = new TextArea();
      t.text = &quot;You're not cookin'&quot;;
      addChild(t);
    }
  }
}</pre>
<p>10) Run the project.</p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://as3blog.com/as3/how-to-compile-v3-in-flex-without-fla-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
