I've tried several examples but I can't seem to get the desktop icon (i.e. the icon in the top left of the form) to change on a windows host.
Does anyone know how to do this?
I'm using Flex 3.
If you are debugging it from FB, you'll never see the icon changing (for some reason).
You actually have to install it and run it "properly" to see the icons.
Other than that... are you setting the correct names in the foo_app.xml file and making sure that they are being copied into the .air file along with the swf?
Here's the mxml:
private var CustomIcon:Class;
Here's the code that gets run in the CreationComplete event:
NativeApplication.nativeApplication.icon.bitmaps = new Array(new CustomIcon().bitmapData);
The icon never shows up for the release build.
The code you've posted is for changing the dock / system tray icon, not for changing the window icon.
Look at your _app.xml file and add the image you want to that. You don't have to do it programatically. Just make sure that it's copied into your .air file when you deploy.
<!-- The icon the system uses for the application. For at least one resolution,
specify the path to a PNG file included in the AIR package. Optional. -->
or look my sample
Adobe Certified Expert Flex 3 with AIR
Adobe Certified Expert Rich Internet Application Specialist v1.0
Adobe Certified Expert Flash CS3 Professional
Certified Professional Adobe Flex 2 Developer
Adobe Certified Professional Flash MX 2004 Developer
Manager AUGDF - Adobe User Group do Distrito Federal
I get the error "Class cannot be nested" when I copy that xml to the mxml file.
Am I doing something wrong?
I'm using Flex 3.
I just found the .xml file.
I get a 303 error when I do a release build.
Here's what I did
1. Add the file Icon.png to the src folder
2. Update the xml as follows.
3. Do a release build