views:

483

answers:

1

In my project i used image array with 16+16 32+32 48+48 128+128 different size of image for system tray icon but i put on bitmes then shows

Error #2005: Parameter 0 is of the incorrect type. Should be type BitmapDat.

public var imageURLs:Array = ['icon/toy.png','toy32.png','TOY48.png','joy128.png']; NativeApplication.nativeApplication.icon.bitmaps = new Array(imageURLs);

What did i wrong code . how do store image to bitmaps array ?

A: 

You should instead use the BitmapData class. Read more about Bitmap and BitmapData classes here.

Here's a tutorial on Flex taskbar icons.

dirkgently
NativeApplication.nativeApplication.icon.bitmaps = new Array(bitmapData());public function bitmapData():BitmapData{ var myBitmapData:BitmapData = new BitmapData(40, 40, false, 0x0000FF00);var clockImage:BitmapData = new BitmapData(this.width, this.height,true,0x0011111);clockImage.draw(this);return clockImage;} i tried this code but it shows black image icon . i want my array stored icon . what i do ?
R.Vijayakumar
dirkgently thanks to response me
R.Vijayakumar
You need to first load the image and then copy it to a BitmapData. Please go through the second link.
dirkgently
thanks dirkgently . i tried now .
R.Vijayakumar
images.push(event.target.content.bitmapData) what is mean ? do u know about that dirkgently
R.Vijayakumar
Added a link to a tutorial in my answer. The statement you have means 'images' is an array of BitmapData, and the 'push' method adds a bitmapData object to this array.
dirkgently