本页面由 Flash 保存计划 从 Internet Archive 存档还原 · 快照 2004-12-09 · 原址 http://www2.flash8.net/teach/337.htm ← Flash 保存计划
 
《ActionScript 编程篇》勘误表
作者:不祥 上传人:  
时间: 2003年3月30  类型:   
收藏 发送 评论 <%=votevote%>打印 字体选择:   
                       
                                                                                 页码                书中译文                英文原文                愚者译文                愚人点评                                             3                ActionScript不支持详细而精确的物体浏览,如文档、窗口等。                ActionScript does not support                   browser-specific objects such as Document, Window, and Anchor.
                                  动作脚本语言不支持浏览器特有的对象,如文档、窗口和锚点对象。                不知道“详细而精确的物体浏览”所指何物。愚人则闻某些浏览器支持文档、窗口和锚点对象。                                             3                ActionScript支持一些在JavaScript中不允许的语句结构,如switch,                   continue, try, catch, throw及一些陈述性标志。                ActionScript does not support                   some JavaScript syntax constructs, such as switch, continue,                   try, catch, throw, and statement labels.                 动作脚本语言不支持某些JavaScript语法结构,如 switch、continue、try、catch、throw和                   labels语句。                原文明明是“does not support”,却变成了支持,是否有误导之虞?请在Flash                   5动作脚本中使用switch语句看看! 
                  再说,JavaScript是支持switch、continue等语句的嘛。没有听说JavaScript不支持switch语句吧?!                                             3                在ActionScript中只能执行变化的行为。                In ActionScript, the eval                   action can only perform variable references.                在动作脚本语言中,eval动作仅执行变量引用。                什么是变化的行为?                                             4                用户定义的功能
                  你可以使用参数进行定义可以获得价值的功能。这就允许你可以反复使用脚本中的密码。在Flash 4中,你需要使用call的行为才可以反复使用密码,但是你不能通过参数,也不能获得价值。
                                User-defined functions
                  
                  You can define functions with parameters that return values.                   This allows you to reuse blocks of code in your scripts. In                   Flash 4, you could reuse code by using the call action, but                   you couldn't pass parameters or return values. 
                  
                                用户自定义函数 
                  你可以定义带参函数,让它返回值。这就让你能够重用脚本中的代码块。在Flash 4中,你可以通过Call动作重用代码,但你不能传递参数或返回值。
                                “你可以使用参数进行定义可以获得价值的功能”是什么意思?众发烧友,你理解吗?
                  “这就允许你可以反复使用脚本中的密码”—是code还是password?
                  “你不能通过参数,也不能获得价值”—这就让我们更加糊涂了!但是,在玩Flash 4时我们知道,在Flash 4中,call动作是用来调用写在其它帧(即非当前帧)中的动作脚本的,但call动作不能传递参数给被调用的动作脚本,也不能从被调用的动作脚本中返回值。                                             4                数学对象以一系列的数学常量和功能为特点,如E(恒量)、cos(余弦)、atan(弧)。                The Math object features a full complement of                   built-in mathematical constants and functions, such as E (Euler's                   constant), cos (Cosine), and atan (Arctangent). 
                                Math(数学)对象的重要作用是对内建数学常数和函数的全面补充,例如E(Euler常数)、cos(余弦)和atan(反正切)。                                 我记得,在在孩提时候学过一个三角函数,叫做反正切,可能就是这个东东吧:atan(Arctangent)。                                             4                数据对象可以帮助你统计出运行Flash软件所需要的时间和数据信息。                The Date object allows you to get information                   about the date and time on whatever system is running the Flash                   Player. 
                                Date(日期)对象让你能够获取运行Flash播放器的系统日期和时间信息。                 是data还是date?众发烧友,只要你懂一点点E文,我建议大家还是多看看原文。                                             8                在目标导向脚本中,                In object-oriented scripting,                 在面向对象的脚本编写中,                object-oriented是“目标导向”?简明英汉词典中的“Object Oriented                   Programming, 面向对象的程序设计”的释义岂不要改为“目标导向编程”了?!                                             8                你可以创建成倍的类别,称为对象                You can create multiple instances of a class,                   called objects,                 你可以创建一个类的多个实例(称为对象),                instances—实例、实体、分身。书中不是译成分身吗?怎么这里又译成类别了?如果这样,class又译成什么?                                             8                你可以使用行为脚本的事先定义类别功能来建立你自己的脚本。                You can use ActionScript's predefined classes                   and create your own. 
                                你可以使用动作脚本的预定义类和创建自己的类。
                                Flash 5提供了一些预先定义好的类(预定义类,也就是通常所称的内建类),但也允许用户定义自己的类。                                             9                当你建立一个类别时,你将每个对象的个性和行为加以定义,                When you create a class, you define                   all the properties (characteristics) and methods (behaviors)                   of each object it creates,                 当你创建类时,你定义它创建的每个对象的所有属性(特征)和方法(行为),                properties和methods是面向对象编程中经常见到的两个术语。还是约定俗成译成属性和方法为好,以免混乱。                                             9                定义一个类别,应建立一个特殊的功能称为结构功能;事先定义的类别有着事先定义好的功能结构。                To define a class, you create a special function                   called a constructor function;predefined classes have constructor                   functions that are already defined.                 要定义一个类,需定义一个称为构造函数的特殊函数;预定义类拥有已定义好的构造函数。                例如,当我们要创建一个日期对象时,我们需要用到日期对象的构造函数,如:
                  myDate = new Date();
                                                             9                在一个目标导向脚本中,类别可以从每个特殊的标地物上接受舞台道具,这被称为继承。                In object-oriented scripting, classes can receive                   properties and methods from each other according to a specific                   order; this is called inheritance.                 在面向对象脚本编写中,类可以依据特定的次序相互接收属性和方法,这称为继承。                这里的a specific order(特定的次序)是指父类、子类之间的层次关系。
                  “从每个特殊的标地物上接受舞台道具”—众闪客,你知道这一句说的是什么吗?
                                                             9                你可以使用继承的方法拓展一个类别的重复定义。                You can use inheritance to extend or redefine                   the properties and methods of a class.                 你可以使用继承来扩展或重定义类的属性和方法。                 “使用继承的方法拓展一个类别的重复定义”—能吗?
                  译注:请看看Help中的Creating inheritance
                                                             9                一个类别从另一个类别继承来的特性被称为最高类别。一个超越其他类别的类别被称为超级类别,一个类别可以既是最高类别又是超级类别。                A class that inherits from another class is called                   a subclass. A class that passes properties and methods to another                   class is called a superclass. A class can be both a subclass                   and a superclass. 
                                从其它类继承而来的类称为子类,传递属性和方法到另一个类的类称为超类。一个类既可以是子类,也可以是超类。                   
                                “特性被称为最高类别”?
                  特性能称为类别吗?
                                                             9                电影剪辑是Flash动画中最重要的部分,因为它有时间轴线可以彼此独立地工作。                Movie clips are the most important objects of                   a Flash movie because they have Timelines that run independently                   of each other.                 电影剪辑是Flash动画中最重要的对象,因为它们拥有彼此独立播放的时间轴。                在Flash 5的预定义对象中,有一种电影剪辑对象(MovieClip),它是Flash 5众多对象中最为重要的对象之一。一部动画中的每个电影剪辑均可独立播放。                            
             

  
 
             《ActionScript 编程篇》勘误表
              闪客发烧友                        http://www.yesky.com/20010529/182070_1.shtml";>

              《Flash 5高级实例教程—ActionScript编程篇》勘误表(第1-20页)
            
              本人是Flash 5发烧友,昨天到新华书店看到了一本由资深网页专家编著的关于Flash动作脚本的巨著—《Flash 5高级实例教程—ActionScript编程篇             》,如获至宝,毫不犹豫地掏出了63.00元。但是,回到家里一看,几乎是Flash 5帮助的翻译,而且错误很多。为了帮助购买了此书的我等发烧友,特把书中部分错误订正,以免参阅该书时迷惑不解,浪费宝贵时间。             
            
                          
            
                         http://www.yesky.com/20010529/182070_1.shtml";>

          
                                                                                     页码                书中译文                英文原文                愚者译文                愚人点评                                                            10                电影剪辑的特性、特征可以使你有价值地建立和取消行为脚本。                Movie clips have properties whose values you can                   set and retrieve dynamically with ActionScript.                 电影剪辑拥有属性,你可以用动作脚本动态设置和读取属性的值。                “电影剪辑的特性、特征可以使你有价值地建立和取消行为脚本”—我不明白说什么!                                             10                Flash在执行行为脚本陈述时,从第一个文件开始到最后一个文件或经指示转到另一个行为脚本一直保持规则。                Flash executes ActionScript statements starting                   with the first statement and continuing in order until it reaches                   the final statement or a statement that instructs ActionScript                   to go somewhere else. 
                                Flash执行动作脚本语句,从第一句开始,然后按顺序执行,直至到达最后的语句或指令跳转到其它地方的语句。                statement是什么?当然可以是陈述,但不要在这里陈述,请在别的地方陈述好了。
                  first statement—第一个文件?
                  保持规则—你从哪里来?
                                                             10                一些行为将行为脚本送至规定的地方,如果遇到do...while loops或return语句,就会执行相应的行为。                                 Some actions that send ActionScript somewhere                   other than the next statement are if statements, do...while                   loops, and the return action.                 把动作脚本送到某个地方而不是下一语句的一些动作是if语句、do...while循环和return动作。
                                if statements—如果遇到?                                             11                当一个陈述被称为有条件的陈述或一个“逻辑分支”是因为它控制一个脚本在一种特定环境下赋值的流动行为。                An if statement is called a conditional statement                   or a "logical branch" because it controls the flow of a script                   based on the evaluation of a certain condition.                 if语句称为条件语句或“逻辑分支”,因为它依据某个条件的计算结果控制着脚本的流向。                “当...是因为...”—有没有毛病呀?
                   
                                                             11                你可以增加其他的陈述来建立一个更为复杂的陈述。                You can also add else statements to create a more                   complicated conditional statement.                你也可以加入else语句,创建一个更复杂的条件语句。                else statements—其它的陈述?                                             11                在下面的例子中,如果条件返回真(如:数字值为3),在第一个循环带和第二层之间的警报系统就会被设置。如果条件返回假(fasle)(如:数字值为30),你就会越过第一层编码,循环带的陈述就会启动如下:                In the following example, if the condition returns                   true (for example, the value of number is 3), the statement                   between the first set of curly braces runs and the alert variable                   is set in the second line. If the condition returns false (for                   example, the value of number is 30), the first block of code                   is skipped and the statement between the curly braces after                   the else statement runs, as in the following: 
                  
                  if (number <= 10) {
                  alert = "The number is less than or equal to 10";
                  } else {
                  alert = "The number is greater than 10";
                  }

                                在下面的例子中,如果条件的返回值为true(如number的值为3),第一对大括号中的语句被执行,且第二行中的变量alert被设置。如果条件的返回值为fasle(如number的值为30),第一代码块被跳过,else语句后大括号中的语句被执行,如下所示:                   
                                在if语句中有没有“第一个循环带”?
                  “警报系统”在哪里?难道是防空警报系统吗!
                                                             11                Loop使得一个行为重复进行一个确定次数直到遇到一个确定的环境。                Loops repeat an action a certain number of times                   or until a certain condition is met.                 循环重置执行动作一定次数或直到一个确定的条件满足。                until a certain condition is met—直到遇到一个确定的环境?                                             12                当鼠标双击进入一帧时,可以给该帧附加行为。                Actions attached to a frame are executed when                   the playhead enters that frame. 
                                当播放头进入某帧时,附加给该帧的动作被执行。                 鼠标双击—原文似乎没有说到呀!                                             12                给按钮附加行为可以在on handler行为中赋值。                Actions attached to a button are enclosed in an                   on handler action.                附加给一个按钮的动作被封装在on事件管理动作中。                “赋值”—在on handler行为中如何赋值?                                             12                给一个电影剪辑附加行为可以在onClipEvent handler行为中赋值。                Actions attached to a movie clip are enclosed                   in an onClipEvent handler action.
                                附加给电影剪辑的动作被封装在onClipEvent事件管理动作中。                 “赋值”—在onClipEvent handler行为中如何赋值?                                             12                onClipEvent和onaction行为之所以被成为“执行者”是因为他们执行、控制整个行为过程。                The onClipEvent and on actions are called handlers                   because they "handle" or manage an event.                 onClipEvent和on动作被称为事件处理程序是因为它们“处理”或管理事件。                “整个行为过程”指什么?
                  event是指事件,包括:load、enterFrame、mouseMove、mouseDown、press等等。
                  看看这些代码:
                  onClipEvent(load) {
                  #include "myScript.as"
                  }
                  on(press) {
                  startDrag("rabbit");
                  }                                             12                一个行为过程是一个事件例如鼠标的移动过程,关键帧或一个电影剪辑被加载。                An event is an occurrence such as a mouse movement,                   a keypress, or a movie clip being loaded.                事件就是发生的某件事情,如鼠标移动、按键或电影剪辑被加载。                keypress是关键帧,那keyframe是什么?                                             12                当事件被执行者详细列入名单后,电影剪辑和按钮行为才能得以执行。                Movie clip and button actions execute when the                   event specified by the handler occurs.                 当事件管理程序中指定的事件发生时,电影剪辑和按钮的动作被执行。                “当事件被执行者详细列入名单后”—难道是黑名单吗?怎么原文没有写出来!                                             12                同其他脚本语言一样,行为脚本和它的特殊语法结构一样运用特殊的术语。                Like any scripting language, ActionScript uses                   specific terminology according to specific rules of syntax.                                 象任何脚本语言一样,动作脚本语言依据特定的语法规则使用专门的术语。                “行为脚本和它的特殊语法结构一样运用特殊的术语”—你的心情我不懂!                                             13                Actions:表明指示一个电影在播放时所做的行为。                Actions are statements that instruct a                   movie to do something while it is playing.                 Actions(动作):是指令动画在播放时做某事的语句。                statement不是“陈述”吗,又变成行为了?                                             13                Arguments:也称为参数,是引导你通过值到功能的占位符。                Arguments, also called parameters, are                   placeholders that let you pass values to functions.                 Arguments(参数):也称为parameters(参数),是占位符,通过它你可以把值传递给函数。                “引导你通过值到功能”—我还是不明白!                                             13                Class:可以用来建立一个新对象定义功能的数据类型。定义一个对象的数据类型,你可以建立一个功能结构。                Classes are data types that you can create                   to define a new type of object. To define a class of object,                   you create a constructor function.                 Classes(类):是你可以创建的数据类型,可用来定义新的对象。要定义对象的类,你要创建一个构造函数。                   
                                constructor function—功能结构?                                             13                Constructors:是你用来定义一个类别的道具和方法的功能。                Constructors are functions that you use                   to define the properties and methods of a class.                 Constructors(构造函数):是你用来定义类的属性和方法的函数。                properties—道具?                                             13                Data type:可以赋值和操作的数据类型。                Data types are a set of values and the                   operations that can be performed on them.                 Data types(数据类型):是一组值及对这些值执行运算的操作符。                Data types是“可以赋值和操作的数据类型”?                                             13                Functions:一系列可以重复使用的编码,通过赋值可以返回价值。                Functions are blocks of reusable code that                   can be passed arguments (parameters) and can return a value.                                 Functions(函数):是可以被传送参数并能返回值的可重用代码块                “通过赋值可以返回价值”—给函数赋值,然后返回价值?                                             13                每一个连续的类别包括这个类别中所有的参数和方法。                Each instance of a class contains all the properties                   and methods of that class.                一个类的每个实例包含该类的所有属性和方法。                “每一个连续的类别”—什么是连续的类别?                                             14                所有的电影剪辑都是电影剪辑类别参数(如:_alpha,_visible)和方式(如:gotoAndPlay,getURL)的实例。                All movie clips are instances with properties                   (for example, _alpha, and _visible) and methods (for example,                   gotoAndPlay, and getURL) of the MovieClip class.                所有电影剪辑都是MovieClip类的实例,并拥有该类的属性(如_alpha和_visible)和方法(如gotoAndPlay和                   getURL)。                 “所有的电影剪辑都是电影剪辑类别参数和方式的实例”—电影剪辑是类别参数和方式的实例?                                             14                Methods:起着赋予指定对象功能的作用。在一个功能设置完后,就可以成为是那个对象的方法了。                Methods are functions assigned to an object.                   After a function is assigned, it can be called as a method of                   that object.                 Methods(方法):是指派给对象的函数。函数被指派之后,它可作为对象的方法被调用。                “赋予指定对象功能的作用”—我还是、还是、还是不明白!                                             16                这里有两个不同情景的onClipEvent执行者:load和enterFrame。                There are two onClipEvent handlers with two different                   events: load and enterFrame.                 (这里)有两个onClipEvent事件管理程序,分别处理两个不同的事件:load和enterFrame。
                  译注:请参看书中的图2-5。
                                看看附图就知道说什么了!                                             16                如果经过测试,行为返回错误,则行为遵循另一个设置,...                If the hitTest action returns false, the action                   following the else statement runs...                如果hitTest动作返回false,else语句下面的动作被执行,...                “如果经过测试,行为返回错误,则行为遵循另一个设置,”—你知道它在说什么吗?                                             17                Action面板可以帮助你运用两种编辑模式从原始帧开始建立和编辑一个对象的行为。                The Actions panel lets you create and edit actions                   for an object or frame using two different editing modes.                 动作面板让你能够使用两种不同的编辑模式创建和编辑对象或帧的动作。                “从原始帧开始建立和编辑一个对象的行为”—什么是原始帧?怎样从原始帧编辑一个对象的行为?                                             20                当你要转换为正常模式时,Flash就会重新格式化脚本,出现一些白色空格,这说明你已经添加上了。                                 When you switch to Normal Mode, Flash reformats                   the script and strips any white space and indentation you've                   added. 
                                当你切换到正常模式时,Flash重新格式化脚本,去除你添加的空格和缩进。                 “这说明你已经添加上了”—怎样说明?添加上什么了?                                             20                行为脚本可以在发现错误和Flash出现不可对比的情况下及时报警,同时也可以提示脚本成分不支持的形式。                The Actions panel displays warning highlights                   for syntax errors and Flash Player version incompatibilities.                   It also highlights deprecated, or no longer preferable, ActionScript                   elements. 
                                动作面板用警告性加亮显示语法错误和Flash播放器版本的不兼容性。它也加亮显示不赞成使用的或不再使用的                   动作脚本元素。 
                                “Flash出现不可对比的情况”—什么是不可对比的情况?
                  在Flash 5中倒是建议不再使用Flash 4的一些函数和动作(如字符串函数、call等等)。
                                                                     
              这20页就花了我大半天的时间去整理。闪客发烧友,如果你需要其它页的勘误表请告诉我,有空时我会尽我的能力整理。不过,你也可以写信给该书的专家作者和出版社,可能近期他们也会发行勘误表的。如果这样,也就不需要愚者费心了。
            
              唉,买了这本书,63元可是我的半个月饭钱呀!
            
            
            
                         http://www.yesky.com/20010529/182070.shtml";> 

                        
责任编辑:古墓
上一篇: CorelDRAW制作三维齿轮 下一篇: 显示隐藏鼠标
 
头发飘动系列教程贴图(更新)
交互控制线段的改变(新手教程)!
关于面向对象编程的一些规则
用编程方式实现3D效果
AS 良好的编程习惯
SWF Decompile MX 2005发布-闪客危
插件系列教程之二提示框
Panopticum公司的AE插件全系列最新
FLASH入门及学AS编程的正确途径
超级简单的网页标题栏制作(无as)
粉笔画系列教程
顶级网页配色词典,培养你的色感