Wiki.Novemberborn, sIFR 3 Documentation & FAQ

JavaScript Configuration

You can configure the JavaScript part of things by setting the following properties, right before you activate sIFR and pre-fetch the Flash movies. See also JavaScript Methods.

isActive (Boolean)
true if sIFR has been activated, false otherwise.
isEnabled (Boolean)
Set this to false to disable sIFR even after it has been activated.
preserveSingleWhitespace (Boolean)
If set to true, sIFR will replace each individual whitespace character with " ". Otherwise all consecutive whitespace characters will be replaced by the first character in the sequence.
fixWrap (Boolean)
Flash can wrap long non-broken text. To do this, however, it needs the correct width of the text. In IE the width will be incorrect if the text is too long (and needs to be wrapped by Flash). This property enables the workaround.
fixHover (Boolean)
Enables or disables a workaround to fix a problem where the hover state of a link in the Flash movie would not return to normal.
autoInitialize (Boolean)
Set to false to disable automatic initialization of sIFR. This shifts responsibility of initializing sIFR to the implementor.
setPrefetchCookie (Boolean)
To prevent needless pre-fetching, a session cookie can be set. Set this property to false to stop the cookie from being set. *Warning:* this may cause needless pre-fetching!
cookiePath ()
Default path for which the cookie is set. If your site has different areas which require different Flash movies, you should configure the cookiePath for each area.
domains (Array)
Contains the domain names for which sIFR will activate. When set properly this will prevent the sIFR implementation to run when the site is loaded from other domains, such as the Google Translator service. Use * to allow all domains. You can use a wild card to match subdomains as well, although you'll have to specify the main domain separately. For example: sIFR.domains = ['*.example.com', 'example.com'];.
fromLocal (Boolean)
Allow sIFR to run when loaded from the localhost domain. You don't have to add localhost to the domains.
forceClear (Boolean)
In Gecko, preceding the sIFR element with a floated element, inside a fixed-width wrapper, gives wrong dimensions. Set this property to true to force the temporary clearing of the sIFR element, which works around the problem.
forceWidth (Boolean)
Force the Flash movie to take it's calculated width, instead of 100%. Should be set to false if you've disabled repaint-on-resize.
fitExactly (Boolean)
When true the dimensions of the Flash movie will fit exactly around the width and height of the text in the movie. *Note:* this is as reported by Flash, so you might need to manually tune the dimensions.
forceTextTransform (Boolean)
Let JavaScript force CSS text transformation. In the future, if Flash supports this natively, you might want to change this property depending on the Flash version.
useDomLoaded (Boolean)
By default, sIFR will replace elements before the page has fully loaded. It is possible that, for example, images affect the layout of the page and cause sIFR to improperly render. In that case, set the property to false so the elements will be replaced when the page is fully loaded.
useStyleCheck (Boolean)
If true, sIFR detects if the CSS has been loaded prior to attempting to replace elemens. Setting this value to true will speed up replacements in Safari and Opera, and slightly slow them down in Mozilla and IE. Requires more configuration, see DetectingCSSLoad.
hasFlashClassSet (Boolean)
True if the sIFR-active class is set. This can be either on the body element and the document element.
repaintOnResize (Boolean)
Determines whether sIFR updates the Flash movie when the window is resized. Necessary for page zoom as well.

Updated on April 20, 2008 19:57 by Mark Wubben (82.74.122.8)

| See revision | Back in time (13 older revisions)


Navigation

sIFR 3 Documentation & FAQ

sIFR lets you use your favorite font on your websites by cleverly working with Flash, JavaScript and CSS. Here you'll find it's documentation and the FAQ. Leave a link to your implementation in the Examples!

Please donate

If you like sIFR, please consider making a donation so Mark can spend more time on it. Thank you.

Inside this wiki

Other destinations

Licensing

This wiki is licensed under the GNU Free Documentation License.

Miscellaneous

TextDrive

RubyOnRails