Flex view source的实现当我们在网上浏览运行Flex应用程序时,大家肯定也留意到了有很多swf文件的右键有一个view source菜单,单击它就可以查看该应用的mxml文件及下载其它相关资源。这确实是一种快速共享Flex学习资源的好方法。然而,这一功能是怎样实现的呢? 借助强大的Flex Builder,这一功能实现起来很容易。
具体步骤如下: 至少打开一个Flex工程,单击Project > Publish Application Source,弹出Publish Application Source对话框。我们可以选择一个Flex工程,选择在浏览器中就可以浏览的目标工程中的mxml文件,选择相关的打包下载文件。最后单击OK,Flex Bulider将自动为我们在Application标签中添加viewSourceURL属性,并且将发布的资源文件整合到一套Html模块中供网上浏览下载。
如果我们没有Flex Bulider,不要着急,可以用Flex framework API手动来实现:
import com.adobe.viewsource.ViewSource;
ViewSource.addMenuItem(this, "srcview/index.html");
或者在项目<mx:application 中添加 viewSourceURL="srcview/index.html"
在tomcat下面需要放置资源文件,一开始我纳闷tomcat下面的那些文件怎么发布过去的。难道flexbuilder这么不智能,还需要我们程序员手工复制粘贴吗?在网上找了些配置方法,但我的flexbuilder及eclipse flexbuilder plugin中都不能找到那些选项。最终请教高人找到了答案。工程--export--release--勾上view source 就行了
分享到:
相关推荐
======================= ArcGIS Viewer for Flex 2.1 build date 2010-09-21 ======================= This file contains the complete source code for the ArcGIS Viewer for Flex.
arcgis-viewer-flex 这是ArcGIS Viewer for Flex(又名Flex Viewer)的源代码。 在了解有关Flex Viewer的更多信息。 特征 适用于ArcGIS Server的即用型GIS Web客户端映射应用程序。 完整的Web制图应用程序和应用...
Flex Effect 特效 大全 , 用IE 打开后,点击 Visible 就可以看见效果,右键可以View Source.
- ADD: Added the method TCustomProp.Assign - a source flex-property is written to stream, which is then read by the flex-property, for which the Assign method is called. - ADD: In TIdPool (module ...
Open source as3soundeditorlib
flex: 1, justifyContent: "center", alignItems: "center", backgroundColor: "#F5FCFF" }, welcome: { fontSize: 20, textAlign: "center", margin: 10 }, instructions: { textAlign: "center", ...
Flex mobile 开发手机小项目 import flash.ui.Multitouch; import flash.ui.MultitouchInputMode; private function onSwipe(event:TransformGestureEvent):void{ if(event.offsetX == -1){ ...
HttpModule 实现 ASP.Net (*.aspx) 中文简繁体的自动转换,不用修改原有的任何代码,直接部署即可! 服务器自定义开发二之客户端脚本回发 Web开发: 使用URL重写WEB主题切换 如何在Asp.Net1.1中实现页面模板(所谓的...
if you installed libpcap from source, did you also do "make install-incl", and if you installed a binary package of libpcap, is there also a developer's package of libpcap, and did you also install ...
if you installed libpcap from source, did you also do "make install-incl", and if you installed a binary package of libpcap, is there also a developer's package of libpcap, and did you also install ...
The source files for these movies can be found in the Flash MX/Samples folder. Notice You may reuse these files as you want, but they are not officially supported as part of the product....
found as "View | Project Resources" in the Delphi 3 and C++Builder 3 IDE menu and as "Project | Resources" in the Delphi 4 or higher IDE menu. 3. Units that provide functions and objects to work with...
<END><br>17 , resizable7segment_source.zip An Active-X control that simulates a 7 segment L.E.D display.<END><br>18 , xartery1.zip 20 image digital art gallery in 2 galleries, housed in an ...
Source code ........................... 12 Coding standards ......................... 14 Errors .................................... 14 Introduction to Objects 15 The progress of abstraction ............