-
Building a Function, passing lines of code
So this is a basic question, I think, but I'm having a bunch of trouble.
Basically, I want to save time by building functions for my commonly used tasks, in this case fading transitions. I want to build a function that can pass the specifics for the transition, and then implement them in code. However, I can't figure out what class to make the arguments - when they're strings it errors and I don't know what else to call them. Here's the basic of the code:
private function transition(obj:MovieClip,string:string,direc:Strin g,durat:Number,ease:String,evt:Function):void {
var tm:TransitionManager = new TransitionManager(obj);
tm.startTransition({type:string, direction:direc, duration:durat, easing:ease});
tm.addEventListener("allTransitionsInDone",evt);
}
transition(tribeguys_mc,Fade,"Transition.IN",4,"Re gular.easeOut",testing123)
I'm looking for a way to do this in multiple cases - when a flash method has multiple arguements, I want to be able to pass them in a function.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|