Bonjour, le code ci-dessous affiche un certain nombre d'images lus dans un fichier xlm. Je lui fais faire un scrolling vertical, le problème c'est que l'image qui est sensée passer dessous est toujours affichée en grand et vient perturber celle qui est dessus. Merci d'avance pour vos conseils. Cordialement
var folder:String = "images/"; // a folder for thumbnail files + an XML file
var total:Number;
var radiusX:Number = 00;// Dépassement image horizontale
var radiusY:Number = 200;// Hauteur de l'image
var centerX:Number = 60;
var centerY:Number = 100;
var speed:Number = 0.001;
System.useCodepage = true;
tn_group_mc._visible = false;
fm_productname.text = ""; fm_productprice.text = ""; fm_url.text = "";
var xml:XML = new XML();
xml.ignoreWhite = true;
speed = 0.001;
xml.onLoad = function()
{
var nodes = this.firstChild.childNodes;// nodes est égal au nom des images
total = nodes.length;// total est égal au nombre d'images
for( var i=0; i < total; i++)
{
var t = tn_group_mc.duplicateMovieClip("tn"+i, i);
t.angle = i * ((Math.PI*2)/total);
t.onEnterFrame = mover;
t.tn_mc.inner.loadMovie( folder + nodes[i].attributes.filename );
t.tn_reflection_mc.inner.loadMovie( folder + nodes[i].attributes.filename );
t.fm_productname = nodes[i].attributes.productname;
t.fm_productprice = nodes[i].attributes.productprice;
t.fm_url = nodes[i].attributes.url;
t.fm_button.onRollOver = function()
{
fm_productname.text = this._parent.fm_productname;
fm_productprice.text = this._parent.fm_productprice;
fm_url.text = this._parent.fm_url;
}
t.fm_button.onRollOut = function()
{
fm_productname.text = "";
fm_productprice.text = "";
fm_url.text = "";
}
t.fm_button.onRelease = function()
{
getURL(this._parent.fm_url);
}
}
}
xml.load( folder + "kampanya.xml");
function mover()
{
this._x = Math.cos(this.angle) * radiusX + centerX;
this._y = Math.sin(this.angle) * radiusY + centerY;
var s = 1;
// this._xscale = this._yscale = s*100;// Grandeur de l'image
this.angle += this._parent.speed;
this.swapDepths(Math.round(this._yscale) + 100);
}
this.onMouseMove = function()
{
speed = (this._ymouse-centerY) * 0.0002;
}