Gestion des levels dans un onLoad
Voila, j'ai un petit problème.
Ca doit probablement etre un truc tout con... mais bon, c'est ceux qu'on voit le moins bien !!
En fait, je met dans une variable container mon level actuel (root en l'occurence) puis je load un fichier xml. Une fois loade, je voudrais faire un onEnterFrame sur mon container. Or en faisant container.onEnterFrame, si je trace le this, je me retrouve avec mon fichier XML....
Si quelqu'un pouvait m'aider....
Voici mon code
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| container=this;
this.fichierXML=new XML();
this.fichierXML.ignoreWhite=true;
this.fichierXML.onLoad=function(succes)
{
if(succes)
{
container.onEnterFrame()
{
trace(this);
}
}
else
{
trace('Erreur lors du chargement');
}
};//Fin de fichierXML.onLoad
this.fichierXML.load('../conf/photos.xml'); |
Merci :)