I think I understand what you want.  If so, you definitely want to 
use a single behavior and attach that same behavior to multiple 
sprites (in your case, the rectangle, circle, and triangle) sprite. 
Here's a sample behavior that will start the sprite rotating when 
clicked:

property pRotating -- TRUE/FALSE if rotating or not
property spriteNum -- automatically given the correct number

on beginSprite me
   pRotating = FALSE  -- start off not rotating
end

on mouseUp me
   pRotating = TRUE -- change state to rotating
end

on exitFrame me
   -- Here's where you do the rotating part
   if pRotating then
      sprite(spriteNum).rotation = (sprite(spriteNum).rotation) + 5
   end if
end


Each copy (instance) of the behavior will constantly receive 
exitFrame messages, but each copy will only rotate the sprite it's 
attached to if that sprite has been clicked on.

Irv

At 4:29 AM -0700 9/19/02, nitin sharma wrote:
>hi Buzz Kettles
>
>i think i could not explaned.
>well i try it again
>
>spose i have three sprite on the stage
>  a (rectange)
>  b (cirle)
>  c (triange)
>
>i want when i click on "a(rectangle)" it start
>rotating
>and just like that when i click one by one on next
>sprites, only then it should start rotating.
>
>but at the start all sprite should stoped.
>
>i think now u got what i m try to do.
>
>i have an idea
>
>is there any way to put one sprite script to another
>sprite?
>
>spose i write script on "a(rectange)"
>
>on mouseup
>set the rotation of sprite the currentspritenum = the
>rotation of sprite the currentspritenum + 5
>end
>
>and when i click on "b(circle)" the same script put on
>circle sprite and it also start rotating.
>


-- 

Lingo / Director / Shockwave development for all occasions. 
          
   (Home-made Lingo cooked up fresh every day just for you.)
[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