La Communauté Webmaster  forum rss


  Forum-webmaster
  Webdesign / graphisme
  Flash / Director
(Modérateurs: Shain, Netah, Lilian, lauryv, ToToMaStEr)
  Actionscript 2 : j'ai un problème pour placer mon animation en plein écran
« Précédent Suivant »
Pages: [1] Descendre
Répondre    Aviser des réponses    Envoyer le sujet    Imprimer
  Auteur  Sujet: Actionscript 2 : j'ai un problème pour placer mon animation en plein écran  (Lu 1180 fois)
Actionscript 2 : j'ai un problème pour placer mon animation en plein écran
« sur: le 20-06-2008 a 19:27:43 »
bettypage
Membre récent
*

Hors-Ligne

Messages: 1



Je suis un lama!

Voir le Profil
Répondre avec citation

Je ne parviens pas à placer mon anim plein écran tout à gauche de ma page html. Quelqu'un peut-il m'aider? voilà mon code...

Actionscript :

---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------


_root.onEnterFrame=function(){
placer=function (xstart, ystart, nbrl, nbrc, v1x, v1y, v2x, v2y) {
mc_width = Stage.width;
var depth = 0;
i=0;
for(var i = 0; i < nbrl; i++) {
for(var j = 0; j < nbrc; j++) {
var mc = attachMovie("mc_ligne", "mc_ligne" + depth, depth,{_height:1,_width:mc_width,_alpha:random(10)});
mc._x = xstart + v1x*j + v2x*i;
mc._y = ystart + v1y*j + v2y*i;
depth++;
};
};
};
placer(0, 0, Stage.height/2, 1,1, 0, 0, 2);
};
//
// __________________________________________________________________
//                              PROPRIETES Coordonnées absolues
//
_global.anim_width = 800;
_global.anim_height = 600;
with (Object.prototype) {

  setX = function (posX) {
      this._x = posX+(_global.anim_width-Stage.width)/2;   
  };
  getX = function () {
      return this._x-(_global.anim_width-Stage.width)/2;
  };
  setY = function (posY) {
      this._y = posY+(_global.anim_height-Stage.height)/2;
  };
  getY = function () {
      return this._y-(_global.anim_height-Stage.height)/2;
  };

  addProperty("x", getX, setX);
  addProperty("y", getY, setY);

Stage.scaleMode = "noScale";

Stage.addListener(this);

this.onResize = function() {

xstart=posX+(_global.anim_width-Stage.width)/2;   
ystart=posY+(_global.anim_height-Stage.height)/2;
placer(xstart, ystart, Stage.height/2, 1,1, 0, 0, 2);

};

onResize();


---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------

Html :


---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
<!--
html, body {
margin: 0;
padding: 0;
height: 100%
}
#contenu{
width:100%;
height:100%;
position:absolute;
left:0;
top:0;
}
-->
</style>
</head>
<body>
<div id="contenu">
  <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="100%" height="100%">
    <param name="movie" value="bg_flash_02.swf">
    <param name="quality" value="high">
    <embed src="bg_flash_02.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="100%" height="100%"></embed>
  </object>
</div>
</body>
</html>


« Dernière Édition: le 20-06-2008 a 19:44:16 par bettypage » Rapporter au modérateur  
Répondre    Aviser des réponses    Envoyer le sujet    Imprimer
Pages: [1] Monter
« Précédent Suivant »
Sauter à: 

Votre statut : Invité
Vous devez être membre pour participer.
 
 
Let’s Encrypt : le certificat SSL gratuit
Tester votre site internet sur différents navigateurs
[WordPress] Des problèmes avec l’administration ?
Rappel : Mettez à jour vos CMS et vos sites E-commerce
Le .fr fête ses 25 années d’existence !
Mesurer votre audience en temps réel avec BubbleStat
Porter réclamation contre Google Panda ?
Zlio n’est plus …
 
 
 
 
 

Copyright (c) Devclic 2002 - 2026 - Tous droits réservés

creation site internet strasbourg