Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Fading Objects In And Out


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 Bench3   Members   -  Reputation: 126

Like
0Likes
Like

Posted 15 August 2012 - 03:35 PM

Hi, i've been attempting to make a game and was wondering how to make objects (such as rectangles) in and out from a JPanel. Can anybody help me out?

Thanks in advance,
~Ben

Edited by Bench3, 15 August 2012 - 03:36 PM.


Sponsor:

#2 David.M   Members   -  Reputation: 731

Like
1Likes
Like

Posted 15 August 2012 - 05:59 PM

Change the color you use. Start out with a color that is mostly (or all) transparent (low alpha) then raise the alpha over time to 255 (fully opaque).

Edit: Thanks BeerNutts. Had it backwards.

Edited by David.M, 16 August 2012 - 03:36 PM.


#3 Bench3   Members   -  Reputation: 126

Like
0Likes
Like

Posted 16 August 2012 - 02:27 AM

Thanks :)

#4 BeerNutts   Crossbones+   -  Reputation: 2998

Like
0Likes
Like

Posted 16 August 2012 - 06:50 AM

Change the color you use. Start out with a color that is mostly (or all) transparent (high alpha) then lower the alpha over time to 0 (fully opaque).


You said that backwards. High alpha is opaque (255 is fully opaque), and low alpha is transparent (0 is invisible).
My Gamedev Journal: 2D Game Making, the Easy Way

---(Old Blog, still has good info): 2dGameMaking
-----
"No one ever posts on that message board; it's too crowded." - Yoga Berra (sorta)




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS