我创建了一个在外部swfs中加载的在线作品集。一切都运行良好,但一旦外部swf加载到包含swf我失去了对外部swfs时间轴的控制。这是一个错误还是只有我忘记的东西
function ValidateAndSend(event:MouseEvent):void{
//validate form fields
if(!name_txt.length) {
status_txt.text = "Please enter your name.";
} else if(!email_txt.length) {
status_txt.text = "Please enter an email address";
} else if(!validateEmail(email_txt.text)) {
status_txt.text = "Please enter a VALID email address";
} else if(!msg_txt.length) {
status_txt.text = "Please enter a message.";
} else {status_txt.text = "Thanks " + name_txt.text + ", your message has been sent!";
variables.userName = name_txt.text;
variables.userEmail = email_txt.text;
variables.userMsg = msg_txt.text;
varLoader.load(varSend);
gotoAndStop(2);
}
}
所以,当我点击发送按钮时,它会发送消息,返回thankyou,但不会转到下一帧。它可以单独工作,但一旦加载到另一个swf中就无法工作。
可能是什么问题?
答案 0 :(得分:0)
我要尝试的第一件事是
this.gotoAndStop(2);
甚至将其作为加载的SWF的文档类
(this as Main).gotoAndStop(2);