hi, i have a little trouble with my xml menu, i have this code, but went i call my full image and try to upload doesn’t work. I try to put my full image in and Movie Clip with the name of contenedor. But appear a message saying “Error opening URL ‘file:///Macintosh%20HD/Users/sopaseco/Desktop/web2/undefined’”
All work perfect less the onPress.
this is my Action Script:
loadXml("images/maternity/menu.xml");
function loadXml(file:String) {
menuXml.ignoreWhite = true;
menuXml.onLoad = loadMapData;
menuXml.load(file);
function loadMapData() {
for (var i = 0; i<this.firstChild.childNodes.length; i++) {
var bn = this.firstChild.childNodes*.attributes.buttonName;
var t = this.firstChild.childNodes*.attributes.thumbs;
var b = _root.btn.bM1.attachMovie("button", bn, i);
//var b1 = _root.btn.b1.attachMovie("button2", bn, i);
b._x = xStart+((bWidth+2)*i);
b._y = yStart;
b.txt = bn;
loadMovie(t, b.foto);
b.onPress = function() {
contenedor.loadMovie(this.firstChild.childNodes*.attributes.full_url);
};
b.onRollOver = function() {
this.t2._y = 20;
this.t2._alpha = 0;
Tweener.addTween(this.t1,{_alpha:0, _y:-10, time:0.5});
Tweener.addTween(this.t2,{_alpha:80, _y:0, time:0.5, onStart:function () {
this._visible = true;
}});
Tweener.addTween(this.foto,{_alpha:100, time:1, onStart:function () {
this._visible = true;
}});
};
b.onRollOut = function() {
Tweener.addTween(this.t1,{_alpha:100, _y:0, time:0.5});
this.t2._visible = false;
this.foto._visible = false;
};
b.t2._visible = false;
b.foto._visible = false;
b.t2._alpha = 0;
b.foto._alpha = 0;
}
}
}
And this one it’s my XML File:
<?xml version="1.0" encoding="iso-8859-1"?>
<menu>
<menu buttonName= "01" thumbs= "images/maternity/thumbs/thumb01.jpg" full_url= "images/maternity/foto1.jpg"/>
<menu buttonName= "02" thumbs= "images/maternity/thumbs/thumb02.jpg" full_url= "images/maternity/foto2.jpg"/>
<menu buttonName= "03" thumbs= "images/maternity/thumbs/thumb03.jpg" full_url= "images/maternity/foto3.jpg"/>
<menu buttonName= "04" thumbs= "images/maternity/thumbs/thumb04.jpg" full_url= "images/maternity/foto4.jpg"/>
<menu buttonName= "05" thumbs= "images/maternity/thumbs/thumb05.jpg" full_url= "images/maternity/foto5.jpg"/>
<menu buttonName= "06" thumbs= "images/maternity/thumbs/thumb06.jpg" full_url= "images/maternity/foto1.jpg"/>
<menu buttonName= "07" thumbs= "images/maternity/thumbs/thumb07.jpg" full_url= "images/maternity/foto2.jpg"/>
<menu buttonName= "08" thumbs= "images/maternity/thumbs/thumb08.jpg" full_url= "images/maternity/foto3.jpg"/>
<menu buttonName= "09" thumbs= "images/maternity/thumbs/thumb09.jpg" full_url= "images/maternity/foto4.jpg"/>
<menu buttonName= "10" thumbs= "images/maternity/thumbs/thumb10.jpg" full_url= "images/maternity/foto5.jpg"/>
<menu buttonName= "11" thumbs= "images/maternity/thumbs/thumb11.jpg" full_url= "images/maternity/foto1.jpg"/>
<menu buttonName= "12" thumbs= "images/maternity/thumbs/thumb12.jpg" full_url= "images/maternity/foto2.jpg"/>
</menu>