推荐给好友 上一篇 | 下一篇

FLASH122个常见问题一(FLASH初学者参见)

 

收藏夹:
on (release) {
fscommand("addFavorite", "http://www.flash8.net|闪吧");
}

然后在发布设置中选择flash with fscommand,发布成html

2,修改html:

找到
// Handle all the the FSCommand messages in a Flash movie
function sethomepage_DoFSCommand(command, args) {
}
这一段,修改成:
// Handle all the the FSCommand messages in a Flash movie
function sethomepage_DoFSCommand(command, args) {
var sethomepageObj = InternetExplorer ? sethomepage : document.sethomepage;
if (command == "setHomePage") {
document.links[0].style.behavior = "url(#default#homepage)";
document.links[0].setHomePage(args);
} else if (command == "addFavorite") {
args = args.split("|");
window.external.AddFavorite(args[0], args[1]);
}
}

最后,如果html里一个链接都没有,还需在<SCRIPT LANGUAGE=javascript>这句的前面添加一句<a href="javascript:"></a>

22.问: 怎么让动画放完后自动关闭?
答: 在最后一桢的ACTION里选FSCOMMOND一项,然后在右边选中QUIT,就可以了

23。问: 怎样引入透明的位图?
答: 最好输入png文件。png是fireworks文档。当然你也可以输入GIF89a格式的透明GIF图片。

24。问: 如何在Flash中打开一个定制的浏览器新窗口?
答: 这个问题,很常见,也讨论过无数次,以前的一些有用的帖子找不到了,现在重新整理如下:
常用也是很简单的方法是用类似
Get URL ("javascript:window.open('new.htm','newwin','width=320,height=320');")
这样的一句,但有很多问题,比如打开了新窗口后,原窗口的内容也被替代了。

1、在Flash中需要执行打开新窗口动作的地方插入以下语句:
FS Command ("open_window", "filename.htm;newwin;toolbar=no,location=no,status=no,
menubar=no,scrollbars=no,resizable=no,width=320,height=200")
其中Arguments:
filename.htm 要打开的文件名
newwin 新窗口的名字
toolbar=no,location=no,status=no,
menubar=no,scrollbars=no,resizable=no,width=320,height=200 新窗口的有关属性,包括尺寸
注意以上三部分要用分号";"分隔

2、在File>Publish setting...中设定
HTML中的Tempalte : Flash with FSCommand
发布

3、编辑发布生成的html文件,找到以下一段:

code:--------------------------------------------------------------------------------<SCRIPT LANGUAGE=javascript>

<!--
var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
// Handle all the the FSCommand messages in a Flash movie
function Movie1_DoFSCommand(command, args) {
var Movie1Obj = InternetExplorer ? Movie1 : document.Movie1;
//
// Place your code here...
//
}
...
--------------------------------------------------------------------------------

改为:

code:--------------------------------------------------------------------------------<SCRIPT LANGUAGE=javascript>
<!--
var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
// Handle all the the FSCommand messages in a Flash movie
function Movie1_DoFSCommand(command, args) {
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]);
}
}
...


33/3<123
 

评分:0

我来说两句

seccode