Highlighted

getQualifiedDefinitionNames Porblem

Explorer ,
Mar 04, 2016

Copy link to clipboard

Copied

I have a problem with getQualifiedDefinitionNames, when I compile with AIR 20 I get

Main

gameBg_png$c19135a2672bad8837da970f47c7278f-30390368

and when I compile with Apach Flex 4.15.0 or Adobe Animate CC it returnes everything as expected!

Main

Main__gamebg


how to fix it with AIR, that it returned Main__gamebg class?

my sample code:

package{

  import flash.display.MovieClip;

  import flash.events.Event;

  public class Main extends MovieClip {

  [Embed(source="../assets/gameBg.png")]

  public const _gamebg:Class;

  public function Main() {

     super();

     if (stage) init();

     else addEventListener(Event.ADDED_TO_STAGE, init);

  }

  private function init(e:Event = null):void {

     removeEventListener(Event.ADDED_TO_STAGE, init);

    var definitions:*;

    if (this.loaderInfo.applicationDomain.hasOwnProperty("getQualifiedDefinitionNames")) {

         definitions = this.loaderInfo.applicationDomain["getQualifiedDefinitionNames"]();

         for (var i:int = 0; i < definitions.length; i++) {

             trace(definitions)

         }

       }

     }

  }

}

TOPICS
Performance issues

Views

355

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

getQualifiedDefinitionNames Porblem

Explorer ,
Mar 04, 2016

Copy link to clipboard

Copied

I have a problem with getQualifiedDefinitionNames, when I compile with AIR 20 I get

Main

gameBg_png$c19135a2672bad8837da970f47c7278f-30390368

and when I compile with Apach Flex 4.15.0 or Adobe Animate CC it returnes everything as expected!

Main

Main__gamebg


how to fix it with AIR, that it returned Main__gamebg class?

my sample code:

package{

  import flash.display.MovieClip;

  import flash.events.Event;

  public class Main extends MovieClip {

  [Embed(source="../assets/gameBg.png")]

  public const _gamebg:Class;

  public function Main() {

     super();

     if (stage) init();

     else addEventListener(Event.ADDED_TO_STAGE, init);

  }

  private function init(e:Event = null):void {

     removeEventListener(Event.ADDED_TO_STAGE, init);

    var definitions:*;

    if (this.loaderInfo.applicationDomain.hasOwnProperty("getQualifiedDefinitionNames")) {

         definitions = this.loaderInfo.applicationDomain["getQualifiedDefinitionNames"]();

         for (var i:int = 0; i < definitions.length; i++) {

             trace(definitions)

         }

       }

     }

  }

}

TOPICS
Performance issues

Views

356

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 04, 2016 0
Explorer ,
Mar 06, 2016

Copy link to clipboard

Copied

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 06, 2016 0