Copy link to clipboard
Copied
for whatever reason my code isnt behaving the way it should, and I was wondering if anyone can take a look at it.
Im trying to prevent something firing if text select is equal to a certain name.
it works when I have just one ex. textSelect.name != "b3" but not when I try to add or statements
if (textSelect.name != "b3" || textSelect.name != "b5" || textSelect.name != "b6" ||textSelect.name != "b7" || textSelect.name != "b8" || textSelect.name != "b9" ||textSelect.name != "b10"||textSelect.name != "b11"||textSelect.name != "b12"|| textSelect.name != "b13" || textSelect.name != "b14" ) {
if (textSelect.numLines < 2 && control == "on" && menu1.visible == false)
{
trace(textSelect.name);
trace("ok");
}
}
Your logic is not going to work. It is guaranteed that only one of them at most is going to be equal, so all others have to be not equal.
If you cannot reason out how to code what you really want, explain what you are trying to get the code to do.
Copy link to clipboard
Copied
Your logic is not going to work. It is guaranteed that only one of them at most is going to be equal, so all others have to be not equal.
If you cannot reason out how to code what you really want, explain what you are trying to get the code to do.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now