注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

神魔破杜梓的叨叨堂

Programming every day!

 
 
 

日志

 
 
 
 

在Flex 应用程序中添加版本信息  

2008-06-25 11:17:14|  分类: My Tech |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
原文来自Adobe

Problem Summary

What happens when you have to make updates to an Application for a client, you give it to them but they say the updates don't appear on their site. Well how do you know what version of your application they have loaded? By using version control of course.

Solution Summary

Create a simple class that can be added to any application file that includes version control information to be placed in the context menu of the flash player. This allows the developer at anytime to verify that the version number is correct for that deployment.

Explanation

This comprises of making just two files one of which is a singleton class that can be used for every project you want to add version control to and the second is a VersionControl.properties file which you update before you publish a new version of your application lets take a look at that file first

#Each item takes the same params as the ContextMenuItem class
#and is seperated by and & ampersand
#caption:String = caption Value : String,
#separatorBefore:Boolean = false,
#enabled:Boolean = true,
#visible:Boolean = true
#In addition each item supports a url variable just add
#&YOUR URL GOES HERE;
Version=Version 0.1&false&false&true;
url=Developer:A McCormick&false&true&true&www.goeshere.com
viewSource=ViewSource&false&true&true&www.goeshere.com

The Second class controls what these properties do i know its a long class but its fully commented. Basically it loops through the VersionControl.properties file and builds context menu items based on the values, adding the ability to include links as well. And finally all you have to do is call getInstance( this ); in your main application file.

 

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
creationComplete="VersionController.getInstance( this )" >
<mx:Script>
<![CDATA[
 
import VersionControl.VersionController;
 
]]>
</mx:Script>
</mx:Application>

The full blog link :

http://www.betadesigns.co.uk/Blog/2008/06/24/application-version-control-in-as3/

 

Related files for download

Sample implementation files
VersionControl.zip

VersionControl.swf
VersionController.as.html
  评论这张
 
阅读(372)| 评论(0)
推荐 转载

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017