Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Having a background picture with a ball in front
Index -> Programming, Java -> Java Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Junaid2pac




PostPosted: Sat Jan 12, 2008 3:52 pm   Post subject: Having a background picture with a ball in front

I am making a game in which a ball travels across the screen, and there is a background picture. What happens is that the ball does not really seem to be in front of the picture, since it kinda looks transluscent as it goes through the picture. How would i make the ball appear at the front or opaque. The ball was drawn using g.fillOval().
Sponsor
Sponsor
Sponsor
sponsor
Euphoracle




PostPosted: Sat Jan 12, 2008 11:09 pm   Post subject: RE:Having a background picture with a ball in front

Is there an argument for Alpha, or Transparency? If so, set that to 255.
Junaid2pac




PostPosted: Tue Jan 15, 2008 6:24 pm   Post subject: Re: Having a background picture with a ball in front

do u know the code for setting it to the number u sugested
Euphoracle




PostPosted: Tue Jan 15, 2008 8:52 pm   Post subject: RE:Having a background picture with a ball in front

No. With regards to my statement, you must find a way to set "Alpha" or "Transparency" or synonyms thereof to "255" unless someone else knows it. Google & Javadocs are your friend.
ahmhum




PostPosted: Thu Mar 13, 2008 6:33 pm   Post subject: RE:Having a background picture with a ball in front

yo junaid2Pac how did u move the ball
can u tell me cuz i actually am trying to move an object (circles) and i don't really know how to
thnx
ahmhum




PostPosted: Thu Mar 13, 2008 11:49 pm   Post subject: RE:Having a background picture with a ball in front

any1
Euphoracle




PostPosted: Fri Mar 14, 2008 12:23 am   Post subject: RE:Having a background picture with a ball in front

Oh man, the education system is really lacking the foundations Sad
ahmhum




PostPosted: Fri Mar 14, 2008 12:33 pm   Post subject: RE:Having a background picture with a ball in front

the method would be nice NewBe Hacker
Sponsor
Sponsor
Sponsor
sponsor
ahmhum




PostPosted: Fri Mar 14, 2008 2:43 pm   Post subject: RE:Having a background picture with a ball in front

how do u move an object
HellblazerX




PostPosted: Fri Mar 14, 2008 4:06 pm   Post subject: RE:Having a background picture with a ball in front

U keep a set of variables to store the position of your object, and draw the object at that those coordinates. when u want to move it, just change the values of the coordinates, and redraw the object
Euphoracle




PostPosted: Fri Mar 14, 2008 7:42 pm   Post subject: Re: RE:Having a background picture with a ball in front

ahmhum @ Fri Mar 14, 2008 12:33 pm wrote:
the method would be nice NewBe Hacker


This simply proves my theory Crying or Very sad
Mackie




PostPosted: Fri Mar 14, 2008 7:49 pm   Post subject: RE:Having a background picture with a ball in front

Heh, I noticed that too, I thought I was just interpreting his message wrong.
Display posts from previous:   
   Index -> Programming, Java -> Java Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 12 Posts ]
Jump to:   


Style:  
Search: