Actionscript Charger image depuis url variable

cs_bilel59 Messages postés 14 Date d'inscription vendredi 20 octobre 2006 Statut Membre Dernière intervention 25 avril 2009 - 24 févr. 2009 à 23:32
cs_bilel59 Messages postés 14 Date d'inscription vendredi 20 octobre 2006 Statut Membre Dernière intervention 25 avril 2009 - 25 févr. 2009 à 11:12
Bonjour à tous, je vous expose mon problème, j'aimerai afficher une image dont l'url est variable, je connais le principe et j'ai fait les script php adéquate, là ou ça coince c'est précisément ici : loadMovie(urldelaphoto, "conteneur");
En effet, je ne sais pas quoi mettre à la place de "urldelaphoto" étant donné que cell-ci est variable, voici mon code :

var monChargement_lv = new LoadVars();
monChargement_lv.onLoad = function(success) {
    if (success) {
        _root.annonce = monChargement_lv.annonce;
        _root.recordman = monChargement_lv.recordman;
        _root.titre = monChargement_lv.titre;
        _root.tel = monChargement_lv.tel;
        _root.email = monChargement_lv.email;
        _root.ville = monChargement_lv.ville;
        _root.photo = monChargement_lv.photo;
        _root.pseudo = monChargement_lv.pseudo;
        _root.ida = monChargement_lv.ida;
       
    }
};
loadMovie(photo, "conteneur");
monChargement_lv.load("http://www.monsite.fr/monscript/6.php",monChargement_lv,"POST");
stop();

Merci d'avance

2 réponses

Orange73 Messages postés 1375 Date d'inscription dimanche 28 novembre 2004 Statut Membre Dernière intervention 2 août 2011
25 févr. 2009 à 11:06
hello,

tu as mal placé ton loadMovie car actuellement il charge "undefined" car tu n'attend pas que





monChargement_lv
soit totalement chargé.. donc essaie sa :







var monChargement_lv = new LoadVars();
monChargement_lv.onLoad = function(success) {
    if (success) {
        _root.annonce = monChargement_lv.annonce;
        _root.recordman = monChargement_lv.recordman;
        _root.titre = monChargement_lv.titre;
        _root.tel = monChargement_lv.tel;
        _root.email = monChargement_lv.email;
        _root.ville = monChargement_lv.ville;
        _root.photo = monChargement_lv.photo;
        _root.pseudo = monChargement_lv.pseudo;
        _root.ida = monChargement_lv.ida;
       




         loadMovie(_root.photo, _root.conteneur);





    }
};
monChargement_lv.load("http://www.monsite.fr/monscript/6.php",monChargement_lv,"POST");
stop();
0
cs_bilel59 Messages postés 14 Date d'inscription vendredi 20 octobre 2006 Statut Membre Dernière intervention 25 avril 2009
25 févr. 2009 à 11:12
Merci infiniment orange73, ta solution est la bonne.
0
Rejoignez-nous