I had tried using the sample/tutorial given by Jer Thorp and had tried implementing it on Eclipse ADT. I had imported the android-core.jar from the processing 2.0 into the Eclipse Libs folder. However when I copied the sample codes into Eclipse ADT, it highlights the "background(mouseY * (255.0/800), 100, 0);" in the "draw method as below and state that "The method background(int, float) in the type PApplet is not applicable for the arguments (double, int, int)".
public void draw() {
//Set the background colour, which gets more red as we move our finger
//down the screen.
background(mouseY * (255.0/800), 100, 0);
//Chane our box rotation depending on how our finger has moved right-to-left
boxRotation += (float) (pmouseX - mouseX)/100;
And if I change the code from"255.0" to "255" such as "background(mouseY * (255/800), 100, 0);", the emulator can execute the application successfully using Eclipse ADT, however the colouring functionality when I hover around will be lost.
Could anyone please help me or teach me how to fix this ?
Hi,
I had tried using the sample/tutorial given by Jer Thorp and had tried implementing it on Eclipse ADT. I had imported the android-core.jar from the processing 2.0 into the Eclipse Libs folder. However when I copied the sample codes into Eclipse ADT, it highlights the "background(mouseY * (255.0/800), 100, 0);" in the "draw method as below and state that "The method background(int, float) in the type PApplet is not applicable for the arguments (double, int, int)".
public void draw() { //Set the background colour, which gets more red as we move our finger
//down the screen. background(mouseY * (255.0/800), 100, 0); //Chane our box rotation depending on how our finger has moved right-to-left boxRotation += (float) (pmouseX - mouseX)/100;
And if I change the code from"255.0" to "255" such as "background(mouseY * (255/800), 100, 0);", the emulator can execute the application successfully using Eclipse ADT, however the colouring functionality when I hover around will be lost. Could anyone please help me or teach me how to fix this ?
Thanking you in anticipation.