Mike,

Add 

listener.onEffectEnd(this);

to the end of your playEffect function. This will tell the Sequence effect
that the effect is finished playing. The Sequence effect sets itself as the
listener of each of its child effects. 

Jason

-----Original Message-----
From: Mike Shaw [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 30, 2005 11:01 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Custom AS2 Effects



Hi Folks,

Does anyone know why the following custom effect class which I am trying to
use to call various functions in an effect sequence would cause the sequence
to halt after running the called function.

Thanks Mike.

import mx.effects.Effect;

class com.webqem.flex.effects.CallFunctionEffect extends Effect {
        
        private var obj:Object;
        private var func:String;
        private var args:Array;
                
        function CallFunctionEffect(obj:Object, func:String) {
                this.obj = obj;
                this.func = func;
                arguments.shift();
                arguments.shift();
                this.args = arguments;
        }
        
        public function playEffect():Void {             
                if (obj != null && func != null) {
                        obj[func].apply(obj, args);
                }               
        }
        
        public function getAffectedProperties():Array {
                return new Array();
        }
}




 
Yahoo! Groups Links



 





 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to