How to paint a background and place graphics on top of if?

Ben Fisher boinjyboing at hotmail.com
Sun Jan 30 18:40:15 EST 2005


Hi Thomas,

If I understand you correctly, you're trying to make a background with a pattern that can scroll.
I'm not really sure exactly what you're trying to do but here's a simple way to add a pattern to an object.

1) Use the rect tool to draw a rectangle graphic.
2) Open up the properties inspector and edit "Colors & Patterns" (on the menu).
3) Click on the light gray box just to the right of the word "Fill"
4) Choose a pattern. Look under "Default Patterns" or "MetaCard Compatible Patterns" for some good ones.

If you want to set this pattern in a script, just remember the ID of the pattern you chose and then use this line.
set the backgroundpattern of graphic myGraphic to patternID

Or if you want to use your own pattern, import the image and remember its id. Then use the same script.

set the backgroundpattern of graphic myGraphic to imageId

I'm not familiar with Cliptrect and so I'm not sure what you're trying to do as far as the objects on top.

-Ben


More information about the use-livecode mailing list