Results 1 to 4 of 4
- 04-13-2011, 12:37 PM #1
Member
- Join Date
- Jan 2011
- Posts
- 93
- Rep Power
- 0
Fade in/Fade out Class for any object
I want to start working on a class that can take in any object and fade it in and fade it out. An outline would be
Is this possible?Java Code:public class Fade{ public void FadeIn(Object O) { //code } public void FadeOut(Object O) { //code } }
Could someone give me an idea on how to fade objects in and out.
-
I think I know how to do this with Colors, something like this:
set the object to Opaque,
set the background colour,
set a timer to alter the opacity of the background colour over a fixed period of time
for example, over 5 seconds the opacity changes from 0% to 100%.
to set a color with opacity just do this:
Color red50 = new Color(255,0,0,127);
where '127' is the alpha value giving the colour 50% opacity.
- 04-13-2011, 02:56 PM #3
Moderator
- Join Date
- Jul 2010
- Location
- California
- Posts
- 1,609
- Rep Power
- 5
Fade in/out what element(s) of that object? Do you mean fade in the sense of drawing it in a user interface? Object contains no methods related to 'fading', so the question doesn't make much sense (at least to me).take in any object and fade it in and fade it out
-
Similar Threads
-
Insert class file as object in a table & read the object from the blob.
By facemeguru in forum New To JavaReplies: 1Last Post: 02-02-2011, 06:11 PM -
Create object of unknown class, based on existing object
By Zack in forum New To JavaReplies: 2Last Post: 06-22-2010, 04:29 AM -
add object to ArrayList (object is from extends other class)
By mBull in forum Java AppletsReplies: 3Last Post: 03-15-2010, 08:44 PM -
Alpha Fade Flicker
By jamesfrize in forum Java AppletsReplies: 3Last Post: 04-02-2008, 02:02 PM -
Creating object of Type Object class
By venkatv in forum New To JavaReplies: 3Last Post: 07-17-2007, 03:33 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks