Copy link to clipboard
Copied
Hello All
Does anybody know the right way to use flash.desktop.NativeApplication and not run into
1172: Definition flash.desktop:NativeApplication could not be found.
or
1120: Access of undefined property NativeApplication.
It works fine when the publish settings are set to iOS, but when I switch to publish a "normal" swf I get the error.
Best
Skeeto
Copy link to clipboard
Copied
Itz only work with AIR
Copy link to clipboard
Copied
Hello
Thank you.
Yes, I found out/know.
However, when you make a crossplatform app for both Flash/iOS/etc. it's necessary to have some parts of the code taking care of platform specific things.
It's not practial to have to comment out/in parts of your code whenever you change publishng target.
So far I have found out to use conditional compiling and use a CONFIG::CONST in actionscript settings.
It's a bit annoying to have to switch this/these const to true/false whenever you change platform in publish settings, but it's a lot better than changing the code.
/Skeeto
Copy link to clipboard
Copied
I didn't aware of CONFIG::CONST?
Copy link to clipboard
Copied
Hello
You can see here how it is done
You then go to your actionscript settings in Flash and enter your constant settings by clicking the "+".
/Skeeto
Copy link to clipboard
Copied
Thanks