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

Bypass extension if already initialized? HELP!

New Here ,
Nov 04, 2014 Nov 04, 2014

I am working on an app using AIR for Android and I have come to a bit of an issue during final stages of debugging.

I have a total of 2 frames being used and on frame 1, I have an extension initialized. I have a button that takes the user to frame 2. On frame 2, there is a button to return to frame 1. Every time I return to frame 1 I get an error message saying that the extension has already been initialized.

I have attempted, using my limited knowledge, to form a simple if-then statement to bypass the initialization if already initialized but it isn't working. Here is the code I used:

var EXTENSIONActive:Boolean=false

if(EXTENSIONActive==false)

{

  EXTENSION.init("");

  EXTENSIONActive=true;

}

Any insight would be useful, preferably the full code along with explanation as to why my code didn't work. (I want to learn from this experience)

Thanks for the help!

TOPICS
ActionScript
204
Translate
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 Expert ,
Nov 05, 2014 Nov 05, 2014
LATEST

use:


var EXTENSIONActive:Boolean;

if(EXTENSIONActive==false)

{

  EXTENSION.init("");

  EXTENSIONActive=true;

}

Translate
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