Functions

 

animate_to() animate_upto() animate_downto()

DEFINITION

animate_to(frame_no, img_name);
animate_upto(frame_no, img_name);
animate_downto(frame_no, img_name);

frame_no - The target frame number of the animation.
img_name - The name of the AnimatedImage().

REQUIREMENTS

The following JavaScript

    AnimationFrames(ani_name, num_frames, ext);
    AnimatedImage(img_name, ani_name);
or
    AnimatedGif(img_name, num_frames);
or
    AnimatedJpg(img_name, num_frames);

The following HTML

    <IMG SRC="images/ani_name/0.ext" NAME="img_name">

DESCRIPTION

These functions animate the image img_name to a particular frame.

The function animate_upto() runs the animation from the current frame UP (forward) to the target frame.

The function animate_downto() runs the animation from the current frame DOWN (backwards) to the selected frame.

The function animate_to() calculates the shortest number of frames (up or down) bewteen the current frame and the target frame and runs the animation up or down to reach that frame.

NOTE: If you use animate_upto() or animate_downto() and request a frame that does not exists (e.g. -1 or frame 100 of a 32 frame animation) then the animation will run continuously.

The Animated Globe interface uses these functions.

EXAMPLE

<HEAD>
    AnimatedGif("globe",30);
</HEAD>

<BODY>
    <A HREF="some_url"
        onMouseOver="animate_to( 7, 'globe')"
        onMouseOut="animate_to( 0,'globe')>Some Link Text Link 1</A><br>

    <A HREF="some_url"
        onMouseOver="animate_upto( 9, 'globe')"
        onMouseOut="animate_to(0, 'globe')>Some Link Text for Link 2</A><br>

    <A HREF="some_url"
        onMouseOver="animate_downto(18, 'globe')"
        onMouseOut="animate_to(0, 'globe', ')>Some Link Text for Link 3</A><br>

    <IMG SRC="images/globe/0.jpg" NAME="globe">

</BODY>

<<Index>>