3e4ff3564d
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4190 542714f4-19e9-0310-aa3c-eee0fc999fb1
30 lines
573 B
ActionScript
30 lines
573 B
ActionScript
package com.threerings.mx.effects {
|
|
|
|
import mx.effects.effectClasses.ActionEffectInstance;
|
|
|
|
public class FunctionEffectInstance extends ActionEffectInstance
|
|
{
|
|
public function FunctionEffectInstance (target :Object)
|
|
{
|
|
super(target);
|
|
}
|
|
|
|
/** The function to call. */
|
|
public var func :Function;
|
|
|
|
/** The args to pass. */
|
|
public var args :Array;
|
|
|
|
override public function play () :void
|
|
{
|
|
super.play();
|
|
|
|
// call the function!
|
|
func.apply(null, args);
|
|
|
|
// and we're done
|
|
finishRepeat();
|
|
}
|
|
}
|
|
}
|