b.编写菜单项选择棒行为脚本(响应范围只限于赋予本行为的角色),按窗口上角的 
--当鼠标移入当前菜单选择棒时,即用户选中某菜单项了
--让鼠标指针变成小手形状,且把菜单选择棒的透明度改成100(完全可见)
on mouseEnter
sprite (the currentSpriteNum).blend = 100
cursor 280
end mouseEnter
--当鼠标移出当前菜单选择棒时,即用户不选某菜单项了
--把鼠标指针还原成原来指针形状,且把菜单选择棒的透明度改成0(不可见)
on mouseLeave
sprite (the currentSpriteNum).blend = 0
cursor -1
end mouseLeave
--当用户在某一菜单选择棒上按下鼠标时,执行相应的操作
on mouseDown
-- 通过 the currentSpriteNum(鼠标点击的菜单选择棒的角色编号) 属性,
-- 可以让计算机知道用户选择的菜单项,进而使计算机做出相应的操作。
case (the currentSpriteNum) of
4:alert"跳转到 Windows XP 画面!"
5:alert"跳转到 Windows 2000 画面!"
6:alert"跳转到 Windows NT workstation 4.0 画面!"
7:alert"跳转到 Windows NT Sever 4.0 画面!"
8:alert"跳转到 Windows ME 画面!"
9:alert"跳转到 Windows 98 画面!"
10:alert"跳转到 Windows 95 画面!"
11:alert"跳转到 Windows CE 3.0 画面!"
12:alert"跳转到 Windows NT Embedded 画面!"
end case
end mouseDown
巧 巧 读 书:http://www.qqread.com/director/g524387000.html进入讨论组讨论。

按钮,新建一个脚本,起名为“Show Bar Script”,设置其脚本类型(type)为“behavior”。然后在脚本编辑窗口里写入以下脚本:
--当鼠标移入当前菜单选择棒时,即用户选中某菜单项了
--让鼠标指针变成小手形状,且把菜单选择棒的透明度改成100(完全可见)
on mouseEnter
sprite (the currentSpriteNum).blend = 100
cursor 280
end mouseEnter
--当鼠标移出当前菜单选择棒时,即用户不选某菜单项了
--把鼠标指针还原成原来指针形状,且把菜单选择棒的透明度改成0(不可见)
on mouseLeave
sprite (the currentSpriteNum).blend = 0
cursor -1
end mouseLeave
--当用户在某一菜单选择棒上按下鼠标时,执行相应的操作
on mouseDown
-- 通过 the currentSpriteNum(鼠标点击的菜单选择棒的角色编号) 属性,
-- 可以让计算机知道用户选择的菜单项,进而使计算机做出相应的操作。
case (the currentSpriteNum) of
4:alert"跳转到 Windows XP 画面!"
5:alert"跳转到 Windows 2000 画面!"
6:alert"跳转到 Windows NT workstation 4.0 画面!"
7:alert"跳转到 Windows NT Sever 4.0 画面!"
8:alert"跳转到 Windows ME 画面!"
9:alert"跳转到 Windows 98 画面!"
10:alert"跳转到 Windows 95 画面!"
11:alert"跳转到 Windows CE 3.0 画面!"
12:alert"跳转到 Windows NT Embedded 画面!"
end case
end mouseDown
巧 巧 读 书:http://www.qqread.com/director/g524387000.html进入讨论组讨论。
相关图文阅读
频道图文推荐
健 康 咨 询
时 尚 咨 询
相关专题
- Director MX 2004教程--我的第一个作品 (822次浏览)
- Director 8.5 简单基础实例教程(五) (649次浏览)
- Director Lingo 语言入门(1) (578次浏览)
- 多媒体教学软件开发经验谈 (564次浏览)
- Director MX 2004教程--用Lingo语法和JavaSc (531次浏览)
- Director Lingo 语言入门(2) (444次浏览)
- Director 8.5 简单基础实例教程(八) (440次浏览)
- 制作具有Win XP 风格的菜单 (429次浏览)
- ShockWave 3D 制作系列教程之三 (426次浏览)
- Power Director 3快速上手 (425次浏览)



