No, the listener needs to be an object that receives the effectEnded notification (listener is a property of mx.effects.Effect).
http://livedocs.macromedia.com/flex/15/asdocs_en/mx/effects/Effect.ht ml#listener What you can do is put some logic into onEffectEnd that looks at the effect and its properties in order to decide what action to take (like executing a custom function). And see my last post about the parameter not being an event object. Doug --- In [email protected], "gevgelija50" <[EMAIL PROTECTED]> wrote: > > Doug, > > Can I point the listener to a custom function instead? > > e.listener = myFunction; > > > --- In [email protected], "gevgelija50" <gevgelija50@> > wrote: > > > > Doug, > > > > yes, this is in Flex 1.5. > > > > I used your example and it worked great! > > > > Thanks! > > > > --- In [email protected], "Doug Lowder" <douglowder@> > > wrote: > > > > > > Flex 1.5? > > > > > > Instead of e.addEventListener(), use: > > > > > > e.listener = this; > > > > > > and then include an onEffectEnd method: > > > > > > public function onEffectEnd(event: Object) : Void { > > > mx.controls.Alert.show("Effect ended"); > > > } > > > > > > > > > Doug > > > > > > --- In [email protected], "gevgelija50" <gevgelija50@> > > > wrote: > > > > > > > > I have declared an effect actionscript: > > > > > > > > var e = new mx.effects.Resize(ReportContainer); > > > > e.addEventListener("resizeEndEffect",Delegate.create ("eend")) > > > > > > > > e.widthFrom = 0; > > > > e.widthTo = 800; > > > > e.duration=500; > > > > e.playEffect(); > > > > > > > > > > > > > > > > I want to be able to set up a listener for this effect, namely > > for > > > > the END of the effect, then execute some logic. > > > > > > > > I tried the following: > > > > > > > > e.addEventListener("effectEnd",Delegate.create(this, > > doSomething)) > > > > but no luck > > > > > > > > > > > > > > > > please help! > > > > > > > > > > -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 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/

