rendered paste bodydataXML = new XML();
dataXML.ignoreWhite = true;
dataXML.load("dataXML.xml");
//
dataXML.onLoad = function(status) {
if (status) {
tmpXML = dataXML.firstChild.childNodes;
pixTotal = tmpXML.length;
_root.productSlider("container", "bild", 1, 65, 100, 2, pixTotal, 3, 3,0);
//Funktionsaufruf !! pixShow und pixNumber immer miteinander ändern !!
delete dataXML;
}
};
//
function productSlider(instanz, clip, tiefe, pixHeight, pixWidth, pixDistance, pixShow, pixNumber, pixSpeed, yStart) {
createEmptyMovieClip(instanz, tiefe);
_root.container.setMask(_root.Maske);
for (var x:Number = 1; x<pixShow; x++) {
var y:Number = x;
this[instanz].attachMovie(clip, clip+x, x);
this[instanz][clip+x]._x = (x*pixHeight);
this[instanz][clip+x].link = tmpXML[x-1].attributes.url;
this[instanz][clip+x].jahr = tmpXML[x-1].attributes.jahr;
this[instanz][clip+x].onRelease = function() {
getURL(this.link, "_blank");
};
this[instanz][clip+x].mc.loadMovie(tmpXML[y-1].firstChild);
//
this[instanz].onEnterFrame = function() {
if (_root.hitTest(_root._xmouse, _root._ymouse, true)) {
this.yDiff = this[clip+pixNumber]._y+pixHeight;
if (this.yDiff>0) {
this.yDiff = pixSpeed;
for (var z = 1; z<pixShow; z++) {
this[clip+z]._x -= int((_xmouse-489)/60);
}
}
} else {
this.yDiff = this[clip+pixNumber]._y+pixHeight;
if (this.yDiff>0) {
this.yDiff = pixSpeed;
for (var z = 1; z<pixShow; z++) {
this[clip+z]._x -= int((_xmouse-489)/60);
}
}
}
};
}
}