|
|||
|
save
Description Saves an image. Syntax image.save(name[, compresslevel]) Parameters name String. Specifies the full path name of the image to save. compresslevel Integer. Optional. For saving png files, it can be from 0 to 9. 0 means no compression, 9 means maximum compression. The default value is 5. For saving jpg files, the default value is 100. I test save file .png but it not work,why ??? script from test... var image = Image.load("c:\\test.png''); image.save("d:\\test2.png''); Please, help me... :-\ |
|
|||
|
A... sory.
I want transperent of png. but I test save mo.png to mo2.png but... from Scipt... var image = Image.load("c:\\mo.png"); image.save("c:\\mo2.png"); Shell.open("c:\\mo2.png"); from test... mo.png is transperrent ![]() ![]() mo2.png is no transperrent :'( ![]() and I can't load .png to flash. ??? help me again, please.. :-[ |
|
|||
|
SWFKit Pro doesn't support to write a transparent png file. We will provide the feature in ver2.2.
But it can load a transparent png file into Flash like this Code:
var png = Image.load("c:\\trans.png", background_color);
png.loadImage(1);
|
|
|||
|
SWF movie can only load JPG files. SWFKit converts the png files to jpgs then load them. So if you want to load a transparent png file, you must change its background color to the background color of the swf movie.
Code:
//Say the SWF background color is 0xFF00
var transparent = 0xFF00;
var png = Image.load("c:\\mo.png", transparent);
png.loadImage(1);
|
![]() |
Was this information helpful? Yes No
| Thread Tools | |
| Display Modes | |
|
|