rect of sprite quirk


[ Zettels Traum ] [ search / suche ]


>Jakob Hede Madsen wrote:
>The rect is bogus until enterFrame, but for some reason this works:
>
>on beginSprite me
>  set mySprite = sprite the spriteNum of me
>  set L = the left of mySprite
>  set T = the top of mySprite
>  set R = the right of mySprite
>  set B = the bottom of mySprite
>  set pSprRect = rect(L, T, R, B)
>  put pSprRect
>end
>

This is true.. and really useful information... thanks!

It gets wierder folks, this also works:

on beginSprite me
  set L = the left of sprite the spriteNum of me
  put the rect of sprite the spriteNum of me
end

seems that checking the left (or right, top, bottom etc), causes director to
update the rect property!

Ben Short






Dazu:























D. Plänitz