Flash设置为首页和收藏夹的代码

来源:互联网 发布:网络推广简历 编辑:程序博客网 时间:2024/06/04 19:44

 Flash 可加入收藏夹的动作按钮

Flash中点击按钮可将网页加入收藏夹的代码,在图型或其他按钮的动作中添加以下语法:

on (release) {
getURL("javascript:void window.external.AddFavorite('http://www.u8.blog.163.com','互联友吧);", "_self", "POST");
}


Flash 可设为首页的动作按钮

 Flash中点击按钮可设为首页的代码,在图型或其他按钮的动作中添加以下语法:

on (release) {
getURL("javascript:void(document.links[0].style.behavior='url(#default#homepage)');void document.links[0].setHomePage('http://www.u8.blog.163.com/');", "_self", "POST");
}

 

其他常用的动作
1、链接

on (release) {
getURL("gsjj.htm", "_self");
}

2、播放到某一桢停止

stop();

3、当鼠标经过时动画播放到某处

on (rollover) {
gotoAndPlay(10);
}
当鼠标按下时动画播放到某处
on (release) {
gotoAndPlay(1);
}

4、播完动画后自动跳到某网页

getURL("siteindex.htm", _self);

5、设为首页

on (release) {
getURL("javascript:void(document.links.style.behavior='url(#default#homepage)');void document.links.setHomePage ('http://www.flash8.net/')", "_self", "POST");
}

注意要将网页中的flash的ID号命名为"links"

加入收藏夹
on (release) {
getURL("javascript:void window.external.AddFavorite('http://www.163.com','网页');", "_self", "POST");
}