Timing Moves
Posted: Fri May 24, 2013 3:47 pm
Hi there,
Can someone please explain to me why the time stamps in this code are all identical, regardless if i use aeLockMoves or not, i would expect them to increment by the time each move takes.
on openKeyboard
if not(sKeyboardIsOpen) then
put true into sKeyboardIsOpen
put the loc of img "keyboardCloseButton" into tOrgonalKeyboardButtonLoc
// keyboard entire group
put item 1 of the loc of group "keyboard" into tKeyboardOpenX
put item 2 of the loc of group "keyboard" - (the height of this card / 2) into tKeyboardOpenY
aeLockMoves
put the seconds into field "test" // >>>>>> TIME
aeMoveTo the long ID of group "keyboard",tKeyboardOpenX,tKeyboardOpenY,200,"out"
put the top of group "keyboardKeys" - the bottom of this card + the height of group "keyboardKeys" into tRowMoveDistance
// keys row 1
put item 2 of the loc of group "keyboardRow1" - tRowMoveDistance into tKeyboardOpenY
put cr & the seconds after field "test" // >>>>>> TIME
aeMoveTo the long ID of group "keyboardRow1",tKeyboardOpenX,tKeyboardOpenY,350,"out"
// keys row 2
put item 2 of the loc of group "keyboardRow2" - tRowMoveDistance into tKeyboardOpenY
put cr & the seconds after field "test" // >>>>>> TIME
aeMoveTo the long ID of group "keyboardRow2",tKeyboardOpenX,tKeyboardOpenY,400,"out"
// keys row 3
put item 2 of the loc of group "keyboardRow3" - tRowMoveDistance into tKeyboardOpenY
put cr & the seconds after field "test" // >>>>>> TIME
aeMoveTo the long ID of group "keyboardRow3",tKeyboardOpenX,tKeyboardOpenY,450,"out"
// keys row 4
put item 2 of the loc of group "keyboardRow4" - tRowMoveDistance into tKeyboardOpenY
put cr & the seconds after field "test" // >>>>>> TIME
aeMoveTo the long ID of group "keyboardRow4",tKeyboardOpenX,tKeyboardOpenY,500,"out"
aeUnlockMoves
// close button
put the top of group "keyboardKeys" - the top of group "keyboard" into tWhiteHeight
put tWhiteHeight / 2 into tButtonOffeset
put item 2 of the loc of img "keyboardCloseButton" - round(the height of this card /2) into tButtonSlideDistance
put item 2 of the loc of img "keyboardCloseButton" - tButtonSlideDistance + tButtonOffeset into tNewButtonLocY
put cr & the seconds after field "test" // >>>>>> TIME
aeMoveTo the long ID of image "keyboardCloseButton",tKeyboardOpenX,tNewButtonLocY,600,"out"
end if
end openKeyboard
Can someone please explain to me why the time stamps in this code are all identical, regardless if i use aeLockMoves or not, i would expect them to increment by the time each move takes.
on openKeyboard
if not(sKeyboardIsOpen) then
put true into sKeyboardIsOpen
put the loc of img "keyboardCloseButton" into tOrgonalKeyboardButtonLoc
// keyboard entire group
put item 1 of the loc of group "keyboard" into tKeyboardOpenX
put item 2 of the loc of group "keyboard" - (the height of this card / 2) into tKeyboardOpenY
aeLockMoves
put the seconds into field "test" // >>>>>> TIME
aeMoveTo the long ID of group "keyboard",tKeyboardOpenX,tKeyboardOpenY,200,"out"
put the top of group "keyboardKeys" - the bottom of this card + the height of group "keyboardKeys" into tRowMoveDistance
// keys row 1
put item 2 of the loc of group "keyboardRow1" - tRowMoveDistance into tKeyboardOpenY
put cr & the seconds after field "test" // >>>>>> TIME
aeMoveTo the long ID of group "keyboardRow1",tKeyboardOpenX,tKeyboardOpenY,350,"out"
// keys row 2
put item 2 of the loc of group "keyboardRow2" - tRowMoveDistance into tKeyboardOpenY
put cr & the seconds after field "test" // >>>>>> TIME
aeMoveTo the long ID of group "keyboardRow2",tKeyboardOpenX,tKeyboardOpenY,400,"out"
// keys row 3
put item 2 of the loc of group "keyboardRow3" - tRowMoveDistance into tKeyboardOpenY
put cr & the seconds after field "test" // >>>>>> TIME
aeMoveTo the long ID of group "keyboardRow3",tKeyboardOpenX,tKeyboardOpenY,450,"out"
// keys row 4
put item 2 of the loc of group "keyboardRow4" - tRowMoveDistance into tKeyboardOpenY
put cr & the seconds after field "test" // >>>>>> TIME
aeMoveTo the long ID of group "keyboardRow4",tKeyboardOpenX,tKeyboardOpenY,500,"out"
aeUnlockMoves
// close button
put the top of group "keyboardKeys" - the top of group "keyboard" into tWhiteHeight
put tWhiteHeight / 2 into tButtonOffeset
put item 2 of the loc of img "keyboardCloseButton" - round(the height of this card /2) into tButtonSlideDistance
put item 2 of the loc of img "keyboardCloseButton" - tButtonSlideDistance + tButtonOffeset into tNewButtonLocY
put cr & the seconds after field "test" // >>>>>> TIME
aeMoveTo the long ID of image "keyboardCloseButton",tKeyboardOpenX,tNewButtonLocY,600,"out"
end if
end openKeyboard