I've got the buttons set to dynamic, and the icon of the buttons are resized 24-bit png images set to alwaysBuffer = true. Thoughts on how to smooth/speed this sucker up? Are such animations simply not feasible on mobile?
Code: Select all
command animateMoveButton theButton startLoc endLoc fadeMode
debugIt (" animateMoveButton " & theButton & ", " & startLoc & ", " & endLoc & ", " & fadeMode)
put 1000 into effectTime
put 50 into effectSteps
set the loc of button theButton to startLoc
put the first item of startLoc into startLocX
put the second item of startLoc into startLocY
put the first item of endLoc into endLocX
put the second item of endLoc into endLocY
set the ink of button theButton to "blendClear"
if fadeMode = "in" then set the blendLevel of button theButton to 100
if fadeMode = "out" then set the blendLevel of button theButton to 0
repeat with i = 1 to effectSteps
put 0 into theFade
if fadeMode = "none" then put 0 into theFade
if fadeMode = "in" then put (100 - (the round of (i * (100 / effectSteps)))) into theFade
if fadeMode = "out" then put (the round of (i * 100 / effectSteps)) into theFade
put round(startLocX + (((endLocX - startLocX) / effectSteps) * i),0) & "," & round(startLocY + (((endLocY - startLocY) / effectSteps) * i),0) into theLoc
send (moveIt && "theButton, theFade, theLoc") to me in ((effectTime/effectSteps) * i) milliseconds
end repeat
end animateMoveButton
command moveIt theButton theFade theLoc
debugIt (" effect moveIt acting upon button " & theButton & " with fade " & theFade & " and loc " & theLoc)
set the visible of button theButton to true
set the blendLevel of button theButton to theFade
set the loc of button theButton to theLoc
end moveIt