|
Flash初学者123个常见问题收集整理(5) var Movie1Obj = InternetExplorer ? Movie1 : document.Movie1; // Place your code here... if (command == "open_window") { arg_array=args.split(";"); window.open(arg_array[0],arg_array[1],arg_array[2]); } } ... --------------------------------------------------------------------------------
OK! 如果是插入现有的html页,可以先发布,再copy相应的代码到html文件。
25。问: 如何用action控制倒放? 答: 做一个mc放在合适的地方,里面有两帧 第一帧: If (GetProperty ("/a",_currentframe)<=1) Begin Tell Target ("/a") Go to and Stop (GetProperty ("/a",_totalframes)) End Tell Target Else Begin Tell Target ("/a") Go to and Stop (GetProperty ("/a",_currentframe)-1) End Tell Target End If 第二帧: Go to and Play (1)
这样就可以让/a倒放
但是还有一个问题无法解决: 如果我只想停一段呢?[/color] 比如说,我在第十个关键帧处加了一个STOP,在第三十个关键帧处加了一个STOP,现在想倒到STOP处停下来,却没有办法做到。
If (GetProperty ("/a",_currentframe)<=1) Begin Tell Target ("/a") Go to and Stop (GetProperty ("/a",_totalframes)) End Tell Target Else Begin Tell Target ("/a") Go to and Stop (GetProperty ("/a",_currentframe)-1) End Tell Target End If 第二帧: Go to and Play (1) 这一段肯定放在一个mc 里, 假设这个mc为/b 在/a需要停止的帧理设置 Begin Tell Target ("/b") stop End Tell Target stop 就可以了
26。问: 内部声音角色与外部声音角色有何差异? 答: 没什么太大的区别 外部文件如果导如的话可以降低文件的大小 在发布的时候或者做成光盘的时候需要和DCR文件一起走,并且始终保持相对路径不变
还有一个流式播放的问题 如果导入的声音文件过大就会影响同步效果,声音滞后。(因为Director在播放内部声音之前就将其预栽到RAM中)外部声音文件是流式的,一边播放,一边下载。但要注意连接路径问题。
27。问: 如何使声音无限循环? 答: 将声音的循环次数定义成足够大,如果你的音乐设为STREM(音频数据流)那你的swf文件也会足够大。
28。问: 如何控制声音的播放及停止 答: 在library 里右健点击声音文件,选linkage… 设置Export This Symbol entifier: 取名为"sound"
然后就可以在stage里面设置了 s = new Sound();
|