More about images

Klaus Major klausimausi at mac.com
Thu Feb 6 05:16:08 CST 2003


Hi Ken,

> --- "Ken Norris (dialup)" <pixelbird at interisland.net>
> wrote:
>> [snip]
>>
>> Now, I know I can make a set of button/icons to work in place of the 
>> images,
>> but there are 76 of them and that's a lot of work, considering the 
>> time
>> already spent on making the single full screen images. I'd rather 
>> write a
>> simple routine that will do the same as it does in HC with Uli's 
>> xDraw: Draw
>> corresponding button rects of the DOWN state image.
>>
>> If this is an OK idea then how would I do it in Rev, or must I make 
>> two
>> entire sets of icons by copying each button art by hand (152 of them 
>> all told)?
>>
>> TIA,
>> Ken N.

this is another approach to your problem.
The kudos goes to Mr. anonymous :-)
(Someone posted the stack "X-ray" to the MC-site looooong ago...)

I requires that you group the (single) DOWN-image.
Lets call that group "down".

Then you can set the groups rect (and the loc of that DOWN-image)
to the correct place...

And you might need a "keyhole" graphic, which is as big as needed
(The DOWN-image will be shown at this rect...)

on mouseDown
   lock screen
   set the rect of group "down" to the rect of grc "keyhole"
   set the loc of image "DOWN"  to the loc of img "UP"
   ### you get the picture...

   set the loc of grc "keyhole" to the mouseLoc
   ### here you might want to add your location

   unlock screen
  end mouseDown

on mouseUp
   set the loc of group "keyhole" to -5000,-5000
   ### get rid of it, until we need it again...
end mouseUp

Hope that helps...


Regards

Klaus Major
klausimausi at mac.com




More information about the use-livecode mailing list