Copying parts of pictures to the front

Wolfgang M. Bereuter wmb at internettrainer.com
Fri Feb 1 07:39:01 EST 2002


Hallo Ken,

I do not really understand what´s you intention. I think my english or muy
programming knowledge or both are not good enough. But I can describe you
what I have done to solve a similar(?) problem:

I have a lot of buttons of different sizes in some cards in some stacks,
wich all must open/close hidden fields (or images, and so on...) with only
"one click"

I make the buttons (gif) in another programm (you can do it in a drawing,
painting or button maker programm and export (screen shots) them *all as one
image* (gif better then pict - small and compatible).
Then I import this gif to rev (as background = 1. Layer) and set invisible
buttons and fields above it
make a button script to show/hide
In my case there are up to 30 Buttons of different sizes on relativly small
cards (Map 744*552). There can be much more, if the buttons are small or the
cards are big...

The big time saver of this system is: If you have to change one ore more
buttons, you do the change in the drawing programm and replace the "old" gif
in rev; - all invisible buttons remain untouched
You have only to import it and set it to the 1. layer. Thats is a job for
about 2-3 minutes. 
If you have changed the size of the buttons (on the gif), then you can
adjust the dimension of the invisible buttons (in rev) apart, fast and
simple.

I could not do this in iShell, because it was not fast enough changing the
cards/maps. It needed up to 4(!) seconds with only 6-8 cards. But the UI of
iShell is still unmatched.

The big thing of rev is imho: do the behavior of the buttons in it - but not
the buttons "itself"

Here you can see a demo of muy Maps (sorry at the moment german only):
http://www.internettrainer.com/4service/1service.html
Click on coloured symbols - thats all.


I can describe it more detailed offline, if this idea works for you.

regards
Wolfgang M. Bereuter

Learn easy with trainingsmaps and outliner

INTERNETTRAINER Wolfgang M. Bereuter
Edelhofg. 17/11, A-1180 Wien, Austria
...............................
http://www.internettrainer.com
wmb at internettrainer.com
...............................
Tel: ++43/1/ 961 0418
Fax: ++43/1/ 479 2539
 

---------
> Von: use-revolution-request at lists.runrev.com
> Antworten an: use-revolution at lists.runrev.com
> Datum: Wed, 30 Jan 2002 05:03:21 -0500
> An: use-revolution at lists.runrev.com
> Betreff: use-revolution digest, Vol 1 #153 - 15 msgs
> 
> Message: 6
> Date: Tue, 29 Jan 2002 21:35:18 -0800
> Subject: Re: Copying parts of pictures to the front
> From: "Ken Norris (dialup)" <pixelbird at interisland.net>
> To: <use-revolution at lists.runrev.com>
> Reply-To: use-revolution at lists.runrev.com
> 
> on 1/29/02 7:54 PM, J. Landman Gay at jacque at hyperactivesw.com wrote:
> 
>> It is a snap in RR, it's all built in. You won't need any of the
>> work-arounds necessary in HC. Here's what you do:
>> 
>> 1. Import all the pictures. You can use your existing PICT files if you
>> want, but they will not work cross platform and PICT is an inefficient
>> format. For best results, convert them first to jpg or gif and then
>> import them into the stack.
> ----------
> Yes, this I know.
> ---------- 
>> 2. Once imported, make a note of each image's ID number, then hide the
>> image. You can store them anywhere in the stack, it doesn't matter
>> where, they will never be displayed directly. Some people make a
>> separate card to store icon images, other people just hide the image on
>> any convenient card.
>> 
>> 3. Create a bunch of transparent buttons.
> ----------
> I know this, too. No problem so far.
> ----------
>> Set the icon of each button to
>> the correct "up" image ID and set its hilite icon to the "down" image ID.
> ----------
> This is what I'm trying to avoid. There are about 80 buttons, all similar
> but different. The main picts..er..uh..images, are full screen. Everything
> is there, including the images of the buttons (which have complex colors,
> shading, text), in one FULL SCREEN image. The transparent buttons are all
> aligned properly with the image. In my HC stack, Uli's xGWorld holds the
> FULL SCREEN PICT (image) of the 'down' buttons, located congruently (thus,
> the buttons align with it as well), but not visible. The handler for
> animating the buttons uses the rect of the button to copy that portion of
> the gWorld image and temporarily (until the mouse is up) place it on the
> screen right over the corresponding portion of the 'up' state image, similar
> to RR's icon hiliting. Very neat, doesn't require drawing separate button
> icons. The buttons are in rows, so all the text parts had to align, too. I
> wouldn't have wanted to do that for each separate button.
> 
> If I have to do each button separately as you sugggest, it will mean cutting
> and pasting 156 separate images for the emulator version and at least 79
> images each for the other two sets, for a grand total of 314 images!  If
> there is significant memory savings in doing so, I might consider it, but I
> have to weigh that against the labor involved.
> 
> So, what I'm looking for is either:
> 
> 1) A script that instantly shows and hides the button rect PORTION of the
> 'down' full screen image into the SAME PORTION (rect) of the 'up' full
> screen image. Best labor-saving idea if it will work.
> 
> ....or
> 
> 2) Write a script that automates the selection, copying, and pasting of the
> button rect's images (all 314 of them) into icons.
> 
> .....or...can I do this?:
> 
> 3) Use the 'up' full screen image in the background, and just hilite with
> the 'down' image icons. That will lower the copy and paste process to just
> 80 images. That's still a bunch, though.
> ----------
>> That's it. If the button has autohiliting set, it will work exactly the
>> way you want automatically. If you don't want to use autohiliting, then
>> just script "set the hilite of btn x to true" to show the "down" icon.
> ----------
> Go RR!!! This'll be great for the 'pilot light' buttons, too. I just don't
> want to do all that copying and pasting again (waaah, snivel, snivel).
> 
> Thanks, Jacque, and good night all,




More information about the use-livecode mailing list