Marquee.htc
Le code est le suivant:
// Description: défilement ininterrompu des sous-titres
// Version: 2.0
// Auteur: Baoyu (Webuc.net)
// Dernière mise à jour: 2004-10-26
//Préparation:
<public: composant>
<public: attachEvent = "onContentAread" onevent = "f_init ()" />
<public: attachEvent = "onPropertyChange" onevent = "f_propchange ()" />
<public: PropertyName = "Direction" />
<public: propriétéName = "Speed" />
<public: PropertyName = "Delay" />
<public: Methodname = "Marquee" />
<public: méthodyname = "stop" />
<public: méthodyname = "start" />
</ public: composant>
<scriptLanguage = "JScript">
var_omarqueEcontent;
var_omarquee;
var_speed = 2;
var_orientation;
var_direction = "up";
var_contentwidth;
var_contentHeight;
var_marqueewidth;
var_marqueeHeight;
var_paddingtop;
var_firstnode = 1;
var_count = 0;
var_timer = null;
var_pause = false;
var_marqueeInterval = 100; // Intervalle de défilement
var_delayinterval = 2000; // Title Affiche l'intervalle de retard
// + ----------------------------------------------------------------------------
// Fonction: f_init
// Description: Initialisation
// Paramètres: null
// retourne: null
// -----------------------------------------------------------------------------
functionf_init ()
{
_omarquee = document.CreateElement ("div");
_omarqueEcontent = document.CreateElement ("Span");
_omarqueEcontent.innerHtml = élément.innerHTML;
_omarquee.ApendChild (_omarqueContent);
element.innerhtml = "";
element.appendChild (_omarquee);
if (speed == null) Speed = _Speed;
Speed = paSeInt (vitesse);
if (! Speed) Speed = _Speed;
if (delay == null) delay = _delayInterval;
Delay = paSeInt (retard);