photoshop常用语言(2)

2019-02-26 10:27

updatestage end repeat end

安装软件 on startmovie

if quicktimeversion()=\

alert \请先安装quicktime播放程序,再浏览光盘\ open the moviepath \ quit else

alert \您已经安装了quicktime程序\ end if end

如何在用户的系统中侦测到是否安装了QuickTime?

[A] 以下的代码将侦测用户的机器中是否安装了QuickTime3或更高版本,如果没有则启动安装程序(假设Quicktime安装程序与Director程序在同一目录下)并退出正在运行的Director程序,如果安装了则跳转到名为“start”的电影。

on exitFrame --帧脚本

global qtversion --定义全局变量qtversion

put quicktimeversion() into qtversion --quicktimeversion()为侦测系统中的Quicktime的版本号,将版本号存到全局变量qtversion中

if the quicktimePresent = 1 then --the quicktimePresent为侦测是否安装了Quicktime,安装了则其值为1,反之则为0

if qtversion < 3 then --版本是否小于3,小于3的话则执行后面的语句 open \ --启动安装程序

quit --退出Director程序

else --不小于3的话则执行下面的语句 go to movie \ --跳转到电影“start” end if else

open \ --未安装Quicktime则启动安装程序(the quicktimePresent=0) end if end

窗口

on mouseUp

global gTestMIAW

gTestMIAW = window(\)

gTestMIAW.filename = \ gTestMIAW.windowType = 8 gTestMIAW.visible = TRUE end

on mouseUp

tell the stage to play movie\ end

flash播放完之后继续播放下一桢 on exitframe me

if sprite(1).playing=0 then go to the frame + 1 --\ else

go to the frame end if

关于Director与Flash之间的通讯!

Flash To Director的信息传递:

一般来说,Flash给Director传递消息有下面三个方法:

(1)在flash中可以通过Geturl函数直接调用Director的Lingo命令, 如

on (rollover)

{ geturl (\: cursor 280\ on (rollout)

{ geturl (\: cursor 0\

将上面的actionscript加在flash按钮上,然后将其导入到Director中就能实现光标的变换了。 ********

注:当然也可以用linggotonetpage来打开超级连接。

(2)使用flash中的event命令,如: geturl (\aa.txt\\\,\\\dairy\\\

上面的actionscript可以执行director中的影片脚本中的readtxt函数,并传递“aa.txt”和“dairy”两个参数给readtxt函数。

(3)在Flash中通过Geturl传送参数给Director,在Director中接受Flash传递的参数,然后执行相应的lingo命令,如:

在flash的按钮上加入下面的ctionscript On (Release) Get URL (\ End On

然后在DR的moviescript中,使用geturl函数执行相应的lingo命令: on geturl me,kk –kk为geturl函数的参数 case kk of

\go to frame \ \go to frame \ end case end geturl

Director To Flash的信息传递:

在Director中对flash的信息传递的指令相对要丰富得多 (1)在Director中控制flash演员播放、停止等命令 sprite(FlashSpriteNum).play() --播放 flash 演员 sprite(FlashSpriteNum).stop() –停止flash演员的播放

类似的函数有 rewind()、gotoframe() 等等,其详细的用法见前面的“控制flash”。

(2)使用getVariable函数来直接获取flash演员中的值 getVariable(sprite FlashSpriteNum, \

--获取位于通道FlashSpriteNum中的flash演员中变量password的值

(3)使用setVariable函数来设置flash演员中的值

setVariable(sprite FlashSpriteNum, \

--将位于通道FlashSpriteNum中flash演员中的password变量的值设置为soshow.org

帧数控制

sprite(me.spritenum).gotoframe(1) 在DR中控制flash片头的脚本 on exitFrame

if the doubleClick then go the frame+1 --双击跳过片头

if sprite(spnum).frame < sprite(spnum).member.frameCount then--判断是否播放完成后 go the frame else

go the frame+1 end if end

on exitFrame me

if sprite(spnum).playing then--判断是否在播放 go the frame

if the mouseDown then go the frame+1 --单击跳过 else go the frame+1 end if end

flash按钮鼠标解决方案点滴

一、最简单的是在flash中给按钮加入如下的action

On (Roll Over)

Get URL (\: cursor(280)\End On

On (Release Outside, Roll Out) Get URL (\: cursor(-1)\End On

二、在DR中判断通道中的flash是否为按钮 on exitframe go to the frame

if hittest(sprite 1,the mouseloc)=#button then

cursor 280 else

if hittest(sprite 1,the mouseloc)=#normal then cursor -1 end if end if end

三、将通道中的flash中所有按钮都加入鼠标效果 if sprite(1).mouseoverbutton then cursor 280 else cursor 0 end if


photoshop常用语言(2).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:关于借调工作人员的请示

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: