This site requires JavaScript, please enable it in your browser!
Greenfoot back
juanchi_kiuxus
juanchi_kiuxus wrote ...

2011/8/4

Actor appearing slowly

juanchi_kiuxus juanchi_kiuxus

2011/8/4

#
Hello, There are any way for an actor appear slowy since the center of the world? Thanks
mjrb4 mjrb4

2011/8/4

#
Do you mean appear slowly as in fade in?
juanchi_kiuxus juanchi_kiuxus

2011/8/4

#
Yes, exactly! (sorry for my bad english...)
mjrb4 mjrb4

2011/8/4

#
You can get the actors image with the getImage() method, and then set it's transparency to 0 straight away using the following method: http://www.greenfoot.org/doc/javadoc/greenfoot/GreenfootImage.html#setTransparency(int) You can then keep calling the above method in say your act method while the transparency is <100, incrementing the value by 1 each time.
juanchi_kiuxus juanchi_kiuxus

2011/8/4

#
Perfect reply, thanks a lot.
mjrb4 mjrb4

2011/8/4

#
No problem!
You need to login to post a reply.