我不太高兴你,你是说把我的代码从 fla 中删掉,然后粘贴到类文件的 frameOneFunc 中吗?
这里还有一些代码可以关闭。
.fla 代码(我试图运行的函数)
function initialization();
{
//random code...
}
我的类文件中的代码
public function frame1()
{
this.savedstuff = SharedObject.getLocal("myStuff");
this.btnSave.addEventListener(MouseEvent.CLICK, this.SaveData);
this.btnLoad.addEventListener(MouseEvent.CLICK, this.LoadData);
if (this.savedstuff.size > 0)
{
//trying to trigger function here...this is my failed code below
//MovieClip(parent).initialization();
//var e:Event = new Event("runFunc",true)
//dispatchEvent(e)
//dispatchEvent(new Event("initialization"));
this.nameField.y = 800
this.note.y = 800
this.btnSave.y = 800
this.btnLoad.y = 800
this.tigger.y = 0;
trace(this.savedstuff.data.username);
this.nameField.text = this.savedstuff.data.username;
this.note.gotoAndStop(4);
}
return;
}