As far as I know, there is no way to group sprites in the interface.
There are a few approaches to "grouping" sprites using Lingo. Here is a
simple approach using sprite messaging. There are obvious limitations to
this method, but it outlines one way of Lingo sprite grouping.
Rich
----- spriteGroupReceiver
property pGroup
on doGroup me, group, action
if pGroup = group then do action
end
on getBehaviorDescription
return "Executes an action on a specified sprite group, sent via
sendAllSprites. Use the following message syntax:
'sendAllSprites(#doGroup, <groupName>, <action>)' where <groupName> is a
group name in string format, and <action> is a Lingo command or handler
name."
end getBehaviorDescription
on getPropertyDescriptionList
d = [:]
addProp(d, #pGroup, [#comment:"Group Name:", #format:#string,
#default:""])
return d
end getPropertyDescriptionList
------ spriteGroupSender
property pGroup
property pAction
property pTrigger
on init me
sendAllSprites(#doGroup, pGroup, pAction)
end
on getBehaviorDescription
return "Sends specified sprite group a specified Lingo action. Requires
accompanying 'spriteGroupReciever' behavior."
end getBehaviorDescription
on getPropertyDescriptionList
d = [:]
triggerList = [#mouseUp, #exitFrame, #mouseEnter, #mouseLeave,
#mouseWithin, #mouseUpOutside, #enterFrame, #prepareFrame, #beginSprite,
#endSprite]
addProp(d, #pGroup, [#comment:"Group Name:", #format:#string,
#default:""])
addProp(d, #pAction, [#comment:"Lingo Action:", #format:#string,
#default:""])
addProp(d, #pTrigger, [#comment:"Trigger Event:", #format:#symbol,
#range:triggerList, #default:triggerList[1]])
return d
end getPropertyDescriptionList
on mouseUp me
if pTrigger = #mouseUp then init me
end
on exitFrame me
if pTrigger = #exitFrame then init me
end
on mouseEnter me
if pTrigger = #mouseEnter then init me
end
on mouseLeave me
if pTrigger = #mouseWithin then init me
end
on mouseUpOutside me
if pTrigger = #mouseUpOutside then init me
end
on enterFrame me
if pTrigger = #enterFrame then init me
end
on prepareFrame me
if pTrigger = #prepareFrame then init me
end
on beginSprite me
if pTrigger = #beginSprite then init me
end
on endSprite me
if pTrigger = #beginSprite then init me
end
[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!]