import flash.display.Sprite;
public class SpinningBall extends Sprite
{
double cx, cy, speed;
public SpinningBall(double cx, double cy, double speed)
{
this.cx = cx;
this.cy = cy;
this.speed = speed;
}
public void getFillColor()
{
}
}
Cannot extend Sprite
Page 1 of 18 Replies - 1638 Views - Last Post: 16 January 2012 - 06:48 AM
#1
Cannot extend Sprite
Posted 15 January 2012 - 08:31 AM
man, I'm getting very frustrated. I have a lab due to create a class that extends Sprite. I started writing code and already run into problems. Why I cannot extend sprite? what is wrong?
Replies To: Cannot extend Sprite
#2
Re: Cannot extend Sprite
Posted 15 January 2012 - 08:35 AM
What do you mean cannot extend Sprite? do you get any error messages?
I'd suggest that you check the Sprite constructor and see if you have to provide parameters.
call super in the first line of code of the derived class (SpinningBall) constructor, and pass it the appropriate parameters.
I'd suggest that you check the Sprite constructor and see if you have to provide parameters.
call super in the first line of code of the derived class (SpinningBall) constructor, and pass it the appropriate parameters.
#3
Re: Cannot extend Sprite
Posted 15 January 2012 - 08:38 AM
Do you have the right Sprite class? What you've imported is from the ActionScript 3.0 API. Or did you mean javax.microedition.lcdui.game.Sprite?
#5
Re: Cannot extend Sprite
Posted 15 January 2012 - 09:30 AM
#6
Re: Cannot extend Sprite
Posted 15 January 2012 - 09:44 AM
#7
Re: Cannot extend Sprite
Posted 15 January 2012 - 10:24 AM
The jar files containing those classes, or the class files themselves, must be in the classpath in order to import and compile successfully
#8
Re: Cannot extend Sprite
Posted 15 January 2012 - 03:01 PM
Moved to Mobile Development.
Do you have the Java ME platform setup? These are Java ME, not Java SE tools.
http://java.sun.com/...ge-summary.html
Do you have the Java ME platform setup? These are Java ME, not Java SE tools.
http://java.sun.com/...ge-summary.html
#9
Re: Cannot extend Sprite
Posted 16 January 2012 - 06:48 AM
Ok. So, Downloaded the Java ME and installed and still didn't work, but found this easy step by step instructions to make it work. I'm using Eclipse.
http://blogs.oracle....tegrate_java_me
Thanks for all the help.
http://blogs.oracle....tegrate_java_me
Thanks for all the help.
Page 1 of 1
|
|

New Topic/Question
Reply


MultiQuote







|