Adobe Flash CS4 ActionScript 3.0编程入门指南

需积分: 48 4 下载量 125 浏览量 更新于2024-09-27 收藏 10.72MB PDF 举报
"Adobe Flash CS4 ActionScript 3.0 Programming 是一本针对初学者设计的Flash编程教程,由Adobe Systems Incorporate出版。这本书专注于Adobe ActionScript 3.0语言,这是Adobe Flash平台的核心编程语言,用于创建交互式内容和应用程序。书中详细介绍了如何利用ActionScript 3.0进行图形处理、动画制作、用户界面设计以及网络通信等关键技能。 本书的版权信息表明,除非获得Adobe Systems Incorporate的书面许可,否则禁止任何形式的复制、存储或传播书中的内容,包括但不限于电子、机械、录音或其他方式,这体现了Adobe对知识产权的尊重和保护。内容仅为参考,可能会随时更新,Adobe Systems Incorporate并不对信息的准确性或完整性做出任何承诺,也不承担因使用指南内容产生的任何责任。 书中还提醒读者注意版权问题,特别是涉及插图、图像等内容,如果没有得到版权所有者的许可,将可能侵犯其权益。作者特别指出,在范例模板中提及的公司名称仅为教学示例,不代表实际组织,同时也列出了Adobe及相关技术的商标信息,如Adobe、ActionScript、Flash、Flex等,这些都是Adobe公司在全球范围内享有注册商标权的产品或服务。 这本书是学习Adobe Flash CS4环境下ActionScript 3.0编程的理想入门资源,适合希望通过这个平台深入探索互动媒体开发的初学者,同时也强调了在使用过程中遵循版权法和许可协议的重要性。"

for (var i = 1; i <= 9; i++) { var img_mc:MovieClip = this["tu" + i]; // 添加点击事件监听器 img_mc.onPress = function() { // 创建该图像的副本,并将其设置为可拖动 var target_mc:MovieClip = this.duplicateMovieClip(this._name + "_copy", _root.getNextHighestDepth()); target_mc.startDrag(); target_mc.onPress = function() { this.startDrag(); }; // 在鼠标移动事件处理程序中,将图像的位置设置为鼠标位置 target_mc.onMouseMove = function() { if(Key.isDown(Key.H)) { // 从舞台上删除该剪辑 this.removeMovieClip(); return; this._x = _root._xmouse; this._y = _root._ymouse; } // 检查图像是否与其他图像重叠,并根据需要更新其透明度 for (var j = 1; j <= 9; j++) { var other_mc:MovieClip = _root["tu" + j]; if (target_mc != other_mc && target_mc.hitTest(other_mc)) { target_mc._alpha = 50; return; } } target_mc._alpha = 100; }; // 在鼠标释放事件处理程序中,检查图像是否与其他图像重叠 target_mc.onRelease = target_mc.onReleaseOutside = function () { this.stopDrag(); this.onMouseMove = null; target_mc.onRelease = target_mc.onReleaseOutside = function () { this.stopDrag(); }; // 检查图像是否与其他图像重叠,并根据需要更新其透明度 for (var j = 1; j <= 9; j++) { var other_mc:MovieClip = _root["tu" + j]; if (target_mc != other_mc && target_mc.hitTest(other_mc)) { target_mc._alpha = 50; return; } } // 将图像放置在当前位置,并将其透明度设置为100% target_mc._alpha = 100; target_mc.swapDepths(_root.getNextHighestDepth()); }; }; }运行时提示没有h的属性 要怎么做

2023-05-24 上传