Précédent   Forum des professionnels en informatique > Webmasters - Développement Web > Flash/Flex > Flash
Flash Forum d'entraide sur la technologie Flash (Cours, FAQs, Sources)
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 04/01/2008, 11h50   #1
Membre du Club
 
Inscription : janvier 2007
Messages : 69
Détails du profil
Informations personnelles :
Localisation : France, Rhône (Rhône Alpes)

Informations forums :
Inscription : janvier 2007
Messages : 69
Points : 45
Points : 45
Par défaut [FLASH/PHP] Probleme de loadMovie

Bonjour,

Alors voila j'ai fait une importation de variable php dans mon flash avec ces codes :

PHP :
Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
 
	function transFLA($text) {
 
		// MAJUSCULE
		$text = strtolower($text);
 
		// ACCENTS
		$text = ereg_replace("[éèêë]", "e", $text);
		$text = ereg_replace("[ç]", "c", $text);
		$text = ereg_replace("[áàâä@]", "a", $text);
		$text = ereg_replace("[ùûü]", "u", $text);
		$text = ereg_replace("[óôö]", "o", $text);
		$text = ereg_replace("[ÿ]", "y", $text);
		$text = ereg_replace("[ïîí]", "i", $text);
		$text = ereg_replace("[ñ]", "n", $text);
 
		// APOSTROPHES
		$text = ereg_replace("['\"]", " ", $text);
		$text = ereg_replace(" - ", " ", $text);
		$text = ereg_replace("/", " ", $text);
 
		// CARACTERES SPECIAUX
		$text = ereg_replace("[^a-z0-9/. -]", "", $text);
 
 
		return $text;
 
	}
 
$sqlnew = 'SELECT pi.produit_image_mini, p.produit_id, p.produit_nom, cat.categorie_nom, cp.categorie_id FROM categorie cat, produit_categorie cp, produit_image pi, produit p';
$sqlnew.= ' WHERE';
$sqlnew.= ' pi.produit_id = p.produit_id';
$sqlnew.= ' AND cp.categorie_id = cat.categorie_id';
$sqlnew.= ' AND p.produit_id = cp.produit_id';
$sqlnew.= ' AND p.produit_nouveaute_id = 1';
$sqlnew.= ' AND p.produit_date_nouveaute >'.time();
$sqlnew.= ' AND pi.produit_image_mini != ""';
$sqlnew.= ' GROUP BY p.produit_id ORDER BY rand() LIMIT 0,1';
$result = mysql_query($sqlnew);
while($row = mysql_fetch_array($result, MYSQL_ASSOC)){
 
$nom_N=transFLA($row['produit_nom']);
echo "&N_produit_nom=$nom_N&";
$nom_img_N=$row['produit_image_mini'];
echo"&N_image=$nom_img_N&";
}
FLASH :
Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
 
//nom produit
this.createTextField("nom_pro_nouv",0, -20, -20, 260, 90);
nom_pro_nouv.multiline = true;
nom_pro_nouv.wordWrap = true;
var my_fmt:TextFormat = new TextFormat();
my_fmt.color = 0x80B7CF;
my_fmt.underline = true;
my_fmt.align = "center";
my_fmt.size = 14;
nom_pro_nouv._alpha =0;
 
//image produit
image_N = _root.createEmptyMovieClip("image_N",_root.getNextHighestDepth());
 
var loadVars:LoadVars = new LoadVars();
loadVars.onLoad = function(success:Boolean) {
	nom_pro_nouv.text = this.N_produit_nom;
	image_N.creatEmptyMovieClip("container_mc",_root.getNextHighestDepth());
	image_N.container_mc.loadMovie("http://www.blablabla.bla/"+this.N_image,this);
	image_N._alpha=0;
 
}
loadVars.load("ecran.php");
 
 
var intervalId:Number;
var count:Number = 577;
var maxCount:Number = 0;
var duration:Number = 9;
 
function actionbouton():Void {
 
// affichage des produits
if(count == 200){
	//trace("ici on affiche les produits");
		nom_pro_nouv._alpha =100;
		nom_pro_nouv._x = 28;
		nom_pro_nouv._y = 380;
		nom_pro_nouv.setTextFormat(my_fmt);
		image_N._alpha=100;
		image_N._x =82;
		image_N._y =400;
		image_N._width=372;
		image_N._height=372;
}
 
if(count <= maxCount) {
 
 	 clearInterval(intervalId);
 } 
 count--;
}
 
intervalId = setInterval(this, "actionbouton", duration);
Bien entendu, ce n'est qu'une partie de mon code, la partie qui gere l'affichage du produit.

Hors en fait le nom de mon produit s'affiche correctement, mais pas l'image...

Si vous comprenez pourquoi, moi ca fait un petit bout de temps que j'essaye mais ca marche pas.

Merci d'avance pour vos idées et solutions.
Larffas est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 04/01/2008, 14h15   #2
Membre du Club
 
Inscription : janvier 2007
Messages : 69
Détails du profil
Informations personnelles :
Localisation : France, Rhône (Rhône Alpes)

Informations forums :
Inscription : janvier 2007
Messages : 69
Points : 45
Points : 45
up
Larffas est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité Cette discussion est résolue.
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 17h09.


 
 
 
 
Partenaires

Hébergement Web