(3)在Flash中通过Geturl传送参数给Director,在Director中接受Flash传递的参数,然后执行相应的lingo命令,如:
在flash的按钮上加入下面的ctionscript
On (Release)
Get URL ("botton1")
End On
然后在DR的moviescript中,使用geturl函数执行相应的lingo命令:
on geturl me,kk –kk为geturl函数的参数
case kk of
"botton1": go to frame "Mark1"
"botton2": go to frame "Mark2"
end case
end geturl 作者: 五星上将 时间: 2014-11-5 07:58
Director To Flash的信息传递:
在Director中对flash的信息传递的指令相对要丰富得多
(1)在Director中控制flash演员播放、停止等命令
sprite(FlashSpriteNum).play() --播放 flash 演员
sprite(FlashSpriteNum).stop() –停止flash演员的播放
类似的函数有 rewind()、gotoframe() 等等,其详细的用法见前面的“控制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作者: 五星上将 时间: 2014-11-5 07:59
再补充一点
1. 正常播放(Playing)
Sprite(whichFlashSprite).play()
这里使用Director 7 and 8 所使用的dot syntax. 括号里的whichFlashSprite, 你替换成相应的Flash 所在的通道号就可以了。如果Flash sprite目前是暂停的, play 指令将会使Flash sprite 从所停止的那一帧开始播放, 而不是从头播放。