Er ny i flash, og har lavet en animation ved hjælp af as3 og tweeners..
Problemet er ejg ikke kan få den til at loope, og da det skal fungere som et banner skulle den gerne blot stå og køre..
har leget med yoyo() funktionen med mere, men der kunne jeg kun få en af variablerne til at gentage sig selv..
Her er koden som den ser ud
//import necesarry classes
import fl.transitions.Tween;
import fl.transitions.easing.*;
import fl.transitions.TweenEvent;
//create the tweens
//create a var tween
var tween1:Tween = new Tween(bif, 'x', Elastic.easeOut, -80, 63, 2, true);
var tween2:Tween = new Tween(vs, "alpha", Strong.easeOut, 0, 1, 1, true);
var tween3:Tween = new Tween(sje, 'x', Elastic.easeOut, 340, 214, 1, true);
var tween4:Tween = new Tween(sje, "alpha", Strong.easeOut, 50, 0, 1.7, true);
var tween5:Tween = new Tween(rfc, 'x', Elastic.easeOut, 320, 172, 1, true);
var tween6:Tween = new Tween(rfc, "alpha", Strong.easeOut, 50, 0, 1.7, true);
//HB Køge
var tween7:Tween = new Tween(hbk, 'x', Elastic.easeOut, 320, 174, 1, true);
var tween8:Tween = new Tween(hbk, "alpha", Strong.easeOut, 50, 0, 1.7, true);
//Silkeborg IF
var tween9:Tween = new Tween(sif, 'x', Elastic.easeOut, 320, 172, 1, true);
var tween10:Tween = new Tween(sif, "alpha", Strong.easeOut, 50, 0, 1.7, true);
//FCN
var tween11:Tween = new Tween(fcn, 'x', Elastic.easeOut, 320, 177, 1, true);
var tween12:Tween = new Tween(fcn, "alpha", Strong.easeOut, 50, 0, 1.7, true);
//AGF
var tween13:Tween = new Tween(agf, 'x', Elastic.easeOut, 320, 177, 1, true);
var tween14:Tween = new Tween(agf, "alpha", Strong.easeOut, 50, 0, 1.7, true);
//FCK
var tween15:Tween = new Tween(fck, 'x', Elastic.easeOut, 320, 174, 1, true);
var tween16:Tween = new Tween(fck, "alpha", Strong.easeOut, 50, 0, 1.7, true);
//AAB
var tween17:Tween = new Tween(aab, 'x', Elastic.easeOut, 320, 169, 1, true);
//prevent tween2 and tween3 to start tweening
tween2.stop();
tween3.stop();
tween4.stop();
tween5.stop();
tween6.stop();
tween7.stop();
tween8.stop();
tween9.stop();
tween10.stop();
tween11.stop();
tween12.stop();
tween13.stop();
tween14.stop();
tween15.stop();
tween16.stop();
tween17.stop();
//add event listeners
tween1.addEventListener(TweenEvent.MOTION_FINISH, startTween2);
tween2.addEventListener(TweenEvent.MOTION_FINISH, startTween3);
tween3.addEventListener(TweenEvent.MOTION_FINISH, startTween4);
tween4.addEventListener(TweenEvent.MOTION_FINISH, startTween5);
tween5.addEventListener(TweenEvent.MOTION_FINISH, startTween6);
tween6.addEventListener(TweenEvent.MOTION_FINISH, startTween7);
tween7.addEventListener(TweenEvent.MOTION_FINISH, startTween8);
tween8.addEventListener(TweenEvent.MOTION_FINISH, startTween9);
tween9.addEventListener(TweenEvent.MOTION_FINISH, startTween10);
tween10.addEventListener(TweenEvent.MOTION_FINISH, startTween11);
tween11.addEventListener(TweenEvent.MOTION_FINISH, startTween12);
tween12.addEventListener(TweenEvent.MOTION_FINISH, startTween13);
tween13.addEventListener(TweenEvent.MOTION_FINISH, startTween14);
tween14.addEventListener(TweenEvent.MOTION_FINISH, startTween15);
tween15.addEventListener(TweenEvent.MOTION_FINISH, startTween16);
tween16.addEventListener(TweenEvent.MOTION_FINISH, startTween17);
//create the functions that starts the tweens
function startTween2(event:TweenEvent):void {
tween2.start();
}
function startTween3(event:TweenEvent):void {
//make tween3 start
tween3.start();
}
function startTween4(event:TweenEvent):void {
tween4.start();
}
function startTween5(event:TweenEvent):void {
tween5.start();
}
function startTween6(event:TweenEvent):void {
tween6.start();
}
function startTween7(event:TweenEvent):void {
tween7.start();
}
function startTween8(event:TweenEvent):void {
tween8.start();
}
function startTween9(event:TweenEvent):void {
tween9.start();
}
function startTween10(event:TweenEvent):void {
tween10.start();
}
function startTween11(event:TweenEvent):void {
tween11.start();
}
function startTween12(event:TweenEvent):void {
tween12.start();
}
function startTween13(event:TweenEvent):void {
tween13.start();
}
function startTween14(event:TweenEvent):void {
tween14.start();
}
function startTween15(event:TweenEvent):void {
tween15.start();
}
function startTween16(event:TweenEvent):void {
tween16.start();
}
function startTween17(event:TweenEvent):void {
tween17.start();
}