We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpOther Libraries › Tween library - 2 Tween instances crashing sketch
Page Index Toggle Pages: 1
Tween library - 2 Tween instances crashing sketch (Read 1698 times)
Tween library - 2 Tween instances crashing sketch
Jan 23rd, 2010, 6:17am
 
Hi.
I'm working on a simple user interface that is controlled by arrow keys.

I use the tween library for smooth transitions.

The library and the transitions work fine as long as i use just one instance of the Tween object. As soon as I add another instance, it causes the sketch to crash, producing an error.

working sketch with only one instance of Tween, problematic line commented out.
error message

How do I fix this
Re: Tween library - 2 Tween instances crashing sketch
Reply #1 - Jan 23rd, 2010, 4:40pm
 
that shouldve been fixed in the latest version... could you upload a zip of your sketch and post the link or email it to me at hello@ekeneijeoma.com. thanks!
Re: Tween library - 2 Tween instances crashing sketch
Reply #2 - Jan 24th, 2010, 2:19am
 
Hi.
You can download a zip of my sketch here.

Thanks for taking a look at it...
Re: Tween library - 2 Tween instances crashing sketch
Reply #3 - Jan 24th, 2010, 12:18pm
 
I like what youre doing with the library, thanks for posting this could be used as a good example! The problem is how your passing the PApplet object into the Tween object. Its best if you make a seperate class called main or something which you can instantiate as an object using new... and pass to the Tween object.
Re: Tween library - 2 Tween instances crashing sketch
Reply #4 - Jan 27th, 2010, 8:04am
 
Thanks for your hint. I haven't yet figured out how exactly your suggestion translates into code, so could you please post an example of this? thank you.
Re: Tween library - 2 Tween instances crashing sketch
Reply #5 - Feb 6th, 2010, 10:08am
 
I fully get this hint and could also find this useful. Will you posted on the outcome
Re: Tween library - 2 Tween instances crashing sketch
Reply #6 - Feb 7th, 2010, 11:38am
 
heres an example which takes an object named rect and tweens some of its parameters...

http://ekeneijeoma.com/processing/tween/examples/Tween_TweenObject/applet/

you can use any object of a custom class you've written to do the same. so you have to write a custom class, overlaymanager which "manages" a list of overlays. then you can pass the overlaymanager to the overlay class and use overlaymanager to as an object and not PApplet which is return by calling this classThis() in your sketch...
Page Index Toggle Pages: 1