Just trying to use setInterval in a class … mmmm…
I can’t seem to get my params passed through though.
Here is the main .fla file calling the class:
var clips:Initialize = new Initialize(this);
clips.init("title", o, alphaBlur, 1000, 14, 12, 81);
And here is the class (thus far):
import as.classes.Transition;
class as.classes.Initialize {
private var clip:MovieClip;
private var time:Number;
private var xPos:Number;
private var yPos:Number;
private var t:MovieClip;
private var trans:Function;
public var onStage:Array;
private var intervalId:Number;
private var appear:Function;
function Initialize(mc:MovieClip) {
t = mc;
onStage = new Array();
}
public function init(mc:String, o:Object, trans:Array, time:Number, alpha:Number, xPos:Number, yPos:Number) {
var clip:MovieClip = t.attachMovie(mc, mc, t.getNextHighestDepth(), {_alpha:alpha, _x:xPos, _y:yPos});
var effect:Transition = new Transition();
for (var i = 0; i<trans.length; ++i) {
effect[trans*.func](clip, trans*, alpha);
}
onStage.push(clip);
}
}
ok … everything works without the setInterval. However when I pass the ‘time’ param through to the init method, I would like the clip to come in at the that time. So right now the ‘title’ clip should appear 1000ms into the main timeline. Right now it jsut appears … 0ms into the main timeline. Any ideas?
Thank you in advance