CCG 1

Les explications

le message explicatif... a mon niveau .. bien sur :-)
 
quand vous aurez fait CTRL+F2 sur le post vous aurez ce qui va se trouver en dessous... des *
 
 
******************************************************************

<HTML><HEAD>
 
<STYLE>BODY {
 BACKGROUND-COLOR: #ffffff; COLOR: black( couleur de l'ecriture); FONT-FAMILY: "comic sans ms"(nom de la police de caractere utilisee); FONT-SIZE: 10pt(grandeur de l'ecriture); FONT-WEIGHT: normal; MARGIN-LEFT: 0px; MARGIN-RIGHT: 0px(positionnement en hauteur et marge a gauche de l'ecriture)
}
</STYLE>
 
 
en dessous la ligne pour encapsuler un midi
 
<BGSOUND balance=0 src="d:/!!sauv_juin/mambo5.mid" (chemin du midi dans votre ordi)
volume=0  (mettre le volume a zero pour etre sur de l'entendre mais on peut jouer sur ce point)
 
loop=infinite>( commande pour que le midi soit en boucle)

la c'est le fond, pour un fond qui scroll en diagonale il faut utiliser un fond de forme carree

IMG id=bkg
style="LEFT: -1800px; WIDTH: 200px; POSITION: absolute; HEIGHT: 200px"
(position et dimension de votre carre -fond)
src="d:/!!sauv_juin/fdmickey-minnie.jpg"> (chemin du fond dans votre ordi)
<SCRIPT language=VBScript>(indication du langage d'ecriture du script)
REM Edgar V. Poirier (auteur a qui je l'ai "emprunte")
REM
moomoo@nbnet.nb.ca
REM Thanks to Tar'Hom for the idea ; )
REM April 07, 1999
Dim w, wW, wH, wx, pW, pH, myTimer, x, y, xD, yD, Res
Dim picX, picY, bxW, bxH, numPics, scrollDirection, scrollType
Dim dTimer, p1Ratio, p1L, p1T, p1H, p0Ratio, p0L, p0T, p0H
Dim R, aInc, cx, A(2), dH(2), pi, flip, count, mW
 
Set w=document.body
 
pi=3
 
REM **** ici c'est pour changer la facon de scroller du fond***********
 
REM choisir la direction du scroll en entrant les lettres apres le =
 
REM diagonale gauche= TL
REM diagonale droite= TR
REM haut gauche = BL
REM haut droite = BR
REM montant = TT
REM descendant = BB
REM gauche = LL
REM droite = RR
 
scrollDirection="TR"(j'ai choisi tr=diagonale droit)
 
la je n'ai pas touche.. on repassera dessus si besoin ;-)
REM Select Scroll Type Below
REM Choices: Background scroll = BS
REM          Left or Right Border = VBL or VBR
REM          Top or Bottom Border = HBT or HBB
 
scrollType = "BS"
 
REM *********************************************
 
REM Initialize
sub setUp()
 REM Get window dimensions
 wW=w.clientWidth
 wH=w.offsetHeight
 REM Set the scroll Width and Height
 bW=wW
 bH=wH
 if w.scrollHeight>wH then bH=w.scrollHeight
 bT=0
 bL=0
 REM Adjust image position and direction depending on choices above.
 if scrollType<>"BS" then
  if mid(scrollType,1,1)="V" then
   bW=pW
   if mid(scrollType,3,1)="R" then
    bL=wW-bW
    if pw<wW then w.style.marginRight=bW
   else
    if pw<wW then w.style.marginLeft=bW
   end if
  else
   bH=pH
   if mid(scrollType,3,1)="B" then
    bT=wH-bH
   else
    if pH<wH then w.style.marginTop=bH
   end if
  end if
 end if
 if (left(scrollType,1)="B" or left(scrollType,1)="V") and w.scrollHeight>wH then bH=INT(wH+(w.scrollHeight-wH))
 REM Set the visible limits
 box.style.height=bH
 box.style.width=bW
 box.style.left=bL
 box.style.top=bT
 x=0
 y=0
 xD=-1
 yD=-1
 REM Calculate start position of the background and direction.
 if left(scrollDirection,1)="T" then
  if mid(scrollDirection,2,1)="R" then
   xD=-xD
   x=-pW
  else
   if mid(scrollDirection,2,1)="T" then xD=0
  end if
 else
  if left(scrollDirection,1)="B" then
   if mid(scrollDirection,2,1)="R" then
    xD=-xD
    yD=-yD
    y=-pH
    x=-pW
   else
    if mid(scrollDirection,2,1)="L" then
     y=-pH
     yD=-yD
    end if
    if mid(scrollDirection,2,1)="B" then
     xD=0
     yD=-yD
    end if
   end if
  else
   if left(scrollDirection,1)="L" and  mid(scrollDirection,2,1)="L" then
    yD=0
    x=-pW
   end if
   if left(scrollDirection,1)="R" and  mid(scrollDirection,2,1)="R" then
    xD=-xD
    yD=0
    y=-pH
   end if
  end if
 end if
 if wH*.3<p0H then
  dH(0)=wH*.3
  p0.style.height=dH(0)
  p0.style.width=dH(0)*p0Ratio
  p0T=wH-dH(0)
  p1.style.height=dH(0)
  p1.style.width=dH(0)*p1Ratio
  p1T=wH-dH(0)
 else
  p0.style.height=p0H
  p0.style.width=p0H*p0Ratio
  p0T=wH-p0H
  p1.style.height=p1H
  p1.style.width=p1H*p1Ratio
  p1T=wH-p1H
 end if
 p1L=wW*.5
 p0L=wW*.4
 p1.style.top=p1T
 p1.style.left=p1L
 p0.style.top=p0T
 p0.style.left=p0L
 mW=p0.style.posWidth*2
 R=mW
 cx=(wW*.5)
 A(0)=-pi/2
 A(1)=pi*1.5
 flip=1
 count=4
 container.style.width=wW
 container.style.height=wH
 container.style.left=0
 REM Start dancing
 dance
end sub
 
REM Modified universal scrolling routine.
sub dance()
 ClearTimeOut(myTimer)
 x=x+xD
 if xD>0 and x>=0 then x=-pW
 if xD<0 and x<-pW then x=0
 y=y+yD
  if yD>0 and y>=0 then y=-pH
 if yD<0 and y<-pH then y=0
 REM Position the background image.
 backgroundposition.style.left = x
 backgroundposition.style.top = y
 if flip>0 then
  R=mW
  aInc=.1
 else
  R=mW/6
  aInc=.3
 end if
 p0.style.left=R*COS(A(0))+cx
 p1.style.left=R*COS(A(1))+cx
 if flip<0 then
  p1.style.top=p1T-ABS((R/2)*SIN(A(1)-pi/4))
 else
  p1.style.top=p1T
 end if
 if (R*COS(A(0))+cx)<(R*COS(A(1))+cx) then
  p1.style.filter="flipH"
  p0.style.filter="flipH"
 else
  p1.style.filter=""
  p0.style.filter=""
 end if
 A(0)=A(0)-aInc
 A(1)=A(1)+aInc
 if A(1)>((pi*2)+(1.5*pi)) then
  count=count-1
  if count=0 then
   count=4
   flip=-flip
   A(0)=-pi/2
   A(1)=pi*1.5
  end if
 end if
 myTimer=SetTimeOut("dance",16)
end sub
 
REM Everything starts here
sub Window_OnLoad()
 REM Get users screen resolution
 wx=window.screen.width
 REM and adjust font size to match.
 Res=INT(wx/128)
 w.style.fontSize = 14+Res
 REM Get dimensions of background image.
 pW=bkg.style.posWidth
 pH=bkg.style.posHeight
 REM Calculate the size of the background
 REM Number of images across
 picX=INT(wx/pW)+2
 if picX<2 then picX=2
 REM Number of images down
 picY=INT((wx*.75)/pH)+2
 if picY<2 then picY=2
 if scrollType<>"BS" then
  if LEFT(scrollType,2)="VB" then
   picX=2
  else
   if LEFT(scrollType,2)="HB" then
    picY=2
   end if
  end if
 end if
 REM Width of background
 bxW=picX*pW
 REM Height of background
 bxH=picY*pH
 backgroundposition.style.width=bxW
 backgroundposition.style.height=bxH
 REM Calculate required number of images
 numPics=picX*picY
 REM "Tile" the background (NOTE: Image is not positioned.)
 for i=1 to numPics
  data=""
  data="<IMG src='" & bkg.src & "'>"
  backgroundposition.insertAdjacentHTML "beforeEnd", data
 next
 REM Remember image original dimensions
 p1H=p1.style.posHeight
 p0H=p0.style.posHeight
 p1Ratio=p1.style.posWidth/p1H
 p0Ratio=p0.style.posWidth/p0H
 REM Lets get started.
 setUp
end sub
 
REM This runs if the window size is changed.
sub Window_OnResize()
 setUp
end sub
 
REM Keep the bottom border on-screen if text scrolls.
sub window_OnScroll()
 container.style.top=w.scrollTop
end sub
 
</SCRIPT>
ne pas changer ce qui se trouve en dessous
<DIV id=box
style="Z-INDEX: -1; FILTER: BlendTrans(Duration=0); LEFT: -1800px; WIDTH: 800px; POSITION: absolute; TOP: 0px; HEIGHT: 600px">
<DIV id=container
style="Z-INDEX: 1; LEFT: 0px; WIDTH: 800px; POSITION: absolute; TOP: 0px; HEIGHT: 600px"><!--
Insert width and height to make it available to script.
Initially left set off-screen to allow clean text entry in Compose.
 --><IMG id=p0
style="Z-INDEX: 5; LEFT: 0px; WIDTH: 172px; POSITION: absolute; TOP: 0px; HEIGHT: 240px"
(ca c'est la position et dimensions du 1er gif)
src="d:/!!sauv_juin/minnie.gif">'ca c'est le chemin dans votre ordi du 1er gif)
 
 
 <IMG id=p1
style="Z-INDEX: 6; LEFT: 0px; WIDTH: 163px; POSITION: absolute; TOP: 0px; HEIGHT: 259px"
(position et dimension du 2eme gif)
src="d:/!!sauv_juin/mickey.gif">(chemin dans votre ordi du 2eme gif
 
et nous passons a l'ecriture du texte
 
 </DIV><SPAN id=backgroundposition
style="LEFT: -1800px; WIDTH: 300px; POSITION: absolute; TOP: 0px; HEIGHT: 400px"></SPAN></DIV> position et dimension du texte
<DIV>Hello à tous</DIV>
<DIV>1er post du "collé c'est gagné"</DIV>
<DIV>changez le fond, les 2 gifs, le midi et le texte</DIV>
<DIV>et hop...dansez jeunesse !!!</DIV>
<DIV>attention aux tours de reins ;-))</DIV>
<DIV>A + Martine</DIV></BODY></HTML>
****************************************************************
 
voila j'ai explique du mieux que j'ai pu..  ce que je n'ai pas annote en violet c'est parce que la je n'y ai pas touché
 
et parce que pour une 1ere fois.. commencons par du simple 
 
attention de ne pas enlever au passage des " ou des , ou des <
sinon  vous chercherez pendant des heures  huhu
 
 
 si vous avez des questions.....n'hesitez pas.. et si moi je sais pas repondre  y'aura bien un "grand" pour nous epauler
bon amusement ;-)
 
a+ martine

Menu