At 13:12 2/1/01, R Kumar wrote:
>I have lot of sprites of which i have to set blends,
>how can i change this code to use get
>propertydescription list so that i can
>select from a list the sprites that i want to set the
>blend to.

Here's one way.

property pTargetSprite

on mouseEnter me
   sprite(pTargetSprite).blend = 100
end

on mouseLeave me
   sprite(pTargetSprite).blend = 0
end

on getPropertyDescriptionList me
   lSprites = getSprites(me)
   pList = [:]

   pList[#pTargetSprite] = [¬
     #comment:"Pick a sprite:",¬
     #format:#integer,¬
     #default:lSprites[1],¬
     #range:lSprites]

   return pList
end

on getSprites me
   outList = []
   repeat with i = 1 to the lastChannel
     -- you could limit the list to certain types
     -- of sprites, ie: type = #shape, #bitmap, etc.
     if sprite(i).member.type <> #empty then
       outList.append(i)
     end if
   end repeat
   return outList
end


--
Mark A. Boyd
Keep-On-Learnin' :)


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/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