Copy link to clipboard
Copied
Dear All
I am trying to get a visibility(or opacity) statements working in a IF statement,If I use one visibility in the output of the IFstatement it works, add another and the movie will not run in the browser and I get a console left side error
If I delete one of the visible callouts in each it works, I also tried adding(;) and(&) to join statements also did not work .If I use normal statement and I use (&) to join together such as:
this black_mc.gotoAndStop(2) & this.redball_mc.gotoAndStop(2)
it works fine and I can add as many statements as I like, only the visibility (or opacity) seems to cause problems.
Thank for your help
this.black_sw.addEeventListener("click",f1_ClickToHide.bind(this));
function f1_ClickToHide()
{
if (this. black_mc. visible == true)(
this.black_mc. visible = false
this.redball_mc. visible = true)
else if (this. black_mc. visible == false)(
this.black_mc. visible = true
this.redball_mc. visible = false
)
}
// this works
this.black_sw.addEeventListener("click",f1_ClickToHide.bind(this));
function f1_ClickToHide()
{
if (this. black_mc. visible == true)(
this.black_mc. gotoAndStop(2)&
this.redball_mc. gotoAndStop(2)
else if (this. black_mc. visible == false)(
this.black_mc. gotoAndStop(4)&
this.redball_mc. gotoAndStop(4)
// will not work without(&)
)
}
Copy link to clipboard
Copied
same problem as yesterday with improperly formatted if-statements and inappropriate bitwise operators (though the statements will execute).
Copy link to clipboard
Copied
Yes I agree
Thank you just getting back into adobe animate after a long hiatus did not spot my error thank you.
Copy link to clipboard
Copied
you're welcome.