| 首页 | 新闻 | 网页 | 设计 | 色彩 | 原创 | 视觉 | 素材 | 动漫 | 酷站 | 策划 | 文案 | 访谈 | 运营 | 编程 | 数据库 | 服务器 | 下载 | 图库 | 
您的位置: 幽幽天空 > 网页 > 网页制作 > Flash教程 > Flash特别应用 > 文章正文 用户登录
网络创业,你最需
互联网创业者最需
运营商下一步需要
秘决:怎做用户需要
网吧电脑需要注意
如果你想进行域名
将ACCESS转化成SQ
关于SQL SERVER建
语义的需要
C++类的分解,抽象

不需要Flex也可以解析MXML文件           

不需要Flex也可以解析MXML文件

作者:佚名 来源:不详 更新:2007-1-13 21:01:33 错误报告 我要投稿

在客户端进行MXML解析.
This is a sample of client side MXML rendering. the engine loads the maine movie which contains the parser which loads the mxml file. I added an attribute ''assets'' to the application node which specifies a swf that contains all the components. This allows u to only add the components you need. On loading it will parse your xml (similar to mxml but different due to client side processing and anot having the same classes flex uses). Right now its proof of concept. Basically what it does is reads the node names of the XML nodes and instanciates the component or the non UI class. it transfers the attributes i.e styles/properties/setters after the component has loaded (it auto detects so if your component supports the v2 architecture i.e. inherits from UIComponent) and then loads the next... It doesnt support nesting cause i havent made the classes to emulate HBox, VBox, ScrollPane etc.. I''m trying to make it so that the engine doesnt know anything bout the components besdies them inheriting from UIComponent and support v2 architecture.... so these containers classes would need to be created or wrappers made for MM''s. No source available since it was a study to see how flex could be made on the client side and from what i see it is very, very, doable. The code i wrote supports the {rf} in attributes to evaluate the variable, supports events and defining AS in those events like ''click="a=3"'' for a button, supports arrays in arrtibutes like setSize="[20,40]" etc. Take a look at the XML to see what i''ve managed to make it do HERE Thanks to Enclosure for his amazing AS interpreter which makes interpreting of AS code in attributes and the Script tag possible Sample Movie (XML is HERE)


文章录入:skyuu    责任编辑:skyuu 
  • 上一篇文章:

  • 下一篇文章:
  • 【字体: 】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
    网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)
    发表评论:
    姓名:  评 分: 1分 2分 3分 4分 5分
     
  • 严禁发表危害国家安全、政治、黄色淫秽等内容的评论。
  • 用户需对自己在使用幽幽天空服务过程中的行为承担法律责任。
  • 本站管理员有权保留或删除评论内容。
  • 评论内容只代表机友个人观点,与本网站立场无关。