Fade effect for a Field

Mark Schonewille m.schonewille at economy-x-talk.com
Fri May 16 08:46:39 EDT 2014


Hi Pascal,

You need this:

on fadeControl theLongID
   repeat with x = 100 down to 0 with messages
     set the blendLevel of theLongID to x
     wait 1 millisec with messages
   end repeat
   wait 2 seconds with messages
   repeat with x = 0 to 100 with messages
     set the blendLevel of theLongID to x
     wait 1 millisec with messages
   end repeat
end fadeControl

usage:

fadeControl the long id of fld 1

There are many ways to write the same script. You can adjust it to 
simply use the number of a field and you can increase the waiting time. 
You could even use steps to reduce the waiting time, but then you'd have 
a less smooth effect.

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

Installer Maker for LiveCode:
http://qery.us/468

Buy my new book "Programming LiveCode for the Real Beginner" 
http://qery.us/3fi

LiveCode on Facebook:
https://www.facebook.com/groups/runrev/

On 5/16/2014 14:38, Pascal Lehner wrote:
> Hi all,
>
> I want to make a field displaying some status text ("Record saved") that
> fades from invisible to visible, stays for a few seconds and then fades out
> again.
>
> I have seen that there seems to be a way to do this with groups, but could
> I also do it with a single field?
>
> Thanks,
>
> Pascal





More information about the use-livecode mailing list