No subject

Klaus Major klaus.major at metascape.org
Tue Jul 16 09:27:01 EDT 2002


Hi Steve and all,

>>> controls.  this left the images on a card.  When I deleted the images 
>>> the
>>> images I thought were stored in the image chooser were deleted as 
>>> well.
>>
>> set the visible to false
>
> Shoa Sean,
....
> If there are different ways to load, access and use images in RR that I 
> am
> missing, please anybody chime in.
>
> Regards,
>
> Steve

first i have to confess that i still use MetaCard although i got a Pro 
RR license,
because we are in the middle of a big project that i started with MC.

Since everything concerning MC applies to RR i can tell you a scenario 
how
i use my custom-build image-libraries.


1st scenario:

I have a mainstack, that has NO images inside (to avoid id conflicts, 
see scenario 2)

Then i have a substack of that mainstack where i imported ALL needed 
images
(preferrably referenced...)

Now i can put the appropriate ids into the btns of the mainstack...

Et voila, image-library nr. 1


2nd scenario:

A mainstack, that has images inside.

Then i have a substack of that mainstack where i imported ALL needed 
images
(preferrably referenced...)

To avoid id conflicts you now should give all the images in the substack 
NEW IDs.
Here you should start to number them with (incredibly ;-) high numbers, 
best done via script.

Start at 2000000 to be sure

Be careful to not use ids that might be used by the RR image-library 
(they use the same technique ;-)

Now i can put the appropriate ids into the btns of the mainstack...

Et voila, image-library nr. 2.


I hope you get the picture...

This is from the MC index concerning icons:

> MetaCard allows you to use any image object as an icon, fill pattern, 
> brush shape, or cursor.  The image that will be used when each of these 
> properties is set is located by checking the id of the image objects.  
> Images with ids less than 1000 are reserved for the standard MetaCard 
> icons, cursors, and fill patterns: cursors are ids 1-100,  brush shapes 
> 101-200, fill patterns 136-300. and icons 301-1000.  The start value of 
> each of these is subtracted when you set one of these properties to a 
> value less than 1000.  For example, setting an object's backPattern 
> property to 2 causes the image with id 137 to be used to fill the 
> background of that object.
>
> All stacks and substacks are searched for an image of the correct id 
> when you set one of these properties.  To facilitate finding the right 
> image, you can set the id property of image objects (they are the only 
> MetaCard objects that allow this).  To avoid the problem where you have 
> multiple objects with the same id, you should only set ids to very 
> large numbers (at least 6 digits).  Note that if you set an id to a 
> value used by another object in a stack (or another object is created 
> with that id), one or both of the objects can be lost.

And this from the RR index:

> Use the icon property to change a button’s appearance, or to set a 
> stack’s appearance when iconified on Unix systems.
>
> Value:
> The icon property is the ID or name of an image to use for an icon. 
> Revolution looks for the specified image first in the current stack, 
> then in other open stacks.
>

Hope that helps...


Regards from germany


Klaus Major
klaus.major at metascape.org




More information about the Use-livecode mailing list