|
document.links[0].style.behavior='url(#default#homepage)');void document.links[0].sethomepage('http://www.flashempire.com/');", "_self", "post"); }
加入收藏夹: on (release) { geturl("javascript:void window.external.addfavorite('http://www.flash8.net','闪吧');", "_self", "post"); } 二,用fscommand的方法,有点复杂
1,先在flash的按钮上添加代码:
首页: on (release) { fscommand("sethomepage", "http://www.flash8.net";); }
收藏夹: 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。问: 怎样引入透明
|