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

getQualifiedDefinitionNames Porblem

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

466

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

correct answers 1 Correct answer

Explorer , Mar 06, 2016 Mar 06, 2016

Votes

Translate

Translate
Explorer ,
Mar 06, 2016 Mar 06, 2016

Copy link to clipboard

Copied

LATEST

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