itunes alternating lines

Jim Lambert jiml at netrin.com
Sun Oct 26 18:11:48 EDT 2008


This may be helpful.
Put it in a field script then send alternatelines to the field.

Of course, it could be easily adapted to accept color parameters, too.

Jim Lambert

on alternateLines
   -- copyright 2006 Jim Lambert
   -- You're free to use this anywhere as long as the credit line  
remains.

   lock screen
   set the fixedLineHeight of me to true
   set the topmargin of me to 4
   answer color --THE COLOR OF THE FIRST LINE
   if the result is cancel then exit alternateLines
   put it into Ln1color
   answer color --THE COLOR OF THE SECOND LINE
   if the result is cancel then exit alternateLines
   put it into Ln2color
   if there is not a grc "Ln1" then create grc "Ln1"
   if there is not a grc "Ln2" then create grc "Ln2"
   set the opaque of grc "Ln2" to true
   set the opaque of grc "Ln1" to true
   set the linesize of grc "Ln2" to 0
   set the linesize of grc "Ln1" to 0
   set the backcolor of grc "Ln2" to Ln2color
   set the backcolor of grc "Ln1" to Ln1color
   set the width of grc "Ln1" to the effective textheight of me
   set the width of grc "Ln2" to the effective textheight of me
   set the height of  grc "Ln1" to  2* (the effective textheight of me)
   set the height of  grc "Ln2" to  (the effective textheight of me)
   set the bottomleft of  grc "Ln2" to the bottomleft of  grc "Ln1"
   import snapshot from rectangle (rect of grc "Ln1") of this card
   put the id of the last image into imgID
   set the backgroundpattern of me to imgID
   delete img id imgID
   delete grc "Ln1"
   delete grc "Ln2"
   unlock screen with wipe down fast
end alternateLines




More information about the use-livecode mailing list