Есть анимированый мувик на нём указал три положения:

Код:
on(rollOver)
{
this.gotoAndPlay(2);}
on(rollOut)
{
this.gotoAndPlay(3);
}
on(press)
{
this.gotoAndPlay(4);
}
потом вставил в четвёртый кадр самого мувика вот этот код создания галереи:

Код:
portfolioInfo = new XML();
portfolioInfo.ignoreWhite = true;
timeline = this;
baseurl = _url.substr(0, _url.lastIndexOf("/")+1);
portfolioInfo.onLoad = function() {
portfolioTag = this.firstChild;
(count=portfolioTag.childNodes.length);
for (child=0; child<count; child++) {
currentPicture = portfolioTag.childNodes[child];
currentThumb = menu_mc.createEmptyMovieClip("thumbnail"+child, child);
currentThumb._x = child*40;
image = currentThumb.createEmptyMovieClip("thumbnail_image", 0);
image.loadMovie(baseurl+currentPicture.attributes.THUMB);
currentThumb.NAME = currentPicture.attributes.NAME;
currentThumb.IMAGE = currentPicture.attributes.IMAGE;
currentThumb.TEXT = currentPicture.attributes.TEXT;
import mx.transitions.Tween;
import mx.transitions.easing.None;
currentThumb.onRollOver = currentThumb.onDragOver=function () {
this.tweenX.stop();
this.tweenY.stop();
this.tweenX = new Tween(this, "_xscale", None.easeNone, this._xscale, 140, 0.3, true);
this.tweenY = new Tween(this, "_yscale", None.easeNone, this._yscale, 140, 0.3, true);
showName_txt.text = this.NAME;
};
currentThumb.onRollOut = currentThumb.onDragOut=function () {
this.tweenX.stop();
this.tweenY.stop();
this.tweenX = new Tween(this, "_xscale", None.easeNone, this._xscale, 100, 0.3, true);
this.tweenY = new Tween(this, "_yscale", None.easeNone, this._yscale, 100, 0.3, true);
showName_txt.text = this.NAME;
showName_txt.text = "";
};
currentThumb.onPress = currentThumb.onDragOver=function () {
image_mc.origDepth = image_mc.getDepth();
image_mc.swapDepths(image_mc._parent.getNextHighestDepth());
mx.transitions.TransitionManager.start(image_mc, {type:mx.transitions.Photo, direction:0, duration:1, easing:mx.transitions.easing.Strong.easeOut, param1:empty, param2:empty});
image_mc.loadMovie(baseurl+this.IMAGE);
info_txt.text = "Loading...";
timeline.loadVariables(baseurl+this.TEXT);
};
}
};
portfolioInfo.load(baseurl+"xmlportfoliowithimageandtext.xml");
но код не выполняется, хмл и файл находится в той же директории.
Подскажите пожалуйста.