Hi I want when change members in specific sprite, new member don't scale to prev member size,
as soon as you have set the rect (or the width or height) of a sprite (or any other sprite property for that matter) it overrides the *default* sprite setting, which in case of the rect property is the default rect of the member.
so if you *touched* the rect property of the sprite once, it gets 'puppeted' and further control is up to you.
so there are three options: - take complete control over the rect yourself - unpuppet the sprite before changing the member - don't 'touch' the rect property in the first place
1.)
-- assume we have already changed the rect using lingo: sprite(1).rect = rect(10, 10, 20, 20)
on changeMember me, newMemb spr = sprite(me.spritenum) spr.member = newMemb mrect = newMemb.rect
-- assuming we want to center the new rect into the old rect: offsetH = spr.left + (spr.rect.width - mrect.width)/2 offsetV = spr.top + (spr.rect.height - mrect.height)/2
spr.rect = mrect.offset(offsetH, offsetV) end
2.)
-- assume we have already changed the rect using lingo: sprite(1).rect = rect(10, 10, 20, 20)
on changeMember me, newMemb spr = sprite(me.spritenum) spr.puppet = 0 spr.member = newMemb end
3.)
-- don't change the sprite rect this time
on changeMember me, newMemb spr = sprite(me.spritenum) spr.member = newMemb end
--
||| a�ex --
[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!]
