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

2015/1/25

Hi l have a problem

60sChallange 60sChallange

2015/1/25

#
l am making game in Greenfoot with my own .png pictures. l made pictures in paint.net with transparent background. When l use Greenfoot class "isTouching" and "Greenfoot.stop()" , game stops when transparent backgrounds touches.. HOW CAN I DELETE THOSE TRANSPARENT BACKGROUNDS?
danpost danpost

2015/1/26

#
The best you can do as far as removing excess transparency is stripping off edge rows or columns of pixels that each pixel within it is transparent. Once a row or column of pixels contains a non-transparent pixel, you cannot remove it without removing part of the actual image. The image will end up a rectangular image with at least one pixel along each of its four edges being non-transparent. I would think that you could cut and paste the smallest rectangular area of the image possible using paint.net.
60sChallange wrote...
When l use Greenfoot class "isTouching" and "Greenfoot.stop()"
Correction: the 'isTouching' method is from the Actor class, not the Greenfoot class.
60sChallange 60sChallange

2015/1/26

#
So do l need to use another program or l can code that in greenfoot
danpost danpost

2015/1/26

#
The greenfoot framework comes with multiple classes -- Greenfoot, GreenfootImage, GreenfootSound, World, Actor, MouseInfo and UserInfo. The are all made available to any class created within greenfoot that has the following import statement:
import greenfoot.*;
I hope you can see why I made the correction above.
60sChallange 60sChallange

2015/1/27

#
thanks bro :D
You need to login to post a reply.