Highlighted

Retaining AIR functionality in Flash Player (3D)

Contributor ,
Mar 05, 2014

Copy link to clipboard

Copied

I have to target Flash Player 11 for 3D projects, which means I'm struggling to retain some important AIR functionality for Android:

NativeApplication.nativeApplication.systemIdleMode = SystemIdleMode.KEEP_AWAKE;

NativeApplication.nativeApplication.addEventListener(Event.DEACTIVATE, DeactivateDevice);

NativeApplication.nativeApplication.addEventListener(Event.ACTIVATE, ReactivateDevice);

I get the error:

1120: Access of undefined property NativeApplication.

Or this if I try to import the class manually:

1172: Definition flash.desktop:NativeApplication could not be found.

Is it possible to have the best of both worlds? And if not, how can I achieve the above things some other way?

Turns out all I can still use AIR for 3D if I set the render mode to "GPU" - even though I must compile it as "direct" in the app descriptor.

TOPICS
Development

Views

269

Likes

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

Retaining AIR functionality in Flash Player (3D)

Contributor ,
Mar 05, 2014

Copy link to clipboard

Copied

I have to target Flash Player 11 for 3D projects, which means I'm struggling to retain some important AIR functionality for Android:

NativeApplication.nativeApplication.systemIdleMode = SystemIdleMode.KEEP_AWAKE;

NativeApplication.nativeApplication.addEventListener(Event.DEACTIVATE, DeactivateDevice);

NativeApplication.nativeApplication.addEventListener(Event.ACTIVATE, ReactivateDevice);

I get the error:

1120: Access of undefined property NativeApplication.

Or this if I try to import the class manually:

1172: Definition flash.desktop:NativeApplication could not be found.

Is it possible to have the best of both worlds? And if not, how can I achieve the above things some other way?

Turns out all I can still use AIR for 3D if I set the render mode to "GPU" - even though I must compile it as "direct" in the app descriptor.

TOPICS
Development

Views

270

Likes

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
Mar 05, 2014 0
Advocate ,
Mar 05, 2014

Copy link to clipboard

Copied

You are trying to get access of Adobe Air classes via Flash Player. FP inside itself don't have this functionality.

This is impossible. The same as riding on a car with empty tank.

Likes

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
Reply
Loading...
Mar 05, 2014 0
Contributor ,
Mar 05, 2014

Copy link to clipboard

Copied

Turns out all I can still use AIR for 3D if I set the render mode to "GPU" - even though I must compile it as "direct" in the app descriptor.

Likes

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
Reply
Loading...
Mar 05, 2014 0