1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
import mx.transitions.Tween;
import mx.transitions.easing.*;
// Declaration des objets tween sur les photos
var TwPhoto1:Tween = new Tween( this.objetPhoto1, "_alpha", Regular.easeOut, 100, 0, 2, true );
TwPhoto1.stop();
var TwPhoto2:Tween = new Tween( this.objetPhoto2, "_alpha", Regular.easeOut, 100, 0, 2, true );
TwPhoto2.stop();
var TwPhoto3:Tween = new Tween( this.objetPhoto3, "_alpha", Regular.easeOut, 100, 0, 2, true );
TwPhoto3.stop();
var TwPhoto4:Tween = new Tween( this.objetPhoto4, "_alpha", Regular.easeOut, 100, 0, 2, true );
TwPhoto4.stop();
// Declaration des listener et attachement aux tween
var listenerPhoto1:Object = new Object ();
listenerPhoto1.onMotionFinished = function (Void):Void
{
// Tempo ?
TwPhoto2.start();
}
TwPhoto1.addListener(listenerPhoto1);
var listenerPhoto2:Object = new Object ();
listenerPhoto2.onMotionFinished = function (Void):Void { TwPhoto3.start(); }
TwPhoto2.addListener(listenerPhoto2);
var listenerPhoto3:Object = new Object ();
listenerPhoto3.onMotionFinished = function (Void):Void { TwPhoto4.start(); }
TwPhoto3.addListener(listenerPhoto3);
var listenerPhoto4:Object = new Object ();
listenerPhoto4.onMotionFinished = function (Void):Void
{
this.objetPhoto1._alpha = 100;
this.objetPhoto2._alpha = 100;
this.objetPhoto3._alpha = 100;
this.objetPhoto4._alpha = 100;
TwPhoto1.start();
}
TwPhoto4.addListener(listenerPhoto4);
// D�arrage de la s�uence
TwPhoto1.start(); |
Partager