Polling an object's visibility

Is there a way to poll if an object is visible or not? I’d like to include this in conditional statement IE:

if ('#objectX' is not visible) {
    $w('#objectX').show("zoom", zoomOptions);
  }

Currently I’m just showing the object again no matter what, but I’d like to show it with an animation, and if the object is visible then the animation cuts the object off and brings it back on again.

I know I can keep track of it’s state via a variable, but I was hoping for something simpler.

Thanks in advance!
David

Hi, David.

Does the following work for you:

if (!$w('#objectX').isVisible) {
    $w('#objectX').show("zoom", zoomOptions);
  }

?

I think so! Brilliant.

Thanks - I’ll let you know if I run into any issues.