bonsoir ! je suis bien crevé, mon cerveau racle bien ce soir
je me remet a flash ç'est dur ^^
alors en fait j'ai tenté de faire une petite gallerie avec un petit effet de torsion des images.
ce que j'aime dans les gallerie photos defilantes c'est qu'il n'y ai pas de fin, cad que ça tourne a l'infini.
enfin voila le resultat auquel j'arrive
http://dess.216.free.fr/gallerie/
lorsque l'on va vers la gauche (j'ai pas encore fait pour le coté droit) il y a un sale effet, une sorte de tremblement lorsque je replace le clip au bon endroit. j'aimerais eviter ça mais ça me semble chaud, si vous avez une idée, une piste je suis tres preneur. je vous met le code.
en gros j'ai généré deux fois les clips afin de pouvoir replacé l'ensemble pour la rotation infini
onClipEvent (enterFrame) {
//MOUVEMENT
xpos = _root._xmouse;
xpos = xpos-(moview/2);
_root.photo._x = _root.photo._x-(xpos/speed);
//ROTATION INFINI
//a gauche
if(_root.photo._x>0){
trace(_root.photo['cadre'+(_root.tabimage.length+1)]._x)
_root.photo._x=-_root.photo['cadre'+(_root.tabimage.length)]._x
}
for(i=0; i<=_root.nbcadre-1; i++){
ytp=_root.photo._x+(_root.photo["cadre"+i]._x)+50
if (ytp>moview/2){
ytp=ytp-moview/2
}else{
ytp=moview/2-ytp
}
//effet courbe de trajectoire
_root.photo["cadre"+i]._y=Math.floor(-0.1*ytp)
_root.photo["carre"+i]._y=Math.floor(-0.1*ytp)
//transparence progressive
_root.photo["cadre"+i]._alpha=Math.floor(100-ytp/4)
_root.photo["carre"+i]._alpha=Math.floor(100-ytp/4)
//fausse perspective (code recup sur flash france)
xtemp=_root.photo._x+_root.photo["cadre"+i]._x-135
ytemp=100
alpha = Math.atan2(ytemp, _root.photo["cadre"+i].glus._width-xtemp)/2;
_root.photo["cadre"+i].glus._rotation = 45;
_root.photo["cadre"+i].glus._xscale = Math.SQRT2*Math.sin(alpha)*100;
_root.photo["cadre"+i].glus._yscale = (ytemp*Math.cos(alpha)+(xtemp-_root.photo["cadre"+i].glus._width)*Math.sin(alpha))/_root.photo["cadre"+i].glus._height*Math.SQRT2*100;
_root.photo["cadre"+i]._xscale = 100/Math.tan(alpha);
_root.photo["cadre"+i]._rotation = -alpha*180/Math.PI;
}
}