|
|
 Flash 8
import mx.transitions.Tween;
import mx.transitions.easing.*;
durée = 300;
max = 6;
num = 0;
initialisation();
loading();
function initialisation() {
num++;
nn = 0;
statutLoad = 1;
statutTimer = 1;
}
function loading() {
Oldclip = myclip;
if (num == max) {
num = 1;
}
this.createEmptyMovieClip(« clip »+num,this.getNextHighestDepth());
eval(« clip »+num)._alpha = 0;
eval(« clip »+num).loadMovie(« http://www.ateliernumerique.com/images/img »+num+ ».gif »);
myclip = eval(« clip »+num);
this.onEnterFrame = fondu;
}
function fondu() {
nn++;
pourcentage = myclip.getBytesLoaded()/myclip.getBytesTotal()*100;
if (pourcentage == 100) {
statutLoad = 1;
}
if (nn>durée) {
statutTimer = 1; }
if (statutTimer == 1 && statutLoad == 1 && myclip._width>0) {
delete this.onEnterFrame;
change_image();
}
}
function change_image() {
myclip._x = (Stage.width-myclip._width)/2;
myclip._y = (Stage.height-myclip._height)/2;
var MonAnim:Tween = new Tween(myclip, ‘_alpha’, Strong.easeOut, myclip._alpha, 100, 2, true);
var MonAnim:Tween = new Tween(Oldclip, ‘_alpha’, Strong.easeOut, Oldclip._alpha, 0, 2, true);
MonAnim.onMotionFinished = function() {
Oldclip.removeMovieClip();
initialisation();
loading();
};
}
|
|
|
|
|
 Flash 8
import mx.transitions.Tween;
import mx.transitions.easing.*;
durée = 100;
max = 4;
num = 1;
nn = 0;
statutLoad = 1;
statutTimer = 1;
loading();
function loading() {
if (num == max+1) {
num = 1;
}
this.createEmptyMovieClip(« clip »+num,this.getNextHighestDepth());
eval(« clip »+num).loadMovie(« http://www.ateliernumerique.com/images/img »+num+ ».gif »);
eval(« clip »+num)._x = Stage.width;
Oldclip = myclip;
myclip = eval(« clip »+num);
this.onEnterFrame = fondu; }
function fondu() {
nn++;
pourcentage = myclip.getBytesLoaded()/myclip.getBytesTotal()*100;
if (pourcentage == 100) {
statutLoad = 1;
}
if (nn>durée) {
statutTimer = 1;
}
if (statutTimer == 1 && statutLoad == 1) {
delete this.onEnterFrame;
num++;
Moving();
nn = 0;
}
}
function Moving() {
var MonAnim:Tween = new Tween(myclip, ‘_x’, Strong.easeOut, myclip._x, 0, 2, true);
var MonAnim:Tween = new Tween(Oldclip, ‘_x’, Strong.easeOut, Oldclip._x, -Stage.width, 2, true);
statutTimer = 0;
statutLoad = 0;
loading();
}
|
|
|
bonjour, comment paramétrer le temps d’affichage des photo svp – la fonction ‘durée’ ne marche pas …merci mille fois de votre réponse et merci pour la source – dommage si on peux pas paramétrer …sauvez moi !!! 3 jours là dessus suis nulllllllllllll
en fait il suffit de mettre statutLoad = 0; à la 3eme ligne avant la fin – après loading..
et voilà
bonjour
bonne journée
je suis dsl de vous importuné mais je recherche un diaporama comme le votre celui avec le fondu dont les images serait charger par un fichier xml où l’on pourrait insérer des photos format paysages ou portrait que faut-il que je modifie dans votre code pour obtenir ce que je souhaite.J’ai 48 ans et je ne connais pas grand chose en AS mais j’essaye quand même d’avancer à mon rythme. je vous remercie de toute coeur,j’espère que vous pourrez m’aider et merci pour ce que vous faites cordialement p’tite mimi
Bonjour p’tite mimi,
C’est un peu plus compliqué avec un fichier xml. Si tu ne connais pas bien l’AS tu risques d’avoir un peu de mal.
Sinon, il y a des sources en AS3/XML à cette adresse : http://www.graphic-flash-sources.com/category/images/
Bon courage
bonjour,
très bien ce diaporama mais comme yann je n’arrive pas à ralentir le défilement des images et sa solution ne marche pas pour moi…
Une solution ??
Merci
ok j’ai pigé :
function change_image() {
myclip._x = (Stage.width-myclip._width)/2;
myclip._y = (Stage.height-myclip._height)/2;
var MonAnim:Tween = new Tween(myclip, ‘_alpha’, Strong.easeOut, myclip._alpha, 100, 2, true);
var MonAnim:Tween = new Tween(Oldclip, ‘_alpha’, Strong.easeOut, Oldclip._alpha, 0, 2, true);
MonAnim.onMotionFinished = function() {
Oldclip.removeMovieClip();
initialisation();
statutLoad = 0;
statutTimer = 0;
loading();
et mettre durée à 100 et là c’est plus calme…
Have a good day