This content has been marked as final. Show 3 replies
The visible property belongs to the sprite channel, not the item that
currently occupies the sprite channel. So, if you set a sprite channel
to be not visible, it will stay not visible until you tell it to be
You may want to use the blend property instead, this property belongs to
the individual element in the sprite channel, not the channel itself.
Be aware that if a sprite's blend value is set to 0, it is still an
active sprite and any code attached to it will work. So a cursor change
will still show if the user slides the cursor over that hidden sprite.
This will not happen if you use the visible property.
Adobe Community Expert
A 3rd commom scheme for hiding sprites is to relocate it off screen,
rollover scripts don't get triggered and some animations might run
quicker without running over phantom 0 blend sprites.
sprite(10).locV = sprite(10).locV - 9000
shifting off screen a relative amount allows one to restoe the original
location with an inverse calculation.
Here'e a self restoring scheme
seldSprite 10, #unhide
-- sprite 10 behavior
on unhide me
if sprite(me.spriteNum).locV < -8000 then -- yes I am hidden
sprite(me.spriteNum).locV = sprite(me.spriteNum).locV + 9000
JB provided a good way to hide / unhide sprites. But, there was a small
> seldSprite 10, #unhide
sendSprite 10, #unhide
Typos are the most common bug in scripts, so should always be the first
thing to check if anything goes wrong.
Director Lecturer / Consultant