begin process at 2012 05 29 04:57:30
  Trouver un code source :
 
dans
 
Accueil > Forum > 

Archive Javascript

 > 

Archives

 > 

AU SECOURS !!!

 > 

demande d'aide sur mon script rotatif


Derniers messages déposésPoser une question dans le forum ou lancer une discussion

demande d'aide sur mon script rotatif

lundi 4 avril 2005 à 15:32:27 | demande d'aide sur mon script rotatif

bolix

Lut a tous,
G modifier l'emplacement d'une photo sur mon script et celui ci ne marche +.
si kelkun pouvez voir se qui ne va pas se serait génial. Ca doit etre une petite merde.
le script doit faire descendre l'image centrale et 3 liens doivent se mettre a tourner o tour.
merci a tous


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>


<style>
A:hover {
 BACKGROUND-COLOR: lime
}
</style>
<!--
a{text-decoration:none}
//-->
<style>
TABLE.nav TD {
 BACKGROUND-COLOR: #000066; BORDER-BOTTOM: silver 3px outset; BORDER-LEFT: silver 3px outset; BORDER-RIGHT: silver 3px outset; BORDER-TOP: silver 3px outset; COLOR: white; FONT: bold 9pt Arial; PADDING-BOTTOM: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; PADDING-TOP: 0px; WIDTH: 100px
}
TABLE.nav TD A {
 COLOR: white; FONT: bold 9pt Arial; TEXT-DECORATION: none
}
TABLE.nav TD A:hover {
 BACKGROUND-COLOR: blue
}
TD#search {
 BACKGROUND-COLOR: #006600
}
TD#help {
 BACKGROUND-COLOR: #cc6666
}
</style>
<style>
A {
 TEXT-DECORATION: none
}
</style>
<style>
.fly {
 COLOR: #5050ff; FONT-FAMILY: arial; FONT-SIZE: 20px; POSITION: absolute; VISIBILITY: hidden; Z-INDEX: 2
}
.logo {
 COLOR: #4646ff;
 FONT-FAMILY: comic;
 FONT-SIZE: 80px;
 LEFT: 295px;
 POSITION: absolute;
 TOP: 39px;
 VISIBILITY: visible;
 z-index: 0;
}
.desc {
 COLOR: #6464ff; FONT-FAMILY: arial; FONT-SIZE: 15px; LEFT: 294px; POSITION: absolute; TEXT-ALIGN: center; TOP: 466px; VISIBILITY: hidden; WIDTH: 400px
}
BODY {
 
}
P {
 
}
A {
 COLOR: #a6caf0
}
</style>
<script language="JavaScript">
<!--
/* Show an object */
    function showObject(object) {
        object.visibility = VISIBLE;
    }

    /* Hide an object */
    function hideObject(object) {
        object.visibility = HIDDEN;
    }

    /* Slide the company logo from top to middle */
    function slideLogo(from, to) {
            if (from < to) {
                company.top = (from += 100);
                setTimeout('slideLogo(' + from + ',' + to + ')', 75);
            }
            else initObjects();
    }

    /* Rotate selected objects */
    function rotateObjects() {
            for (var i = 0; i < pos.length; i++) {
                pos[i] += inc; objects[i].visibility = 'visible';
                objects[i].left = (r * Math.cos(pos[i])) + xoff
                objects[i].top = (r * Math.sin(pos[i])) + yoff;
            }
        rotateTimer = setTimeout("rotateObjects()", 75);
    }

     /* Initialize selected objects for rotation */
     function initObjects() {
        /* Here is the array of HTML elements that will be rotated, from fly1 to fly4
           Just put the shortcut variables to the HTML elements in this little array
           and they will be rotated automatically */
        objects = new Array(fly1, fly2, fly3, fly4);
        pos = new Array();
        pos[0] = 0;
            for (var i = 1; i < objects.length; i++) {
                pos[i] = parseFloat(pos[i - 1] + ((2 * pi) / objects.length));
            }
        rotateObjects();
    }

/* Variables for rotating objects */
    var objects;
    var pos;
    var r = 200;        // radius
    var xoff = 460;     // x offset
    var yoff = 300;     // y offset
    var pi = Math.PI;   // get pi
    var inc = pi / 180; // degrees per rotation cycle
    var objects;        // objects to be rotated
    var pos;            // position for objects

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
</head>

<body text="#FFFFFF" onLoad="MM_preloadImages('membres.JPG')">

<div id="Layer4" style="position:absolute; left:18px; top:18px; width:99px; height:66px; z-index:4"><img src="spot_plaf.gif" width="93" height="80"></div>
<div id="Layer5" style="position:absolute; left:690px; top:22px; width:104px; height:71px; z-index:5"><img src="spot_plaf.gif" width="93" height="80"></div>
<div id="Layer6" style="position:absolute; left:40px; top:269px; width:84px; height:77px; z-index:6"><a href="AUTRES.htm"><img src="platine.gif" width="114" height="80" border="0"></a></div>
<div id="Layer7" style="position:absolute; left:677px; top:268px; width:111px; height:73px; z-index:7"><img src="platine2.gif" width="114" height="80"></div>
<div id="Layer8" style="position:absolute; left:41px; top:373px; width:66px; height:87px; z-index:8"><img src="speaker-move.gif" width="61" height="102"></div>
<div id="Layer9" style="position:absolute; left:716px; top:371px; width:69px; height:85px; z-index:9"><img src="speaker-move.gif" width="61" height="102"></div>
<font color="#ff0000">
<div class="fly" id="fly1"><a onmouseout="hideObject(desc1)"
onmouseover="showObject(desc1)">
<p></a><br>
</p>

</div><div class="fly" id="fly2"><a href="http:\\perso.wanadoo.fr\grumo\La Loi.htm"
onmouseout="hideObject(desc2)" onmouseover="showObject(desc2)">
<p>Loi</a><br>
</p>

</div><div class="fly" id="fly3"><a href="http:\\perso.wanadoo.fr\grumo\formulaires.htm"
onmouseout="hideObject(desc3)" onmouseover="showObject(desc3)">
<p>E-mail</a><br>
</p>

</div><div class="fly" id="fly4"><a href="http:\\perso.wanadoo.fr\grumo\Conseils.htm"
onmouseout="hideObject(desc4)" onmouseover="showObject(desc4)">
<p>Conseils</a><br>
</p>

</div><div class="logo" id="company">

<p><img src="djteam.gif" width="253" height="226"></p>
</div><div class="desc" id="desc2">
<p></font>Décret de loi <font color="#ff0000"></p>

</div><div class="desc" id="desc3">
<p></font>E-mail et demande de soirée<font color="#ff0000"></p>

</div><div class="desc" id="desc4">
<p></font>Conseils<font color="#ff0000"></p>

 

</div><script language="JavaScript">

    /* Simple version detection */
    var isNS = (navigator.appName == "Netscape" && parseInt(navigator.appVersion) >= 4);
    /* These constants were not discussed in the article. They can be used in place
       of hidden and visible because on occasion Navigator has problems with the two */
    var HIDDEN = (isNS) ? 'hide' : 'hidden';
    var VISIBLE = (isNS) ? 'show' : 'visible';

    /* Create shortcut variables for different absolutely positioned elements */
    var fly1 = (isNS) ? document.fly1 : document.all.fly1.style;
    var fly2 = (isNS) ? document.fly2 : document.all.fly2.style;
    var fly3 = (isNS) ? document.fly3 : document.all.fly3.style;
    var fly4 = (isNS) ? document.fly4 : document.all.fly4.style;
    var company = (isNS) ? document.company : document.all.company.style;
    var desc1 = (isNS) ? document.desc1 : document.all.desc1.style;
    var desc2 = (isNS) ? document.desc2 : document.all.desc2.style;
    var desc3 = (isNS) ? document.desc3 : document.all.desc3.style;
    var desc4 = (isNS) ? document.desc4 : document.all.desc4.style;

    /* Begin the sliding of the company logo */
    slideLogo(0, 140);


</script>
<head>   
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_controlSound(x, _sndObj, sndFile) { //v3.0
  var i, method = "", sndObj = eval(_sndObj);
  if (sndObj != null) {
    if (navigator.appName == 'Netscape') method = "play";
    else {
      if (window.MM_WMP == null) {
        window.MM_WMP = false;
        for(i in sndObj) if (i == "ActiveMovie") {
          window.MM_WMP = true; break;
      } }
      if (window.MM_WMP) method = "play";
      else if (sndObj.FileName) method = "run";
  } }
  if (method) eval(_sndObj+"."+method+"()");
  else window.location = sndFile;
}

function MM_initTimelines() { //v4.0
    //MM_initTimelines() Copyright 1997 Macromedia, Inc. All rights reserved.
    var ns = navigator.appName == "Netscape";
    var ns4 = (ns && parseInt(navigator.appVersion) == 4);
    var ns5 = (ns && parseInt(navigator.appVersion) > 4);
    document.MM_Time = new Array(1);
    document.MM_Time[0] = new Array(1);
    document.MM_Time["Timeline1"] = document.MM_Time[0];
    document.MM_Time[0].MM_Name = "Timeline1";
    document.MM_Time[0].fps = 15;
    document.MM_Time[0][0] = new String("sprite");
    document.MM_Time[0][0].slot = 1;
    if (ns4)
        document.MM_Time[0][0].obj = document["Layer3"] ? document["Layer3"].document["Image1"] : document["Image1"];
    else if (ns5)
        document.MM_Time[0][0].obj = document.getElementById("Image1");
    else
        document.MM_Time[0][0].obj = document["Image1"];
    document.MM_Time[0][0].keyFrames = new Array(1, 60);
    document.MM_Time[0][0].values = new Array(0);
    document.MM_Time[0].lastFrame = 60;
    for (i=0; i<document.MM_Time.length; i++) {
        document.MM_Time[i].ID = null;
        document.MM_Time[i].curFrame = 0;
        document.MM_Time[i].delay = 1000/document.MM_Time[i].fps;
    }
}
//-->
</script>
<style type="text/css">
<!--
.image {
 border: medium outset #CCCCCC;
}
-->
</style>
<body background="fluo005.gif">
<div id="Layer1" style="position:absolute; left:493px; top:1px; width:82px; height:81px; z-index:1"><img src="facette.gif" width="80" height="80"></div>
<div id="Layer2" style="position:absolute; left:26px; top:167px; width:156px; height:70px; z-index:2"><a href="matos.htm" onMouseOver="MM_swapImage('Image2','','MATOS.JPG',1)" onMouseOut="MM_swapImgRestore()"><img src="logo%20son.gif" name="Image2" width="150" height="67" border="0" class="image" id="Image2"></a></div>
<div id="Layer3" style="position:absolute; left:662px; top:168px; width:157px; height:63px; z-index:3"><a href="membres.htm" onMouseOver="MM_swapImage('Image1','','membres.JPG',1)" onMouseOut="MM_swapImgRestore()"><img src="logo%20son.gif" name="Image1" width="150" height="67" border="0" class="image"></a></div>
<p>&nbsp;</p>
</body>

</html>

lundi 4 avril 2005 à 21:54:38 | Re : demande d'aide sur mon script rotatif

crashtest

Membre Club
Salut alors c'est simple tu as boulié la ligne :
<div class="desc" id="desc1"></div>

visité mon site thx : [ Lien ]
Mes Générateurs  HTML et JS (fonction sous IE et FireFox) : http://crashtest666.serveftp.net


Cette discussion est classée dans : var, document, time, for, mm


Répondre à ce message

Sujets en rapport avec ce message

Problème avec le Script: IMAGE QUI CHANGE AU SURVOL DE LA SOURIS image ... [ par xp3d ] Bon soir à tous,Il y a un Scipt en bas de cette page http://www.smkdgg.com/Filme.html "le code des deux boutons qui se mette en rouge disque on les su Probleme de boucle for (avec 1 element) [ par akh550 ] Bonjour à tous,J'ai un petit problème de boucle "for", la voici:for ( var n=0;n    {    if ( document.ResultForm.cellule[n].checked )        {    aler Probleme de boucle for (avec 1 element) [ par akh550 ] Bonjour à tous,J'ai un petit problème de boucle "for", la voici:for ( var n=0;n    {    if ( document.ResultForm.cellule[n].checked )        {    aler Appel de fonction via un évènement OnClick ? [ par bside8 ] Bonjour,tout commence par un formulaire PHP dans lequel mes utilisateurs doivent saisir une date.Dans le champ concerné se trouve un gestionnaire d'év probleme dans mon Script [ par Guigui76 ] Voila mon Script j aimerai ke kelkun m aide car je n arrive pas a ouvrir le scrip de la fin en meme temp ke l evement tu texte contextuel function MM_ Problème compatibilité de ma page sous Firefox [ par shadow125 ] Hello :)Voila je programme la V 3.2 de mon site et j'aimerai faire un truc vraiement joli :) Donc j'ai fais des jeux de cadre pour faire une structure probleme firefox IE avec vérification de formulaire [ par vaesoli ] bonjour voila mon problème, j’ais un script js qui fonctionne tres bien sous firefox mais qui plante completement sous IE ce script est censé vérifier DHTML fonctionne sous Firefox, Safari mais pas IE [ par durand2504 ] Insérer texte dans text [ par yoarf ] Salut !Voilà, je voudrez, grâce à des boutons "gras", "italique", ... insérer dans des texteareas du texte.Cependant une seul ligne de "mise en page" Dimension d'un div de façon dynamique [ par hawks_ttf ] Bonjour tout le mondeJe cherche le moyen d'avoir dynamiquement les dimensions d'un div...J'ai essayé document.getElementbyID(IDdiv).offsetWidth et .of


Nos sponsors


Sondage...

CalendriCode

Mai 2012
LMMJVSD
 123456
78910111213
14151617181920
21222324252627
28293031   

Consulter la suite du CalendriCode

A découvrir



 
Développement réalisé par Nicolas SOREL (Nix) avec l'aide de : Cyril DURAND et Emmanuel (EBArtSoft), Merci à Vincent pour ses précieux conseils.
CodeS-SourceS.com© Toute reproduction même partielle est interdite sauf accord écrit du Webmaster
CodeS-SourceS.com© est une marque déposée tous droits réservés

Google Coop CodeS-SourceS Google Coop CodeS-SourceS
Temps d'éxécution de la page : 0,686 sec (3)

Nous contacter | Annoncer sur CodeS-SourceS | Mentions légales