Most of the time you call `set` directly there is no "event" to talk about.

myFx.set(100);
doWhateverYouWant_YouDontNeedAnEvent();

However, recently, I needed do something on every tick of an animation.  I 
wasn't calling set directly, so I needed an event.

http://jsfiddle.net/rpflorence/gGggt/

You'll need to open the console.  Note that I extended Fx.Morph onto itself 
because I needed all instances to have this behavior.


On Jan 20, 2011, at 3:04 AM, stratboy wrote:

> mmmm, hey, yes. good. thank you.
> 
> Anyway, (for the developers) it would be nice if this was builtin.
> Eventually if there's the need sometimes to not to broadcast the
> event, well, make it optional in the set() arguments.
> 
> 
> 
> On 20 Gen, 10:58, Arian Stolwijk <[email protected]> wrote:
>> Or you could use
>> 
>> fx.fireEvent('complete');
>> 
>> On Thu, Jan 20, 2011 at 10:52 AM, stratboy <[email protected]> wrote:
>>> Hi! It's quite strange to me. Why?
>>> I have a function that, based on a param (fx), calls Fx.Scroll.start()
>>> or .set(). But in both cases, a listener on the onComplete event
>>> should be called... If I use set, the event just isn't broadcasted.
>>> Therefore, to achieve the same goal, I had to do something like this:
>> 
>>>                if(!fx){
>>>                        this.scroller.setOptions({ duration:0 })//to
>>> simulate set()
>>>                        this.scroller.start(pos,0);
>>>                        this.scroller.setOptions({ duration:500 })//to
>>> restore original duration
>>>                }
>>>                else this.scroller.start(pos,0);
>> 
>>> Not to good right?
>> 
>>> Any idea?

Reply via email to