Envoi de variable entre Flash et PHP
forlent
-
forlent -
forlent -
Bonjour,
J'ai un petit probleme sur l'envoi des variables. j'utilise se code dans flash
CODE ActionScript :
var variables:LoadVars = new LoadVars();
var a_envoyer:LoadVars = new LoadVars();
variables.onLoad = function(succes:Boolean)
{
if (succes)
{
_root.titre = this.titre;
for (var i = 1; i<=4; i++)
{
_root['barre'+i]._yscale = this['barre'+i];
}
}
else
{
trace("Quelque chose n'a pas fonctionné");
}
};
this.onEnterFrame = function()
{
if (Key.isDown(Key.ENTER))
{
a_envoyer.password = this.password.text;
a_envoyer.sendAndLoad("http://zone112.fr/test/test.php",variables,"GET");
this.password._visible = false;
}
};
Sa envoie donc le mot de passe tapez lors de l'appui sur entrez a la page test.php qui est tel
CODE PHP :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Document sans titre</title>
</head>
<body>
<?php
if ($_GET['password'] == 'sdz') {
echo 'titre=Mon+graph&barre1=50&barre2=75&barre3=15&barre4=89';
} else {
echo 'titre=Accès+refusé';
}
?>
</body>
</html>
Or le titre vaut undefined
page de test ici [url=http://www.zone112.fr/test/barre.html]http://www.zone112.fr/test/barre.html/url
merci de votre aide
J'ai un petit probleme sur l'envoi des variables. j'utilise se code dans flash
CODE ActionScript :
var variables:LoadVars = new LoadVars();
var a_envoyer:LoadVars = new LoadVars();
variables.onLoad = function(succes:Boolean)
{
if (succes)
{
_root.titre = this.titre;
for (var i = 1; i<=4; i++)
{
_root['barre'+i]._yscale = this['barre'+i];
}
}
else
{
trace("Quelque chose n'a pas fonctionné");
}
};
this.onEnterFrame = function()
{
if (Key.isDown(Key.ENTER))
{
a_envoyer.password = this.password.text;
a_envoyer.sendAndLoad("http://zone112.fr/test/test.php",variables,"GET");
this.password._visible = false;
}
};
Sa envoie donc le mot de passe tapez lors de l'appui sur entrez a la page test.php qui est tel
CODE PHP :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Document sans titre</title>
</head>
<body>
<?php
if ($_GET['password'] == 'sdz') {
echo 'titre=Mon+graph&barre1=50&barre2=75&barre3=15&barre4=89';
} else {
echo 'titre=Accès+refusé';
}
?>
</body>
</html>
Or le titre vaut undefined
page de test ici [url=http://www.zone112.fr/test/barre.html]http://www.zone112.fr/test/barre.html/url
merci de votre aide
A voir également:
- Envoi de variable entre Flash et PHP
- Flash drive tester - Télécharger - Divers Utilitaires
- Adobe flash player - Télécharger - Divers Web & Internet
- Flash video downloader - Télécharger - Téléchargement & Transfert
- Easy php - Télécharger - Divers Web & Internet
- Shockwave flash - Télécharger - Divers Web & Internet