button resize

Scott Rossi scott at tactilemedia.com
Fri Aug 15 14:54:01 EDT 2003


Recently, "Andrew"  wrote:

> I used to make games in Hypercard by animating the icons of buttons.
> The buttons could move around the screen while their icons were
> changing simultaneously.  Revolution has me excited because of its
> capability to handle large, colorful images.
> In trying to animate these images, the only thing I can figure out is
> to have a new image for each "frame" of the animation.  Then I would
> program the script to hide one image (the first frame) and show the
> next image (the second frame) in the same place.  The trouble with this
> is the following:  Say every card of the stack is a different "level"
> of my game.  Then, I would need a copy of all my little man in all his
> poses on every card; that would mean a whole bunch of hidden images
> sitting around at the same.  Is there any way to have these images
> somehow "belong" to the stack so they could be referenced from any
> card?   Is this the best way to do what I'm trying to do, or am I
> approaching the animation thing wrong?

Placing images in a group and then setting the backgroundBehavior of the
group to true will make the group of images available to all cards.

Alternatively, you can reference any object in a stack by using its complete
path:
  set the icon of btn myBtn to id of img myImg of cd 1

That being said, you can also display animated GIFs within Rev, and
precisely control them using the currentFrame, frameCount, and repeatCount
properties.  See the list archives for more details.

You have many options for developing animation available to you.

Regards,

Scott Rossi
Creative Director
Tactile Media, Multimedia & Design
-----
E: scott at tactilemedia.com
W: http://www.tactilemedia.com




More information about the use-livecode mailing list