Re: [Flashcoders] Buggy Tween
No problem. :) My example was just an external AS file, not a class. Later, John on 5/13/10 11:17 AM, Lehr, Theodore at ted_l...@federal.dell.com wrote: > Indeed - that seems to be it thanks > > Thanks John also! John R. Sweeney Jr. Interactive Multimedia Developer OnDemand Interactive Inc 945 Washington Blvd. Hoffman Estates, IL 60169 Office/Fax: 847.310.5959 Cellular: 847.651.4469 www.ondemandinteractive.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Buggy Tween
Indeed - that seems to be it thanks Thanks John also! From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Mattheis, Erik (MIN - WSW) [ematth...@webershandwick.com] Sent: Thursday, May 13, 2010 11:04 AM To: Flash Coders List Subject: RE: [Flashcoders] Buggy Tween Could it be you have var tween_handler:Tween inside of a function? If it's a class variable it won't get garbage collected, if it within a function it's eligible for garbage collection when the function is complete. YES: class myClass { var tween_handler:Tween; function myFunction() { tween_handler = new Tween(mc,"alpha",Strong.easeInOut,1,0,.5,true); } } NO: class myClass { function myFunction() { var tween_handler:Tween; tween_handler = new Tween(mc,"alpha",Strong.easeInOut,1,0,.5,true); } } _ _ _ Erik Mattheis Senior Web Developer Minneapolis T 952 346 6610 C 612 377 2272 Weber Shandwick Advocacy starts here. PRWeek Global Agency Report Card 2009 - Gold Medal Winner The Holmes Report Global Agency of the Year PR News Agency of the Year -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Lehr, Theodore Sent: Thursday, May 13, 2010 6:11 AM To: Flash Coders List Subject: RE: [Flashcoders] Buggy Tween Thanks - for to need such hand holding I tried what you said but get the same results... What should be in the //do your stuff here? as far as I have it now - the tween is still handled in the original tween (tween_handler in your example) From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of John R. Sweeney Jr [jr.swee...@comcast.net] Sent: Wednesday, May 12, 2010 6:38 PM To: Flash Coders List Subject: Re: [Flashcoders] Buggy Tween Howdy, > You tween objects got garbage collected. I was bit very hard by that one in a kiosk touch screen that needed to have certain things happen after the tween was finished. So when garbage collection stopped the tween, things went very messed up and/or locked up. :) Here is how I fixed that: var tween_handler:Tween; tween_handler = new Tween(mc,"alpha",Strong.easeInOut,1,0,.5,true); tween_handler .addEventListener (TweenEvent.MOTION_FINISH, doYourFunction; function doYourFunction (evt:TweenEvent):void { tween_handler .removeEventListener (TweenEvent.MOTION_FINISH, doYourFunction); // do your stuff here } Then you should be fine, John on 5/12/10 2:44 PM, Lehr, Theodore at ted_l...@federal.dell.com wrote: > thanks - I'll look into how to do that John R. Sweeney Jr. Interactive Multimedia Developer OnDemand Interactive Inc 945 Washington Blvd. Hoffman Estates, IL 60169 Office/Fax: 847.310.5959 Cellular: 847.651.4469 www.ondemandinteractive.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Buggy Tween
Could it be you have var tween_handler:Tween inside of a function? If it's a class variable it won't get garbage collected, if it within a function it's eligible for garbage collection when the function is complete. YES: class myClass { var tween_handler:Tween; function myFunction() { tween_handler = new Tween(mc,"alpha",Strong.easeInOut,1,0,.5,true); } } NO: class myClass { function myFunction() { var tween_handler:Tween; tween_handler = new Tween(mc,"alpha",Strong.easeInOut,1,0,.5,true); } } _ _ _ Erik Mattheis Senior Web Developer Minneapolis T 952 346 6610 C 612 377 2272 Weber Shandwick Advocacy starts here. PRWeek Global Agency Report Card 2009 - Gold Medal Winner The Holmes Report Global Agency of the Year PR News Agency of the Year -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Lehr, Theodore Sent: Thursday, May 13, 2010 6:11 AM To: Flash Coders List Subject: RE: [Flashcoders] Buggy Tween Thanks - for to need such hand holding I tried what you said but get the same results... What should be in the //do your stuff here? as far as I have it now - the tween is still handled in the original tween (tween_handler in your example) From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of John R. Sweeney Jr [jr.swee...@comcast.net] Sent: Wednesday, May 12, 2010 6:38 PM To: Flash Coders List Subject: Re: [Flashcoders] Buggy Tween Howdy, > You tween objects got garbage collected. I was bit very hard by that one in a kiosk touch screen that needed to have certain things happen after the tween was finished. So when garbage collection stopped the tween, things went very messed up and/or locked up. :) Here is how I fixed that: var tween_handler:Tween; tween_handler = new Tween(mc,"alpha",Strong.easeInOut,1,0,.5,true); tween_handler .addEventListener (TweenEvent.MOTION_FINISH, doYourFunction; function doYourFunction (evt:TweenEvent):void { tween_handler .removeEventListener (TweenEvent.MOTION_FINISH, doYourFunction); // do your stuff here } Then you should be fine, John on 5/12/10 2:44 PM, Lehr, Theodore at ted_l...@federal.dell.com wrote: > thanks - I'll look into how to do that John R. Sweeney Jr. Interactive Multimedia Developer OnDemand Interactive Inc 945 Washington Blvd. Hoffman Estates, IL 60169 Office/Fax: 847.310.5959 Cellular: 847.651.4469 www.ondemandinteractive.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Buggy Tween
First thing are you tweening the swf you just loaded? If so, make sure its loaded before you start the tween. Second the // do your stuff - is what ever you want to happen next. In my example I was moving a one menu off the stage (left) and another one into view (from the right). I didn't want the new menu buttons active until the tween was done. So I move both menus and when the MOTION_FINISHED fired, I then made the buttons active (that was my do your stuff). What ever you want to happen after the tween is complete is what you would put in that place. Best of luck, John on 5/13/10 6:10 AM, Lehr, Theodore at ted_l...@federal.dell.com wrote: > Thanks - for to need such hand holding I tried what you said but get the > same results... What should be in the //do your stuff here? > > as far as I have it now - the tween is still handled in the original tween > (tween_handler in your example)... John R. Sweeney Jr. Interactive Multimedia Developer OnDemand Interactive Inc 945 Washington Blvd. Hoffman Estates, IL 60169 Office/Fax: 847.310.5959 Cellular: 847.651.4469 www.ondemandinteractive.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Buggy Tween
Thanks - for to need such hand holding I tried what you said but get the same results... What should be in the //do your stuff here? as far as I have it now - the tween is still handled in the original tween (tween_handler in your example) From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of John R. Sweeney Jr [jr.swee...@comcast.net] Sent: Wednesday, May 12, 2010 6:38 PM To: Flash Coders List Subject: Re: [Flashcoders] Buggy Tween Howdy, > You tween objects got garbage collected. I was bit very hard by that one in a kiosk touch screen that needed to have certain things happen after the tween was finished. So when garbage collection stopped the tween, things went very messed up and/or locked up. :) Here is how I fixed that: var tween_handler:Tween; tween_handler = new Tween(mc,"alpha",Strong.easeInOut,1,0,.5,true); tween_handler .addEventListener (TweenEvent.MOTION_FINISH, doYourFunction; function doYourFunction (evt:TweenEvent):void { tween_handler .removeEventListener (TweenEvent.MOTION_FINISH, doYourFunction); // do your stuff here } Then you should be fine, John on 5/12/10 2:44 PM, Lehr, Theodore at ted_l...@federal.dell.com wrote: > thanks - I'll look into how to do that John R. Sweeney Jr. Interactive Multimedia Developer OnDemand Interactive Inc 945 Washington Blvd. Hoffman Estates, IL 60169 Office/Fax: 847.310.5959 Cellular: 847.651.4469 www.ondemandinteractive.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Buggy Tween
Howdy, > You tween objects got garbage collected. I was bit very hard by that one in a kiosk touch screen that needed to have certain things happen after the tween was finished. So when garbage collection stopped the tween, things went very messed up and/or locked up. :) Here is how I fixed that: var tween_handler:Tween; tween_handler = new Tween(mc,"alpha",Strong.easeInOut,1,0,.5,true); tween_handler .addEventListener (TweenEvent.MOTION_FINISH, doYourFunction; function doYourFunction (evt:TweenEvent):void { tween_handler .removeEventListener (TweenEvent.MOTION_FINISH, doYourFunction); // do your stuff here } Then you should be fine, John on 5/12/10 2:44 PM, Lehr, Theodore at ted_l...@federal.dell.com wrote: > thanks - I'll look into how to do that John R. Sweeney Jr. Interactive Multimedia Developer OnDemand Interactive Inc 945 Washington Blvd. Hoffman Estates, IL 60169 Office/Fax: 847.310.5959 Cellular: 847.651.4469 www.ondemandinteractive.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Buggy Tween
thanks - I'll look into how to do that From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Henrik Andersson [he...@henke37.cjb.net] Sent: Wednesday, May 12, 2010 3:38 PM To: Flash Coders List Subject: Re: [Flashcoders] Buggy Tween Lehr, Theodore wrote: > Sorry - I am unfamiliar with that - can I fix it? You tween objects got garbage collected. Prevent this from happening by storing a reference to them in a non garbage collectible object while they run. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Buggy Tween
Lehr, Theodore wrote: Sorry - I am unfamiliar with that - can I fix it? You tween objects got garbage collected. Prevent this from happening by storing a reference to them in a non garbage collectible object while they run. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Buggy Tween
Sorry - I am unfamiliar with that - can I fix it? From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Henrik Andersson [he...@henke37.cjb.net] Sent: Wednesday, May 12, 2010 3:26 PM To: Flash Coders List Subject: Re: [Flashcoders] Buggy Tween Lehr, Theodore wrote: > The weird thing is that sometimes the tween just stops (sometimes it doe > complete) You have a classical garbage collection issue. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Buggy Tween
Lehr, Theodore wrote: The weird thing is that sometimes the tween just stops (sometimes it doe complete) You have a classical garbage collection issue. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders