Hi Michael,

Sorry, no time to rewrite your math for you but you are recalculating every single loop. It's best to get and set the necessary values first and then run a shorter loop using those values.

The last time I did something like this (for extending the stage downwards) I used a timeout rather than a repeat loop. here's a rough idea version (MX 9 syntax.)

property  changeheight, expandamount, animIncrement

on expandDrawer me, drawername
    changeheight = the stage.rect[4] + expandAmount
  end if
  x =  timeout("expander").new(5, #expand, me)
end

on expand me
  if the stage.rect[4] >= changeheight then
    timeout("expander").forget()
the rect of the stage = rect(the stage.rect[1],the stage.rect[2],the stage.rect[3], changeheight)
  else
the rect of the stage = rect(the stage.rect[1],the stage.rect[2],the stage.rect[3], the stage.rect[4] + animIncrement)
  end if
end

hth

Julian

[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