//swf.loadMovie("天庭地图\\天庭地图.swf", "POST");
loadMovieNum("天庭地图\\天庭地图.swf", 1);
//如愿定位
onEnterFrame = function () {
if (_level1) {
with (_level1) {
trace(tt);
}
delete onEnterFrame;
}
};
tellTarget ("swf") {
trace(tt);
}
最终方案:
1.主界面时间轴
var my_mcl:MovieClipLoader = new MovieClipLoader();
var mclListener:Object = new Object();
//锁定被加载swf的主时间轴,让_root统一指向main.swf的主时间轴
my_mcl.loadClip("天庭地图\\天庭地图.swf", sub_mc);
//把sub.swf加载到main.swf主场景名为sub_mc的剪辑中。
//被sub.swf访问的函数
function subCallMain() {
trace("这是主窗口上的!");
}
2.主界面按钮
on (press) {
sub_mc.mainCallSub();
}
3.子界面时间轴
function mainCallSub() {
trace("这个是子窗口上的!");
}
4.子界面按钮
on (press) {
_root.subCallMain();
}
myLSO = new Object();
myLSO = SharedObject.getLocal("Ht_Szxy","/");
myLSO.data.UserName = G_UserName;
myLSO = new Object();
myLSO = SharedObject.getLocal("Ht_Szxy","/");
_global.UserInfo = myLSO.data.UserName;