At 23:36 +0800 04/12/2002, noelle cheng wrote:
>Rather I used 20 frames. But here you are suggesting only one
>frame. Is this common?
Well, if you're going to be assigning interactive code to given
sprites, I'd suggest it's much more useful to use only one or two
frame spans in which to do it. If you have a 'go the frame' on frame
1, for instance, and code attached to the sprites in frame 1,
spanning anything outside that frame might not make much sense.
>I do not understand. How can a behavior be attached to a frame?
>Isn't a behavior attached to a sprite?
Aha, ha, yes and no. It's possible to have spriteless behaviors, and
it is possible to attach behjaviors to only part of a sprite's span.
The commonest way is to associate a behavior's totality of existence
with a sprite's totality of existence, but this is really a
misconception fostered in part by keywords such as 'beginSprite'. One
thing not discussed about behaviors, for example, is that they
receive 'new' events too.
>I shortened the sprite to one frame as you suggested. I've taken
>away all other lingo commands.
>
>And these three scripts are all I use, is this correct?
Should be, yes.
> I'm sorry, but why does it still not work?
I haven't any idea, unfortunately. Sprite 250 is the one you want to
switch on and off, correct? That the visible behavior is being
attached to some other sprite someplace in the same frame?
>When I run it, the debugger appears with this message:
>
>sprite(250).visible = not ( sprite(250).visible )
>
>with the words me<offspring'''''' 34956fc>
>
>These are variables,I know. What has the offspring got to do with it?
That's a memory address -- the location in memory where the behavior
resides. It seems as though the line is executing. At that point you
should see the sprite in channel 250 disappear.
Wait a minute, something just occurred to me -- you're not referring
to *cast member* number 250, are you? I mean, are you expecting the
item in position number 250 in your Cast window to be affected by
this code, as opposed to the item in Score channel number 250 to be
affected?
--
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!]