Page 1 of 1

Move a label

Posted: Thu Mar 03, 2011 5:22 pm
by Pauls74462
How do U slowly move a label from (Top 5, Left 65) to (Top 5 Left 200) and change from visible off to on

Re: Move a label

Posted: Thu Mar 03, 2011 6:54 pm
by bn
Hi Pauls 74462,

make a field (label field or any other) and a button.
set the script of the button to

Code: Select all

on mouseUp
   set the blendlevel of field 1 to 100
   set the top of field 1 to 5
   set the left of field 1 to 65
   put 100 into tCounter
   repeat with i = 65 to 200
      set the left of field 1 to i
      set the blendlevel of field 1 to tCounter
      wait 0 milliseconds with messages -- increase if too fast
      if tCounter >= 1 then
         subtract 1 from tCounter
      end if
   end repeat
end mouseUp
There are other ways to tackle this but without further information this is one of them.

Kind regards

Bernd

Re: Move a label

Posted: Sat Mar 05, 2011 8:34 pm
by Pauls74462
bn wrote:Hi Pauls 74462,

make a field (label field or any other) and a button.
set the script of the button to

Code: Select all

on mouseUp
   set the blendlevel of field 1 to 100
   set the top of field 1 to 5
   set the left of field 1 to 65
   put 100 into tCounter
   repeat with i = 65 to 200
      set the left of field 1 to i
      set the blendlevel of field 1 to tCounter
      wait 0 milliseconds with messages -- increase if too fast
      if tCounter >= 1 then
         subtract 1 from tCounter
      end if
   end repeat
end mouseUp
There are other ways to tackle this but without further information this is one of them.

Kind regards

Bernd
TU works great