At 00:20 +0800 04/13/2002, noelle cheng wrote:
>When I click on the sprite that is meant to be invisible, the sprite
>number appears, next to the small i.
>
>That number is 250.
>
>Is this what you mean?
OK -- that's what's wrong. You're clicking Cast member number 250.
There are three main control windows in Director that you use most
often -- the Stage, where you do the screen composition of your
program; the Cast, which contains all the media elements that you're
going to be putting on the Stage, and the Score, which looks almost
exactly like a spreadsheet.
When you have Cast members in the Cast window, they can be thought of
as being "ready" to show onscreen. When you drag one of those Cast
members to your Stage, they appear, and they also create sprite and
frame instacnes for themselves in the Score.
When you're referring to items in the Score, they are sprites. When
you're referring to them in the Cast, they are Cast members. The
numbers that they occupy in the Cast bear no relationship whatsoever
to the numbers of the channels they occupy in the Score.
So with a brand-new movie, if your "control" button is the first
thing you place on the Stage, it will appear as *sprite* number 1 in
the Score -- it will appear in channel 1, and will span across 28
frames by default. Regardless of its position in the Cast window, and
regardless of its number in the Cast window, it is now *sprite*
number 1.
Similarly if your button to be made invisible is the *second* thing
you drag onto the Stage, it will appear in channel 2. It becomes
*sprite* number 2, whether or not it is Cast member number 250.
Thus when you want to make that sprite invisible, you send a command
to Director to set sprite(2).visible = false. That will "mute" the
channel numbered 2 in the Score, making the target sprite disappear.
So while the button sprite's *Cast* member is number 250, its sprite
number is a different thing entirely. If you refer to it by its
sprite number in your code (rather than its Cast number) you should
find everything working again.
--
Warren Ockrassa | http://www.nightwares.com/
Director help | Free files | Sample chapters | Freelance | Consulting
Author | Director 8.5 Shockwave Studio: A Beginner's Guide
Published by Osborne/McGraw-Hill
http://www.osborne.com/indexes/beginners_guides.shtml
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi To post messages to the list, email
[EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for
learning and helping with programming Lingo. Thanks!]