我的Flash網站項目上使用deeplinking時遇到了一些問題。如何與外部SWF進行深度連接? (ActionScript 2.0)
我下面這個教程http://www.padizine.com/blog/swfaddress-tutorial-for-actionscript-2-0/
,這不行。上面我的代碼:
在我的HTML文件
<script type="text/javascript" src="javascript/swfaddress.js"></script>
和
<script type="text/javascript">
// <![CDATA[
var so = new SWFObject("site.swf", "ZONAZEN", "990", "580", "8", "#73746E");
so.addParam("scale", "noscale");
so.addParam("allowFullScreen", "true");
so.addParam("wmode","transparent");
so.useExpressInstall('javascript/swfobject/expressinstall.swf');
so.write("flashcontent");
// ]]>
</script>
在我的Flash文件:
import com.asual.swfaddress.SWFAddress; // on my first frame in my flash
//及以上,這是我作爲按鈕(我對每個菜單項都有一個這樣的....:
on (release){
if (_root.olink != num) {
SWFAddress.setValue("empresa");
this.tween("_y",16,1,"easeOutExpo",0);
_root.conteudo.tween("_y",37,1,"easeOutExpo",0);
_root.omenu.item_2.tween("_y",469,1,"easeOutExpo",0);
_root.omenu.item_3.tween("_y",490,1,"easeOutExpo",0);
_root.omenu.item_4.tween("_y",511,1,"easeOutExpo",0);
_root.omenu.item_5.tween("_y",532,1,"easeOutExpo",0);
_root.omenu["item_"+_root.olink].fundo_menu_ativo.tween("_alpha",0,1,"easeOutExpo",0);
_root.olink = num
}
}
我loadmovieclip功能:
function loadMovieClip(externalTarget:String, targetRoot:MovieClip) {
var mcLoader:MovieClipLoader = new MovieClipLoader();
var listenerLoad:Object = new Object();
listenerLoad.onLoadStart = function(target:MovieClip) {
_root.loade._visible = true;
_root.loade.tween("_alpha",100,1,"easeOutExpo",0);
};
//Loading Progress
listenerLoad.onLoadProgress = function(target:MovieClip, bytesLoaded:Number, bytesTotal:Number):Void {
percent = Math.round(bytesLoaded/bytesTotal * 100);
_root.loader.percentTxt.text = percent + "%";
};
//On Load Complete
listenerLoad.onLoadComplete = function(target:MovieClip):Void {
_root.loade.tween("_alpha",0,1.5,"easeOutExpo",0,function() {
_root.loade._visible = false;
});
_root.conteudo.tween("_alpha",100,1.5,"easeOutExpo",0,function() {
content_blocker._visible = false;
});
};
mcLoader.addListener(listenerLoad);
mcLoader.loadClip(externalTarget,targetRoot);
}
和
function saiconteudo() {
_root.swfToOpen = _root.movie;
_root.content_blocker._visible = true;
_root.conteudo.tween("_alpha",0,1,"easeOutExpo",0,function() {
_root.loadMovieClip(_root.swfToOpen,_root.conteudo);
});
}
我正在忘卻的東西嗎?
Ty for help!
任何人都可以幫忙????? – Preston