I want to make my "button 3" visible after click in "button 1" and "button 2". How can I do it?
I have not tried any code cause I have no idea how to do this :p
答案 0 :(得分:-1)
你可以为每个bt使用全局变量,为最后一个btn使用一个监听器,例如,当你点击bt1替换变量的原始值时,让我们说:
bt1 = 0;现在可能是bt1 = 1;
你在根目录的第一帧o中的某处写下这些内容,如果你在当前时间轴之外写下它,请记住指向正确的时间轴。
假设您在根的第一帧写作:
bt1=0;
bt2=0;
mybt._visible = false; //here you turn it off
onEnterFrame = function(){
if (bt1 == 1 && bt2 == 1){
trace("Say it Worked");
mybt._visible = true; //and here you turn it on
delete this.onEnterFrame;
}
}
然后每个按钮必须包含以下内容:
on (release) {
_root.bt1 = 1; // or 2, depends on what button it is
// Your Actions
}
你的隐形按钮必须有一个实例名称,在这种情况下:“mybt”