[FLASH 8] Acces a un swf chargé via loadClip
salut,
je charge un swf via la fonction suivante :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
function loadBoxPanel():MovieClip
{
var boxPanel = this.createEmptyMovieClip("boxPanelContainer", this.getNextHighestDepth());
var loader = new MovieClipLoader();
listener = new Object();
loader.addListener(listener);
listener.onLoadComplete = function(mc) {
mc._x = 255;
};
loader.loadClip("boxPanel.swf", boxPanel);
return boxPanel;
}
var bP:MovieClip = loadBoxPanel();
trace(bP); // renvoie _level0.boxPanelContainer
bouton.onRelease = function()
{
bP.play(); // ne marche pas !!
} |
ça fonctionne. Sauf que ce swf est une animation que j'aimerai lancé à partir de boutons se trouvant sur ma scène.
Mais je n'arrive pas y accèder pour lui dire de jouer.