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.
Page Index Toggle Pages: 1
Using megamu.shapetween in a Class? (Read 317 times)
Using megamu.shapetween in a Class?
Oct 24th, 2008, 7:24pm
 
Hi there,

I want to use the megamu.shapetween. libery in a own class but...!

/////////////////////////////

import megamu.shapetween.*;

MyClass myC;
Tween ani;

void setup(){
 ani = new Tween(this, 10, Tween.SECONDS, Shaper.COSINE);
}

void draw(){
 myC= new MyClass(10,10);
}

class MyClass extends megamu{
 MyClass(int xpos, int yPos){
   x=xpos;
   y=ypos;
   ellipse(x+ani.time(), y+ani.position());  
 }
}

thx from a newBite
Page Index Toggle Pages: 1