nooo se faccio il trace del _width dell' mc mi dice undefined
spe ti posto il codice completo magari è + chiaro:
Codice PHP:
import mx.transitions.Tween;
stop();
function setLink() {
timer.timeBar.xSlideTo(-212,1,"easeInOutQuint",0,function () {
if (playStat == "yes") {
callTime();
}
mainWindow.playPause.enabled = true;
});
linkBtn.onRelease = function() {
getURL(arrLink[p-1], "_self");
};
mainWindow.mainText.gotoAndPlay(1);
}
this.goForth = function() {
_root.bianco.ySlideTo(139,2,"easeInOutQuint",0,this.goBack);
};
this.goBack = function() {
var prev = _global.p-1;
var snext = p;
if(prev == 0){
prev = 1;
}
if (p<items) {
_global.p++;
}else{
_global.p = 1;
}
if (prev == 0){
prev = items;
}
_root.mainWindow.content["cont"+prev]._alpha = 0;
_root.mainWindow.content["cont"+snext]._alpha = 100;
_root.mainWindow.mainText.bandiera.gotoAndPlay(1);
_root.bianco.ySlideTo(_root.bianco.y0,0.5,"easeInOutQuint",0.5, setLink());
};
function nextPic() {
yVar = mainWindow.content._y;
_root.bianco.y0 = _root.bianco._y;
_root.mainWindow.mainText.price.alphaTo(0, 1);
_root.mainWindow.mainText.text.alphaTo(0, 1);
_root.mainWindow.mainText.bandiera.alphaTo(0, 1);
this.goForth();
}
function callTime() {
timer.timeBar.xSlideTo(0,_root.slideTime,"linear",0,function () {
mainWindow.playPause.enabled = false;
_root.nextPic();
});
}
//
function preloadImages() {
timer.timeBar.stopTween("_x");
_global.howmany = 0;
var yPos:Number = 0;
//
for (i=0; i<items; i++) {
C =new Object()
with (C){
_root.C.altezza = 10;
_root.C.larghezza = 10;
}
_root.mainWindow.content["cont"+i].removeMovieClip();
mc = _root.mainWindow.content.attachMovie("cont", "cont"+i, _root.mainWindow.content.getNextHighestDepth(), {_x:0, _y:yPos});
mc.photo = _root.arrItem[_global.gg+i][2];
if (i != 0) {
mc._alpha = 0;
}
//yPos += 300;
}
this.onEnterFrame = function() {
if (howmany == items) {
setLink();
this.onEnterFrame = null;
}
};
}
preloadImages();
io vorrei settare le dimensioni di mc ma ho provato sia a settare le dimensioni di mc che quelle di mc.photo non so veramente + che fare! :S