Intégrer du flash dans du php

Fermé
Le mac - 24 févr. 2010 à 08:56
avion-f16 Messages postés 19246 Date d'inscription dimanche 17 février 2008 Statut Contributeur Dernière intervention 21 avril 2024 - 24 févr. 2010 à 14:56
Bonjour,

voila, je suis débutant en programmation, et j'aimerai savoir comment intégrer ce code dans du php :

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1" />
<title>flShow - Carousel</title>
<meta name="Author" content="Saverio Caminiti" />

<script type="text/javascript" src="swfobject.js"></script>

<style type="text/css">
body {
font: 12pt Georgia, Times, serif;
height: 100%;
color: #333333;
background: white url(bg.jpg);
}
.carousel_container {
width: 750px;
height: 500px;
margin: 0px auto;
border: 1px solid #3399FF;
}
</style>
</head>

<body>


<div class="carousel_container">
<div id="carousel1">
<p>This slideshow requires <a href="https://get.adobe.com/flashplayer/">Adobe Flash Player 9.0</a> (or higher). JavaScript must be enabled.</p>
</div>
</div>
<script type="text/javascript">
swfobject.embedSWF("Carousel.swf", "carousel1", "750", "500", "9.0.0", false, {xmlfile:"default.xml", loaderColor:"0x666666"}, {wmode: "transparent"});
</script>

</body>
</htm>


ce code me permet d'afficher du flash.

merci par avance.
A voir également:

2 réponses

Titial69 Messages postés 259 Date d'inscription lundi 22 février 2010 Statut Membre Dernière intervention 11 mars 2010 20
24 févr. 2010 à 09:04
Ben il suffit de mettre ca dans ta page et de rajouter ton php dedans tout simplement. exemple :

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1" />
<title>flShow - Carousel</title>
<meta name="Author" content="Saverio Caminiti" />

<script type="text/javascript" src="swfobject.js"></script>

<style type="text/css">
body {
font: 12pt Georgia, Times, serif;
height: 100%;
color: #333333;
background: white url(bg.jpg);
}
.carousel_container {
width: 750px;
height: 500px;
margin: 0px auto;
border: 1px solid #3399FF;
}
</style>
</head>

<body>
<?php echo 'mon code php'; ?>

<div class="carousel_container">
<div id="carousel1">
<p>This slideshow requires <a href="https://get.adobe.com/flashplayer/">Adobe Flash Player 9.0</a> (or higher). JavaScript must be enabled.</p>
</div>
</div>
<script type="text/javascript">
swfobject.embedSWF("Carousel.swf", "carousel1", "750", "500", "9.0.0", false, {xmlfile:"default.xml", loaderColor:"0x666666"}, {wmode: "transparent"});
</script>

</body>
</htm> 

0
avion-f16 Messages postés 19246 Date d'inscription dimanche 17 février 2008 Statut Contributeur Dernière intervention 21 avril 2024 4 497
24 févr. 2010 à 14:56
Le PHP sert juste à générer du texte et à traiter les données.
Donc il suffit de faire un echo du code qui inclus ton animation :
<div class="carousel_container">
<div id="carousel1">
<p>This slideshow requires <a href="https://get.adobe.com/flashplayer/">Adobe Flash Player 9.0</a> (or higher). JavaScript must be enabled.</p>
</div>
</div>
<script type="text/javascript">
swfobject.embedSWF("Carousel.swf", "carousel1", "750", "500", "9.0.0", false, {xmlfile:"default.xml", loaderColor:"0x666666"}, {wmode: "transparent"});
</script>

Sans oublier de mettre ces lignes dans le head de ta page :
<script type="text/javascript" src="swfobject.js"></script>

<style type="text/css">
body {
font: 12pt Georgia, Times, serif;
height: 100%;
color: #333333;
background: white url(bg.jpg);
}
.carousel_container {
width: 750px;
height: 500px;
margin: 0px auto;
border: 1px solid #3399FF;
}
</style>
0