flex - Enable Icons ADL -
i can't seem work out how enable icons in air debug launcher. seems work on linux, when run on windows or mac adobe air icon shows. have specified location of icon in <icon></icon>
in application descriptor file.
those icons created file references in application descriptor file when application installs won't able see them during development.
there solution available on christian cantrell's adobe blog works around though instructions february 2008. may or may not work latest flex sdk or flex/flash builder ide.
fortunately, i’ve found easy way make work. here’s do:
make copy of application icon , name different. 1 version should referenced application descriptor file, , other compiled application. (you don’t technically have make copy of icon, when generating release build of application, flex builder doesn’t copy on embedded resources means application icon missing. trust me when tell it’s easier create copy , avoid whole issue.)
compile copy of application icon application using code this:
[embed(source="assets/application.png")] public var appiconclass:class;
in application’s initialization code, create
bitmap
instance of icon this:var appicon:bitmap = new appiconclass();
set icon this:
interactiveicon(nativeapplication.nativeapplication.icon).bitmaps = [appicon];
this code little oversimplified because doesn’t take platform differences account. more complete implementation might this:
check see kinds of icons client supports. can
nativeapplication.supportsdockicon
,nativeapplication.supportssystemtrayicon
apis.scale
bitmap
appropriate dimensions platform.set icon(s) using nativeapplication’s
icon
property.
Comments
Post a Comment