




已阅读5页,还剩2页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
信息工程学院 flash游戏制作雷电游戏英文原文actionscript 3.0 actionscript 3.0 is a powerful, object-oriented programming language that signifies an important step in the evolution of the capabilities of the flash player runtime. the motivation driving actionscript 3.0 is to create a language ideally suited for rapidly building rich internet applications, which have become an essential part of the web experience.earlier versions of actionscript offered the power and flexibility required for creating truly engaging online experiences. actionscript 3.0 now further advances the language, providing superb performance and ease of development to facilitate highly complex applications, large datasets, and object-oriented, reusable code bases. with actionscript 3.0, developers can achieve excellent productivity and performance with content and applications that target flash player.actionscript 3.0 is based on ecmascript, the international standardized programming language for scripting. actionscript 3.0 is compliant with the ecmascript language specification, third edition . it also contains functionality based on ongoing work on ecmascript edition 4, occurring within the ecma standards body.actionscript is executed by the actionscript virtual machine (avm) built into the flash player. avm1, the virtual machine used to execute legacy actionscript code, powers flash player today and makes possible a wide range of interactive media and rich internet applications.however, developers have started to push avm1 to its limits; their project requirements now demand a major breakthrough. actionscript 3.0 introduces a new highly optimized actionscript virtual machine, avm2, which dramatically exceeds the performance possible with avm1. as a result, actionscript 3.0 code executes up to 10 times faster than legacy actionscript code.the new avm2 virtual machine is available in flash player 9, and will be the primary virtual machine for actionscript execution going forward. the older avm1 will continue to be supported by flash player for backwards compatibility with existing and legacy content.there are numerous products that generate content and applications targeted at the flash player runtime. often these products incorporate support for actionscript to add interactivity and behavior to their output. in the adobe product family, professional designers and developers might use actionscript within several tools and serverssuch as flash, flex, and flash media serverto create content and applications for flash player. the flex product family, including the new eclipse-based flex builder 2 ide, will be the first product line to access the new capabilities of actionscript 3.0.goals of actionscript 3.0we wanted actionscript 3.0 to deliver an improved, consistent programming model; compliance with industry standards; and performance an order of magnitude greater than what we delivered in the past. although actionscript 3.0 represents a new programming model for the runtime, it is one that will be familiar to developers with a basic knowledge of object-oriented programming.actionscript 3.0 is designed to address the following goals: safety: the language supports type safety so developers can write unambiguous, easily maintainable code. simplicity: the language is intuitive enough for developers to be able to read and write programs without constantly consulting a reference manual. performance: the language enables developers to write complex programs that perform efficiently and responsively. compatibility: the language provides a short backward and forward compatibility path and a significant overlap with industry standards. actionscript 3.0 is a dialect of ecmascript which formalizes the features of actionscript 2.0, adds the capabilities of ecmascript for xml (e4x), and unifies the language into a coherent whole.features of actionscript 3.0actionscript 3.0 consists of two parts: the core language and the flash player api. the core language defines the basic building blocks of the programming language, such as statements, expressions, conditions, loops, and types. the flash player api is made up of classes that represent and provide access to flash playerspecific functionalityactionscript 3.0 contains a host of powerful new features that can greatly speed the development process. regular expression support enables a variety of powerful operations on text. ecmascript for xml (e4x) transforms xml into a native data type, dramatically simplifying xml processing. the new display list api makes working with visual objects far more straightforward and consistent. the standardized dom event model cements the way those objects talk and respond to each other at runtime. these are only a few of the many new capabilities of actionscript 3.0.language featuresactionscript 3.0 brings the core language aspects of actionscript 2.0 into compliance with the ecmascript standard and introduces some areas of new or enhanced functionality. all of these features are discussed in comprehensive detail in the actionscript 3.0 language reference, available in beta version on adobe labs.following is a high-level summary of the developer benefits and usage of some of the new features.runtime exceptionsin actionscript 2.0, many runtime errors would fail in a graceful but silent fashion. this ensured that flash player would not display some inexplicable dialog box, which javascript did in early web browsers. on the other hand, this lack of error reporting made it more challenging to debug actionscript programs. actionscript 3.0 introduces a variety of runtime exceptions for common error conditions, improving the debugging experience and enabling applications that handle errors robustly. runtime errors can provide stack traces annotated with source file and line number information, helping to pinpoint errors quickly.runtime typesin actionscript 2.0, type annotations were primarily an aid for developers; at runtime, all values were dynamically typed.in actionscript 3.0, type information is preserved at runtime and utilized for a number of purposes. flash player performs runtime type checking, improving the systems type safety. type information is also used to represent variables in native machine representations, improving performance and reducing memory usage.sealed classesactionscript 3.0 introduces the concept of a sealed class. a sealed class possesses only the fixed set of properties and methods that were defined at compile-time; additional properties and methods cannot be added. this makes stricter compile-time checking possible, resulting in more robust programs. it also improves memory usage by not requiring an internal hash table for each object instance. dynamic classes are also possible using the dynamic keyword.method closuresevent handling is simplified in actionscript 3.0 thanks to method closures, which provide built-in event delegation. in actionscript 2.0, a closure would not remember what object instance it was extracted from, leading to unexpected behavior when the closure was invoked. the mx.utils.delegate class was a popular workaround; to use it, you would write code as follows: mybutton.addeventlistener(click,delegate.create(this, somemethod); delegate.create(this, somemethod) this class is no longer needed because in actionscript 3.0, a method closure will be generated when somemethod is referenced. the method closure will automatically remember its original object instance. now, one can simply write:mybutton.addeventlistener(click, somemethod);第 7 页 共 7 页附录:译文actionscript 3.0概述actionscript 3.0 演变成一门强大的面向对象的编程语言意味着flash平台的重大变革。这种变化也意味着 actionscript 3.0 将创造性地将语言理想地迅速地建立出适应网络的丰富应用程序, 成为丰富网络应用(rich internet application)项目的本质部分。比较早期的actionscript版本就已经提供了这种要求为创造真实地参与在线体验的力量和灵活性。actionscript 3.0 将促进和发展这种性能, 提供发展强大表现和舒适的先进的高度复杂应用, 结合大型数据库以及可移值性的面象对象的代码。拥有 actionscript 3.0,开发者可能达到高效执行效率和表现同一的平台。 actionscript 3.0 基于ecmascript, ecmascript是所有编程语言的国际规范化的语言。actionscript 3.0 同样遵从ecmascript语言规范。actionscript 由嵌入在flash player的actionscript虚拟机 (avm)执行。avm1, 是执行以前版本的actionscript的虚拟机, 今天变的更加强大的flash平台使得可能创造出交互式媒体和丰富的网络应用。然而, avm1却在挤压着开发者们的极限 他们的项目现在到了要求它变革的时刻了。actionscript 3.0 带来了一个更加高效的actionscript 执行虚拟机avm2,它将彻底的脱胎换骨于avm1 。 它将意味着, actionscript 3.0执行效率将比以前的actionscript执行效率高出至少10倍。新的avm2 虚拟机将会嵌入于flash player8.5当中, 它将成为执行actionscript的首先虚拟机。当然旧的avm1将继续嵌入在flash player8.5当中以兼容以前的actionscript。 有众多的产品把自身的展示和应用表现于flash player当中,这些产品的动画也经常应用到actionscript 以增加互动和行为表现他们的产品。 在macromedia 产品家族, 专业设计师和也许使用 actionscript 在几个产品当中, 譬如macromedia flash, flex,和flash media servers创造出内容和应用表现在flash player当中。在flex2 产品家族, 包括最新的基于eclipe的flex builder 2 ide,会是系列产品中第一个应用actionscript 3.0 的新体验的产品。 actionscript 3.0的目标: 我们需要actionscript 3.0 提供一个先进的, 与编程模型一致的, 服从业界标准, 以及表现将数量级大于我们过去的执行效能。虽然actionscript 3.0 代表着flash平台一个新的编程模型,它也将会是一个让开发者熟悉的基础的面对对象的编程语言。 actionscript3.0的出现将展现出如下目标: 安全 它支持一定的安全以使得能够让开发者写出明白的, 容易的可维护的代码。 朴素 - 这种语言的直观程度使开发者能够直接读和写项目,而不需要经常参考手册 表现 - 这种语言使开发者写出高效率的和表现性强的复杂项目。 兼容性 - 这种语言抛弃不规范的语言标准以及提供向后兼容以及有意义的交替以符合业界标准。actionscript 3.0 是规范化了的actionscript 2.0, 增 加了ecmascript 其中的xml应用(e4x) ,使得这 种语言融入ecmascript整体连为一贯。 actionscript 3.0的特征: actionscript 3.0 包括二部分: 核心语言和flash playerapi 。核心语言用于定义编程语言的结构, 譬如声明, 表示, 条件, 循环, 和类型 。flash player api是 由一系列精确定义flash player功能的类组成。actionscript 3.0 拥有尽可能的挖掘出计算机剩余性能的新特点。规则表示支持使操作性更加强大的xml。 ecmascript for xml (e4x) 使得xml 成为通用数据类型, 将大大地简化xml 处理。新的display listapi将使虚拟对象更加的协调一致。 规范化的dom 事件模型使得那些对象的表示和响应结合的更加强劲。当然这些只是actionscript3.0许多新的体验当中的一部分。actionscript3.0语言特点: actionscript 3.0 的出现是actionscript 2.0 的核心语言方面融入ecmascript 以遵守其标准和引入新的改进的一些功能区域的结合。所有这些特点在actionscript 3.0 语言参考中都有详细的介绍和讨论,可得到试用
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年内科主治医师考试临床病例试题及答案
- 2024年导游专业:导游业务基本常识岗前培训考试题库(附含答案)
- 内蒙古自治区包头市2024-2025学年七年级下学期期末语文试题(解析版)
- 摄影器材基本知识培训课件
- 区域技术面试试题及答案
- 2025农产品购销合同
- 2025智能设备租赁合同
- 面试热点追踪:淄川国企面试题解析
- 央企面试技巧大全:各岗位面试题目及应对策略
- 面试高手必读指南:各行业面试试题与答题技巧
- 人教版物理九年级全册同步练习题
- 制药车间清洁操作培训
- 2025-2030中国PET-CT扫描服务行业市场发展趋势与前景展望战略研究报告
- 《加快实施绿色公路建设的指导建议意见》干院宣讲宣讲专题培训课件
- 精益生产6S管理
- 中广核吉木乃县黑山风电场 75 万千瓦风电项日报告表
- 2025劳动合同范本下载
- 《儒林外史》人物基本情况及形象分析
- 个人受托支付合同标准文本
- 应急照明及疏散指示系统基础知识课件
- 医疗器械使用前质量检查制度
评论
0/150
提交评论