Sorry for being a bit blank,

There are two ways I could probably do this, firstly I have lets say 400
members in my cast which are video stills, currently as you know I have
one on the stage and am changing this sprites member by holding down a
key. This way, what I wanted to happen is when the sprites member became
number 400 for it to stop on membernum 400 i.e if I used a text sprite
that said "Stop" and placed it in cast member 400 this would be
displayed on the stage and even if you held your finger down the key it
would go no further.

OR, the other way would be to cast to time to place all the stills in a
film loop, from frame 1-400, and control the playhead some how? Need
help on this one, so that while the key is pressed, frame = frame+1, and
if it is not, to stop where the head currently is. The advantage I'm
seeing of this way is I can have set things happening as and when the
play head moves past certain frames or scripts, i.e sounds.


-KEV-

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of Tab Julius
Sent: 25 April 2002 16:30
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: <lingo-l> membernum queston?

At 02:49 PM 4/25/02 +0100, Kevin McCarthy wrote:

>Hi, If you see the script below I'm tying to stop cycling through the
>cast when it gets to a certain number or even name if that's easier,
>does anyone know how ?
>
>-KEV-
>
>
>on exitFrame me
>   if keypressed("a") then
>     sprite(1).membernum=sprite(1).membernum+1
>   end if


Well, here, where you have the line:

   sprite(1).membernum =sprite(1).membernum

You're just setting it to itself.

Do you want to reset it to 1, or go somewhere else, or... ?

>   if sprite(1).membernum=413 then
>     sprite(1).membernum=sprite(1).membernum
>     go to the frame
>   end if
>end


I think you're misinterpreting how the sprite(1).membernum + 1 works.

Basically, the first time through, it's member is, say, 400.

The line:
   sprite(1).membernum=sprite(1).membernum+1
is evaluated on the right side first, then the result is stored in the 
left.  So on the right, sprite(1).membernum =400.  Add 1 to it, you get 
401, and that's stored in the variable to the left of the equal 
sign.  Since that variable is sprite(1).membernum itself, it has the
effect 
of incrementing sprite(1).membernum, so its values are, successively,
400, 
then 401 next time through, then 402, etc.

Finally, you get to where it's 413.  What do you want to do with it 
now?  Do you want to set it back to the original number, 400?  Do you
want 
to just leave it at 413?  (If so, no need to assign it to itself, just
do 
the 'go to the frame').  It won't change until you change it.

- Tab

[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!]

[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!]

Reply via email to