• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Using flash.desktop.NativeApplication and publish for both Flash and iOS

Community Beginner ,
Jun 14, 2011 Jun 14, 2011

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

TOPICS
ActionScript

Views

3.4K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Jun 15, 2011 Jun 15, 2011

Copy link to clipboard

Copied

Itz only work with AIR

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 15, 2011 Jun 15, 2011

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Jun 15, 2011 Jun 15, 2011

Copy link to clipboard

Copied

I didn't aware of CONFIG::CONST?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 15, 2011 Jun 15, 2011

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Jun 15, 2011 Jun 15, 2011

Copy link to clipboard

Copied

LATEST

Thanks

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines