[Tweener] Tweener AS3 : TypeError: Error #1009 - isTweening()
derdanilo at gmx.de
derdanilo at gmx.de
Sat Dec 8 13:59:01 PST 2007
ah ok,
i'm quite new to as3 and i thought i probably missed something in terms of object removal and automatically removed tweens...
everything works fine now :)
thanks a lot zeh !
cheers
DANILO
-------- Original-Nachricht --------
> Datum: Sat, 08 Dec 2007 16:04:14 -0300
> Von: Zeh Fernando <zehfernando at zeh.com.br>
> An:
> CC: derdanilo at gmx.de, tweener at lists.caurinauebi.com
> Betreff: Re: [Tweener] Tweener AS3 : TypeError: Error #1009 - isTweening()
> ...however, you can still remove them by object or object/prpoperty with
> Tweener.removeTweens().
>
>
> Zeh
>
> Zeh Fernando wrote:
> > Oh yeah, you're referring to AS3, my mistake. I forgot there's a little
> > bit of a difference as the object is not really removed because it can
> > continue existing on memory even if there are no references to it
> > (Tweener's reference keeps it alive).
> >
> > So yeah, on that case it isn't automatically removed.
> >
> > Zeh
> >
> > derdanilo at gmx.de wrote:
> >> hi zeh,
> >>
> >> "I'm not sure this is what you're referring about, but if you remove a
> >> object, all of its tweenings are automatically deleted anyway."
> >>
> >> really? is it?
> >> how do you remove objects ?
> >>
> >> at least if i'm doing it like this:
> >>
> >> // simple example:
> >> import caurina.transitions.*;
> >>
> >> var mc:MovieClip = new MovieClip();
> >> function doSome(){
> >> addChild(mc);
> >> Tweener.addTween(mc, {alpha:.5, time:.5, transition:"easeOutExpo",
> >> delay:0, onUpdate:function() { trace ("My alpha is now " +
> >> this.alpha); }, onComplete:function(){ trace("i was still running"); }
> >> });
> >> removeChild(mc);
> >> mc = null;
> >> }
> >> doSome();
> >>
> >> ...the tween is still running and tracing stuff,
> >> after i "removed" it's target object.
> >>
> >> if the tween were automatically removed, it would be exactly what i
> >> was looking for, but it isn't. :(
> >>
> >> cheers
> >> DANILO
> >>
> >> btw: aside from my little issues, tweener rocks! keep up the good work
> :)
> >>
> >>
> >> -------- Original-Nachricht --------
> >>> Datum: Sat, 08 Dec 2007 00:29:17 -0300
> >>> Von: Zeh Fernando <zehfernando at zeh.com.br>
> >>> An: daniel becks <derdanilo at gmx.de>
> >>> CC: tweener at lists.caurinauebi.com
> >>> Betreff: Re: [Tweener] Tweener AS3 : TypeError: Error #1009 -
> >>> isTweening()
> >>
> >>> Hey Daniel,
> >>>
> >>> I believe there's nothing like this in there. You can have access to
> the
> >>> list (check Tweener.as, you can extend it) to create additional
> methods
> >>> you may want, but I'm not sure there's anything there to support what
> >>> you suggested.
> >>>
> >>> I'm not sure this is what you're referring about, but if you remove a
> >>> object, all of its tweenings are automatically deleted anyway.
> >>>
> >>> Anyhow, in the near future Tweener will return a reference to each
> >>> tweening you've added, so you'll be able to delete and change them by
> >>> the instance instead. This is kind of the next thing on the list and
> >>> part of it is written, but depends on me having some time to finish
> it.
> >>>
> >>>
> >>> Zeh
> >>>
> >>> daniel becks wrote:
> >>>> hello zeh,
> >>>> thanks for the hot fix! it seems to work like a charm now :)
> >>>>
> >>>>
> >>>> but i have yet another question...
> >>>> there is no way to get a list of all currently running tweens, but
> only
> >>> those, that were started from within a specific scope (class xy), is
> >>> it ?!
> >>>> some kind of a partial _tweenList would be useful to know which
> tweens
> >>> to kill, when -for example- removing a content mc from the
> displaylist.
> >>>> the workaround i'm currently working on is to write a little non
> static
> >>> "tweener proxy class" which "delegates" the addTween calls to tweener,
> >>>> while storing their targets in an array. then, at a certain point
> (e.g.
> >>> if my content mc instance is removed from the display list),
> >>>> im walking through that array, testing each "target" by
> >>> Tweener.isTweening() and if so, removing the tween from the target.
> >>>> but it would be much nicer, if tweener could provide me with a
> >>> "_tweenList recordset of, or for, content class xy"
> >>>> maybe another param to pass to the addTween() method ? ... something
> >>> like "_subTweenList_ID" ?
> >>>> i don't know, just fantasizing... :)
> >>>>
> >>>> thanks
> >>>> DANILO
> >>>>
> >>>>
> >>>>
> >>>> -------- Original-Nachricht --------
> >>>>> Datum: Fri, 07 Dec 2007 01:07:38 -0300
> >>>>> Von: Zeh Fernando <zehfernando at zeh.com.br>
> >>>>> An: derdanilo at gmx.de
> >>>>> CC: tweener at lists.caurinauebi.com
> >>>>> Betreff: Re: [Tweener] Tweener AS3 : TypeError: Error #1009 -
> >>> isTweening()
> >>>>> Hello Danilo,
> >>>>>
> >>>>> You're absolutely right. Thanks for the bug report. The problem is
> >>>>> that
> >>>>> isTweening() checks on recently deleted tweenings (they're not
> >>>>> actually
> >>>>> removed until the frame is executed) cause an attempt to access
> >>>>> properties of a null object and as such that error.
> >>>>>
> >>>>> I've fixed it and updated it to the SVN (1.31.68). Apparently it's
> >>>>> working fine. The version I'm working on breaks down the list into
> >>> other
> >>>>> classes and will probably have this solved from the get go, but
> >>> consider
> >>>>> this a hot fix.
> >>>>>
> >>>>> Or just change line 1005 of Tweener.as from this:
> >>>>>
> >>>>> if (_tweenList[i].scope == p_scope) {
> >>>>>
> >>>>> to this:
> >>>>>
> >>>>> if (Boolean(_tweenList[i]) && _tweenList[i].scope == p_scope) {
> >>>>>
> >>>>> Notice that the same potential bug applies to getTweens and
> >>>>> getTweenCount, and have been fixed.
> >>>>>
> >>>>> Zeh
> >>>>>
> >>>>>
> >>>>> derdanilo at gmx.de wrote:
> >>>>>> TypeError: Error #1009: at
> caurina.transitions::Tweener$/isTweening()
> >>>>>>
> >>>>>> after spending the whole day on finding the reason for this strange
> >>>>> error, which i received each time i was
> >>>>>> calling the Tweener.isTweening() method somehere in my application,
> i
> >>>>> found out the following:
> >>>>>> tweener throws this error when more than one tween at the same
> time,
> >>> on
> >>>>> the same target, for the same property is added
> >>>>>> and the Tweener.isTweening() method is called right after the
> tweens
> >>>>> started.
> >>>>>> // simple example:
> >>>>>> import caurina.transitions.*;
> >>>>>> Tweener.addTween(this, {alpha:.9, time:.5,
> transition:"easeOutExpo",
> >>>>> delay:0});
> >>>>>> Tweener.addTween(this, {alpha:.1, time:.5,
> transition:"easeOutExpo",
> >>>>> delay:0});
> >>>>>> trace( " - " + Tweener.isTweening( anyObject ));
> >>>>>>
> >>>>>> i use the isTweening thing to clean up possibly running tweens
> >>>>>> when my
> >>>>> "content mc" is deattached /removed from the displaylist.
> >>>>>> this conflicts with "doubletweens" caused by menu buttons.
> >>>>> rollover/rollout etc.
> >>>>>> this is a bug, isn't it ?!
> >>>>>> is there any fix for this issue ?
> >>>>>>
> >>>>>> cheers
> >>>>>> DANILO
> >>
> >
> >
--
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger
More information about the Tweener
mailing list