Move a label

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
Pauls74462
Posts: 6
Joined: Sat Jul 15, 2006 2:47 pm

Move a label

Post by Pauls74462 » Thu Mar 03, 2011 5:22 pm

How do U slowly move a label from (Top 5, Left 65) to (Top 5 Left 200) and change from visible off to on

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4172
Joined: Sun Jan 07, 2007 9:12 pm

Re: Move a label

Post by bn » Thu Mar 03, 2011 6:54 pm

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

Pauls74462
Posts: 6
Joined: Sat Jul 15, 2006 2:47 pm

Re: Move a label

Post by Pauls74462 » Sat Mar 05, 2011 8:34 pm

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

Post Reply