惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Microsoft Azure Blog
Microsoft Azure Blog
The Register - Security
The Register - Security
S
Securelist
Simon Willison's Weblog
Simon Willison's Weblog
T
The Exploit Database - CXSecurity.com
V
Vulnerabilities – Threatpost
NISL@THU
NISL@THU
P
Privacy & Cybersecurity Law Blog
V2EX - 技术
V2EX - 技术
O
OpenAI News
N
News and Events Feed by Topic
AI
AI
P
Proofpoint News Feed
Schneier on Security
Schneier on Security
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Cloudbric
Cloudbric
Help Net Security
Help Net Security
C
Cyber Attacks, Cyber Crime and Cyber Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Security Latest
Security Latest
Application and Cybersecurity Blog
Application and Cybersecurity Blog
L
LINUX DO - 热门话题
Cyberwarzone
Cyberwarzone
Scott Helme
Scott Helme
The Hacker News
The Hacker News
Hacker News - Newest:
Hacker News - Newest: "LLM"
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Google DeepMind News
Google DeepMind News
H
Hacker News: Front Page
C
Cisco Blogs
Webroot Blog
Webroot Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Hacker News: Ask HN
Hacker News: Ask HN
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
The Last Watchdog
The Last Watchdog
PCI Perspectives
PCI Perspectives
AWS News Blog
AWS News Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Know Your Adversary
Know Your Adversary
Latest news
Latest news
Forbes - Security
Forbes - Security
I
Intezer
Project Zero
Project Zero
C
CERT Recently Published Vulnerability Notes
T
Tenable Blog
TaoSecurity Blog
TaoSecurity Blog
S
Security @ Cisco Blogs
N
News | PayPal Newsroom
H
Heimdal Security Blog
W
WeLiveSecurity

博客园 - GIS小能

利用Simplify进行ArcGIS Server多面合并查询 ArcGIS KeyGen注册机,五步操作实现ArcGIS9.X与ArcGIS10全模块无时限破解(转载:我是一只牛) Flex开发必知(1) ArcGIS Server 10 问题汇总 ArcGIS Server 10 许可文件 Ecp 基于flex及SVG技术打造交互式地图(数据篇) 将应用程序从Flex 3迁移至Flex 4(转载) ArcGIS 10 破解安装(desktop及ArcGIS Server 10) 基于Geoserver配置多图层地图以及利用uDig来进行样式配置 基于ArcGIS Server 10 在flex瓦片客户端叠加瓦片服务 胡说八道--mate flex 优化原则 flex与flash交互详解 flex调用WMS远程图片所产生安全错误 loder导致的安全沙箱的2122错误 flex一周精选(20100308) 解析MapBar兴趣点加载原理 Flex一周精选(20100301) 浅谈Image和Bitmap
关于Flex Ant的相关注意事项
GIS小能 · 2011-11-01 · via 博客园 - GIS小能

1、代码方面:

如果是Embed的方法,务必按以下方式写,注意反斜杠的位置。

在mxml文件中:

<mx:Image  source="@Embed('/cn/com/1.png')"/>  

在CSS文件中:

backgroundImage:Embed(source="/cn/com/1.png");

在AS文件中:

[Embed(source="/cn/com/1.png")]
        public var zmouse : Class;

2、图片以及附件的处理方面:

如果是Embed进去的,这些就不需要处理了,那未打包的资源就是一个比较麻烦的地方,偶也没有找到比较好的方法,似乎只能一个个写,参考其提供的样例:

<compc fork="true"
               output="${basedir}/${THEME_NAME}.swc">
            <!-- If you change this, update ${local.playerglobal.version} above. -->
            <target-player>10</target-player>
            <jvmarg line="${compc.jvm.args}"/>
            <include-classes>ArcadeClasses</include-classes>
            <source-path path-element="${basedir}/src"/>
            <library-path />
            <external-library-path dir="${FLEX_HOME}/frameworks/libs">
                <include name="player/${local.playerglobal.version}/playerglobal.swc"/>
                <include name="framework.swc"/>
                <include name="spark.swc"/>
                <include name="textLayout.swc"/>
                <include name="osmf.swc"/>
            </external-library-path>
            <include-file name="defaults.css" path="${basedir}/src/defaults.css"/>
            <include-file name="assets/flex_skins.swf" path="${basedir}/src/assets/flex_skins.swf"/>
            <include-file name="preview.jpg" path="${basedir}/src/preview.jpg"/>
            <include-file name="metadata.xml" path="${basedir}/src/metadata.xml"/>
            <locale/>
            <accessible>true</accessible>
        </compc>

3、样式的处理:

如果采用的动态加载样式 ,那么尽量将相关的库打包至样式的SWF中,否则可能会出现部分样式加载延迟的问题,关于static-link-runtime-shared-libraries的使用可以Google一下!

 <target name="buildcss" depends="init">
            <mxmlc file="${SRC_DIR}/cn/com/egova/umgis/common/style/CustomStyle.css" 
                output="${DEPLOY_DIR}/cn/com/egova/umgis/common/style/CustomStyle.swf">
                <static-link-runtime-shared-libraries>true</static-link-runtime-shared-libraries> 
                </mxmlc>
     </target>

4、关于文件大小

采用Ant打包的文件相比使用Flash Builder自动编绎生成的文件大概要小一半左右,这是因为其自动编译的文件为了避免出错,会将一些共享库打包至SWF中,因此会造成SWF庞大,但至于使用Ant打包后的是不是会有其他问题,暂时还没有验证。

参考资源:

http://www.petersheim.org/wiki/index.php/Flex_Ant_Task

http://blog.ityao.com/archives/751

http://mxcode.com/2010/11/flex-ant-file-sample/