`
txf2004
  • 浏览: 6867638 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

【Flex CookBook】在FB3中发布工程的源代码

阅读更多

FB3中发布工程的源代码

by peterd_mm on February 20, 2008

Tagged with

Moxie beta , Flex and other technologies

问题摘要

你想要通过FB3发布工程的源代码,这样用户在浏览程序的时候就可以通过右击查看源代码菜单来获得你的源代码

解决摘要

FB2中,如果你要发布源代码你可以通过选择工程主菜单》发布程序源代码

解释

你对通过以下方法来发布你的工程的源代码

在主菜单中选择 工程>导出现有版本

在主菜单中选择 文件>导出>发布现有版本

在项目浏览器中右击,选择导出,在导出对话框FB节点中选择发布版本,如果你是从前些版本中迁移过来的用户,发布源代码的步骤也许变化了一些

目前FB3你如果想查看源代码,你可以通过导出目前版本对话框,单击 “允许查看源代码”复选框部分,你如果想要指定哪些文件被包含哪些文件被排除,单击选择源文挡按钮损,随意地勾选或者去掉你选中的文件。例如我对一些例子中我不想包含我从因特网上下载下来的一些字体,因此,我在对话框中选择源文件勾去了那些字体文件,回到发布文件对话框,你可以指定产生的文件将被复制到何处,缺省状况下,这些文件将被放置到一个名为/SRCVIEW的文件夹中

这样,你就做到了使用FB3发布工程的源代码,通常不是所有的SWF都允许你查看源代码

源文档

<http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&productId=2&postId=7752>

Publishing a projects source code in Flex Builder 3

by peterd_mm on February 20, 2008

Tagged with

Moxie beta , Flex and other technologies

Problem Summary

You want to publish your source code for your Flex application so that a user can right-click on the Flex application and select View Source from the context menu and see your code/assets.

Solution Summary

In Flex 2, you could publish your application source by selecting Project > Publish Application Source from the main menu.

Explanation

In Flex 3, you can publish your application source by doing one of the following:

•Selecting Project > Export Release Build from the main menu.

•Selecting File > Export > Release Build from the main menu.

•Right click the Flex Project in the Flex Navigator or Navigator view, and select Export from the context menu. In the Export dialog, select “Release Build” under the Flex Builder node.

If you are just getting started with Flex Builder 3 (or Flex in general), or are migrating from Flex Builder 2 or early Flex Builder 3 betas (pre beta 2), the steps to enable the “View Source” context menu in your Flex applications has changed somewhat.

Currently (as of Flex Builder 3 beta 2), if you want to enable view source, you can do so in the “Export Release Build” dialog box (found by selecting Project > Export Release Build from the main menu), and clicking the “Enable view source” check box in the View source section. If you want to specify which files are included/excluded, simply click on the Choose Source Files button and check or uncheck files at your leisure. For example, in some of my examples, I may not include fonts which I downloaded elsewhere from the Internet. So I would go into the Export Release Build dialog box, click on Choose Source Files and deselect the fonts and then publish my Flex application. Of course, I always include a note explaining where you can obtain the specific fonts I used, but it makes it so developers visit the site, check out the copyright information, and sends a bit of traffic to the font makers site. But I digress… Back in the Publish Application Source dialog box (which can be found by clicking the Choose Source Files button in the Export Release Version dialog box, whew!), you can also specify where the generated source files will be copied to. By default the files will be placed in a folder named /srcview/ within your /bin-release/ folder of the published project files.

There you have it. Publishing your application source files with Flex Builder 3. Most, if not all, of the SWFs on this site should have view source enabled. Simply right-click on a SWF file and select View Source from the context menu. This allows you to view a nicely formatted/colored version of the source code, as well as download the source files as a handy ZIP file, or click on a link to download the Flex 3 SDK.

For more information, see

http://blog.flexexamples.com/2007/10/21/publishing-a-projects-source-code-in-flex-builder-3-beta-2/

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics