Hi, I'm new to GSAP and have got an issue with an animation that worked in AS2 but isn't in AS3. I've changed the values so they are AS3 but if someone could tell me what i'm doing wrong, that would be a great help.
I see this error message 4 times when i compile is "1046: Type was not found or was not a compile-time constant: Void."
I've copied my code below.
Thanks for your help.
import com.greensock.TweenNano;
import com.greensock.easing.Quad;
var textWidth:Number = 500; // width that the mask needs to extend to to reveal longest copy
var revealSpeed:Number = 2; // Speed at which the mask reveals the copy
var fadeSpeed:Number = 0.5; // speed that MovieClips fade out
var startTime:Date; // Used for timing the banner animation duration
var endTime:Date; // Used for timing the banner animation duration
{
// Entry point
function init():Void{
//image2_mc._x = -546.15;
//image2_mc._y = -795.15;
showFrame1();
}
}
function revealCopy(mc:MovieClip):Void{
TweenNano.to(mc.mask_mc, revealSpeed,{_width:textWidth, ease:Linear.easeNone});
}
function showFrame1():Void{
startTime = new Date();
//TweenNano.to(image1_mc,2, {_alpha:100, ease:Quad.easeInOut, delay:2}); // Fade in first image
TweenNano.to(ifWeLogo_mc, 1, {_alpha:100, delay:1});
TweenNano.delayedCall(1.5, revealCopy, [copy1_mc ]);
TweenNano.delayedCall(2.5, revealCopy, [copy2_mc ]);
TweenNano.delayedCall(4.5, revealCopy, [copy3_mc ]);
TweenNano.delayedCall(5.8, revealCopy, [copy4_mc ]);
TweenNano.to(compass_mc, 1.5, {_alpha:100, delay:7.5});
TweenNano.to(copy5_mc, 1.5, {_alpha:100, delay:8});
TweenNano.to(image1_mc, 16, {x:-100, y:-8, xscale:85, yscale:85, delay:9, ease:Quad.easeInOut, onComplete:testLooping});
}
function testLooping():Void{
loopNum++;
if(loopNum < maxLoops){
trace('replay');
}else{
endTime = new Date();
trace(startTime-endTime);
}
}
init();