How can I assign multiple sprites?

Hello:
I am trying to assign several sprites when I roll over a button. Basically, he says:

on mouseEnter me
visibility of Sprite (3) = 1
visibility of Sprite (4) = 1
visibility of Sprite (5) = 1
end
on mouseLeave me
visibility of Sprite (3) = 0
visibility of Sprite (4) = 0
visibility of Sprite (5) = 0
end
How will I know it affects 3 of them in one line? I tried:

on mouseEnter me
Sprite (3,4,5) visibility = 1
end

but it did not work.
It is not a problem when its is only a few sprites... but I would need to assign 10-15.
Any help would be great...
Thank you!
Rafael.

You can use a repeat loop where you make a list of the numbers of sprite
then go through this list

on mouseEnter me
Repeat with i in [3,4,5]
visibility of Sprite (i) = 1
end repeat
end

OR

on mouseEnter me
mySprites = [3,4,5]
Repeat with i in mySprites
visibility of Sprite (i) = 1
end repeat
end

This would be the way to set the directoly. You cannot use a
a lot of tight loops repeat if there is a lot of the latter, since
that will tend to lock up Director until the end of the rehearsal loop.
A simpler method is to use sendAllSprites.

In the script that sits on the sprites you want to control the
visibility of, add a handler custom like this:

on setVisible, LIvVE
Sprite (me.spriteNum) .visible = LIvVE
end

Then, on your button, you would have a code like this:

on mouseEnter me
sendAllSprites(#setVisible,1)
end

on mouseLeave me
sendAllSprites(#setVisible,0)
end

Now, when the mouse is over (or leaves) this sprite, any sprite who
a custom manager puts its visibility on or off

Tags: Director

Similar Questions

Maybe you are looking for

  • Calendar alerts stopped working in IOS 10

    I can't understand why, but calendar alerts do not go to sea. Very frustrating. I searched around online, made sure that I am not on do not disturb, etc.. Anyone else having this? I think it's a problem on my iPad, since alerts on this device (annoyi

  • I can't get the Zonealrm toolbar to install on Firefox 4.0

    I have Firefox installed 4.0. I just installed Zonealarm which has a toolbar called "Zonealarm Toolbar" included in the package is supposed to install on my Firefox browser. However, rather than installing the component, I found that it listed in the

  • Upgrade L512 CPU with INTEL i7 3612QM

    Hello! I have lenovo l512 with processor i5 - 520 m on socket PGA988. Unfortunately, I have to buy a new processor for my laptop, so I'm looking for some suitable image i7. If possible. I found that INTEL i7-3612QM has the same socket (PGA988) and TD

  • How to create random file names

    I have a folder containing 600 JPEG files. I want to replace the current file with those randomly generated names. So instead of files names IMG_11.jpg, IMG_12.jpg, IMG_13.jpg, I don't want to see something like 342.jpg, 8.jpg 107.jpg. Could someone

  • Support HTML5 history component BrowserField?

    Hi all I use BrowserField component to display external views in my HTML application using AJAX technology in navigation. I've implemented HTML5 history (http://www.w3.org/TR/html5/history.html) in order to manage requests for return. I know that the