I have a project I’m sooo close to finishing, but I’ve run into a problem. I know this error is common, but I don’t know how to solve it, regardless. Here’s the error:
1136: Incorrect number of arguments. Expected 3.
Here is my script:
import gs.TweenLite;
import gs.easing.*;
var photoNums:Array = new Array(photo_1,photo_2,photo_3,photo_4);
var randPhotos:Array;
var currentPhoto:uint = 0;
function shuffle(a:Array):Array
{
var len:Number = a.length-1;
for (var ivar:Number = len; ivar>=0; ivar--)
{
var p:Number = Math.floor(Math.random()*(ivar+1));
var t = a[ivar];
a[ivar] = a[p];
a[p] = t;
}
return a;
}
randPhotos = shuffle(photoNums);
var timer:Timer = new Timer(5000);
timer.addEventListener(TimerEvent.TIMER, onTimer);
timer.start();
function onTimer(evt:TimerEvent):void
{
if (currentPhoto > 0)
{
TweenLite.to(this.randPhotos[currentPhoto]), .5, {x:140, y:0, ease:Back.easeInOut};
}
TweenLite.to(this.randPhotos[currentPhoto+1]), .5, {x:600, y:0, ease:Back.easeInOut};
currentPhoto += 1;
}
The error is apparently occurring during the last part of the script, the “TweenLite” statements…
Any chance anyone knows how I can fix this?