首页 | CG软件 | CG信息 | CG教程 | 三维作品 | 设计理论 | CG加油站 | 设计鉴赏 | 社区图库 | Flash | 专题 | 顶客 | 论坛 | 博客 | 导航 | 下载 | 高级搜索
RSS
热门: 素材  作品  设计  效果图  创意  3dsmax  优秀作品  Vray  艺术  欣赏

director 应用技巧

来源:pconline 作者: 时间:2007-09-30 点击:
应用   技巧   Director   Director 应用技巧
     1、设置movIE,使之自动缩放以适应屏幕大小

A:使用如下script:
on preparemovie
(the stage).rect=(the desktoprectlist).[1]
(the stage).drawrect=(the desktoprectlist).[1]
end

2、制作带阴影效果的text

field可以作出阴影效果,但在field中应用中文容易死机,我们可以用一个text member但多个sprite,各sprite位置稍稍错开,并适当设置其blend即可。灵活使用之可以得到动态的和彩色的阴影。缺点是数量过多会拖累速度。

3、中文菜单

可以用installmenu的标准方法生成中文菜单,但字体、字号设置全部无效。

4、filmloop播放问题:在一帧内判断一个filmloop播放完毕,再继续播放下一帧。

frame script中含有以下代码,以实现‘‘定格\‘‘:
on exitframe me
go the frame
end
再把以下behavior拖到filmloop sprite即可:
on exitframe me
--但用prepareframe不行?!
tell sprite(me.spriteNum)
if the frame = the lastframe then
ploopcnt = 1
end if
end tell
if ploopcnt then
go next   --或改为其它命令
end if
end

5、对filmloop的控制。

以下behavior的功能是用于一个filmloop sprite,点击暂停,再次点击则继续。
property ppause,pframe
on beginsprite me
ppause=false
pframe=1
end

on mouseup me
ppause=not ppause
if ppause then
tell sprite(me.spriteNum) to pframe=the frame
end if
end

on exitframe me
if ppause then
if pframe=1 then
tell sprite(me.spriteNum) to go to the lastframe
else
tell sprite(me.spriteNum) to go to pframe-1
end if
end if
end
由此我们也可以知道,我们无法使filmloop的播放速度快于movie,但可以用上法的变通来减慢它。
补充说明:tell sprite...用法类似tell window,但尚未见于正式文档,我使用至今,尚未见其出错。

6、在projector用lingo关闭计算机(用于Windows9X),主要用于触摸屏等无人值守的情况等。

A:无论此时计算机是否有打开的程序或窗口,使用下面的lingo语句可直接关机:(仅限于projector)
open ‘‘c:\windows\rundll.exe user.exe,exitwindows‘‘
若要重新启动计算机,改为 ‘‘c:\windows\rundll.exe user.exe ,exitwindowsexec‘‘
当然在实际的projector中不能直接用‘‘c:\windows‘‘,而要用fileio的getosdirectory()等函数先获得系统相应目录。

7、在runtime动态地改为Director内置的图标

最常用和简单的方法是对于一个sprite,施与以下behavior:
on beginsprite me
sprite(me.spriteNum).cursor=280 --手形光标
end
一般的光标设置以上一句就够了,更具个性化的光标设置这里不谈了。

内置图标(有些是相同的):0-4 200 254 256-269 271-272 280-281 284-286 290-304

8、Lingo支持递归!

用到搜索算法的朋友们应该高兴吧。

9、director中事件发生的顺序

prepareMovie
beginsprite for frame 1
stepFrame for frame 1
prepareframe for frame 1
startMovie
enterFrame for frmae 1
exitfrmae for frame 1

beginsprite for next frame

10、设置搜索路径的合适位置

A:实际上,在prepareMovie前,所用到的cast及相关的member包括其链接关系都应作好准备。
所以不可在movie内为自身设置搜索路径。一般在stub player中设置searchpath为佳。
本文地址:http://www.cg3000.com/html/cgTutorials/Multimedia/Director/20070930/director_yingyongjiqiao_38113.shtml
上一篇:Director 8制作模拟刮胡子演示程序(1)
下一篇:Director 疑难解答(5)
关键字:迅雷 快车 Baidu director 应用 技巧
最新评论共有 0 位网友发表了评论
发表评论
评论内容:不能超过250字,需审核,请自觉遵守互联网相关政策法规。
用户名: 密码:
匿名?
注册
图腾CG联盟免责声明:本网站转载纯粹出于为网民传递更多信息之目的,无任何商业目的。如本网站转载稿件涉及版权等问题,请作者速来函admincg3000@163.com联系,在此,我们首先向您表示诚挚的歉意,并将尽快予以改正。本网站上发表的内容只代表作者本人之观点,本网站只出于传递更多信息之目的,并不意味着赞同其观点或证实其内容的真实性。
赞助广告