Alternating stripes in fields

Monte Goulding monte at sweattechnologies.com
Tue Mar 8 18:58:53 EST 2005


>>> There have been seveal attempts to emulate iTunes-like alternating 
>>> stripes as backgrounds for scrolling fields in Revolution.
>>
>> An alternative method:
>> Carefully grab a section of the stripes from iTunes.
>>
>> Use a graphics program and select precisely select one line
>> of each color and save.
>>
>> Import the stripe image into Rev app as image file.
>>
>> Set the fill of the scrolling field to that imported image.
>>
> The problem with this solution is that the field does not always scroll to 
> an exact line, so most of the time, your text lines will not be exactly 
> aligned to the stripes.
>

Ah yes... I worked this out once. You need a series of patterns that you set 
as the user scrolls. The number of images depends on the line height of your 
field. From memory you need the line height X 2 images. You will need to fix 
the line height then create your images. In Photoshop or some other image 
editor create a an image that is 4 lines high. Draw your lines then resize 
the canvas to the bottom two lines. Repeat the following:
 - save the image
 - shift the image down 1 pixel

Until you have completed the cycle.

Then you import the images into rev. They need names that include their 
number starting with 0. Something line "lines0","lines1" etc.

In the field you need a script that does this:
on scrollBarDrag
   set the backPattern of me to the id of image \
      ("lines"&the vScroll of me mod (the lineHeight of me *2))
end scrollBarDrag

Something like that anyway...

Cheers

--

Monte Goulding
Sweat Technologies

InstallGadget - How to create an installer in 10 seconds
Download now from: http://www.sweattechnologies.com/InstallGadget 



More information about the use-livecode mailing list