GIF

From MegaZine3
Jump to: navigation, search


The gif element can be used to load animated GIF images. Depending on the size of the file the initial parsing of the loaded data can lead to noticeable lags in the responsibility of the Flash Player, so use with care.

This element uses Thibault Imbert's AS3GIF library.

Contents

Attributes

height

The height of the element. If not given, uses the actual size of the loaded element. If the given value is smaller than 1 the size is interpreted to be relative to the actual size, i.e. the loaded element is scaled by that factor.

src

The path to the image to display. This can be an absolute or a relative path. Relative paths are (normally) relative to the megazine.swf file.

cache

Determines whether to allow the use of Flash's cache or not. If disabled, the image will always be loaded from the server (which obviously leads to increased bandwidth use, but also to longer wait times for the user). Only for very special cases, where images are generated dynamically or are replaced very frequently, to avoid problems with clients not getting the most up-to-date version (because of the cache).

width

The width of the element. If not given, uses the actual size of the loaded element. If the given value is smaller than 1 the size is interpreted to be relative to the actual size, i.e. the loaded element is scaled by that factor.

Examples

<book>
    <chapter>
        <page>
            <gif src="data/animated.gif"/>
        </page>
    </chapter>
</book>
MegaZine3 Core-related articles
Book elements Book · Chapter · Page · Spreadpage
Page elements Area · GIF · Image · Navigation · Sound · Text · Video
Personal tools
Namespaces
Variants
Actions
Navigation
documentation
miscellaneous
Toolbox