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

Flash Builder 4.7 Embed Error

Engaged ,
Feb 08, 2013 Feb 08, 2013

I originally posted something similiar in the "Using Flash Builder" section but decided to post something here thinking it would get more coder eyes.

This worked in Flash Builder 4.5 using the Flex 4.6 SDK with the AIR 3.5 SDK.

However in Flash Builder 4.7 using the Flex 4.6 SDK with the AIR 3.5 SDK the following:

package

{

          import flash.display.Sprite;

 

          public class TestProject extends Sprite

          {

                    [Embed(source = "Image.png", mimeType = "image/png", compression="true", quality="80")]

                    private static var _imageClass:Class;

 

                    public function TestProject()

                    {

 

                    }

          }

}

Is generating these errors:

Error 1:

Internal error in outgoing dependency subsystem, when generating code for: C:\Users\users\Adobe Flash Builder 4.7\TestProject\src\Image.png: java.lang.ArrayIndexOutOfBoundsException: 0

          at com.adobe.flash.compiler.internal.units.EmbedCompilationUnit.analyze( EmbedCompilationUnit.java:224)

          at com.adobe.flash.compiler.internal.units.EmbedCompilationUnit.handleOu tgoingDependenciesRequest(EmbedCompilationUnit.java:193)

          at com.adobe.flash.compiler.internal.units.CompilationUnitBase.processOu tgoingDependenciesRequest(CompilationUnitBase.java:886)

          at com.adobe.flash.compiler.internal.units.CompilationUnitBase.access$50 0(CompilationUnitBase.java:107)

          at com.adobe.flash.compiler.internal.units.CompilationUnitBase$6$1.call( CompilationUnitBase.java:378)

          at com.adobe.flash.compiler.internal.units.CompilationUnitBase$6$1.call( CompilationUnitBase.java:374)

          at com.adobe.flash.compiler.internal.units.requests.RequestMaker$1.call( RequestMaker.java:228)

          at com.adobe.flash.compiler.internal.units.requests.RequestMaker$1.call( RequestMaker.java:222)

          at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)

          at java.util.concurrent.FutureTask.run(Unknown Source)

          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

          at java.lang.Thread.run(Unknown Source)          Image.png          /TestProject/src          line 0          Flex Problem

Error 2:

The definition of base class Bitmap was not found.

With a warning:

Definition flash.utils.Bitmap could not be found.

If you drop the quality param:

package

{

     import flash.display.Sprite;

     public class TestProject extends Sprite

     {

         [Embed(source = "Image.png", mimeType = "image/png", compression="true")]

         private static var _imageClass:Class;

         public function TestProject()

         {

         }

     }

}

The errors change to:

Internal error in ABC generator subsystem, when generating code for: C:\Users\user\Adobe Flash Builder 4.7\TestProject\src\TestProject.as: java.lang.NullPointerException

          at com.adobe.flash.compiler.internal.embedding.transcoders.JPEGTranscode r.equals(JPEGTranscoder.java:220)

          at com.adobe.flash.compiler.internal.embedding.EmbedData.equals(EmbedDat a.java:522)

          at java.util.WeakHashMap.eq(Unknown Source)

          at java.util.WeakHashMap.get(Unknown Source)

          at com.adobe.flash.compiler.internal.workspaces.Workspace.getCanonicalEm bedData(Workspace.java:933)

          at com.adobe.flash.compiler.internal.units.EmbedCompilationUnitFactory.g etEmbedData(EmbedCompilationUnitFactory.java:120)

          at com.adobe.flash.compiler.internal.units.EmbedCompilationUnitFactory.g etCompilationUnit(EmbedCompilationUnitFactory.java:62)

          at com.adobe.flash.compiler.internal.tree.as.EmbedNode.resolveCompilatio nUnit(EmbedNode.java:116)

          at com.adobe.flash.compiler.internal.tree.as.EmbedNode.resolveCompilatio nUnit(EmbedNode.java:126)

          at com.adobe.flash.compiler.internal.tree.as.EmbedNode.resolveCompilatio nUnit(EmbedNode.java:43)

          at com.adobe.flash.compiler.internal.units.EmbedCompilationUnitFactory.c ollectEmbedDatas(EmbedCompilationUnitFactory.java:136)

          at com.adobe.flash.compiler.internal.as.codegen.ABCGenerator.generate(AB CGenerator.java:184)

          at com.adobe.flash.compiler.internal.units.ASCompilationUnit.handleABCBy tesRequest(ASCompilationUnit.java:374)

          at com.adobe.flash.compiler.internal.units.CompilationUnitBase.processAB CBytesRequest(CompilationUnitBase.java:870)

          at com.adobe.flash.compiler.internal.units.CompilationUnitBase.access$30 0(CompilationUnitBase.java:107)

          at com.adobe.flash.compiler.internal.units.CompilationUnitBase$4$1.call( CompilationUnitBase.java:309)

          at com.adobe.flash.compiler.internal.units.CompilationUnitBase$4$1.call( CompilationUnitBase.java:305)

          at com.adobe.flash.compiler.internal.units.requests.RequestMaker$1.call( RequestMaker.java:228)

          at com.adobe.flash.compiler.internal.units.requests.RequestMaker$1.call( RequestMaker.java:222)

          at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)

          at java.util.concurrent.FutureTask.run(Unknown Source)

          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

          at java.lang.Thread.run(Unknown Source)          TestProject.as          /TestProject/src          line 0          Flex Problem

Internal error in outgoing dependency subsystem, when generating code for: C:\Users\user\Adobe Flash Builder 4.7\TestProject\src\TestProject.as: java.lang.NullPointerException

          at com.adobe.flash.compiler.internal.embedding.transcoders.JPEGTranscode r.equals(JPEGTranscoder.java:220)

          at com.adobe.flash.compiler.internal.embedding.EmbedData.equals(EmbedDat a.java:522)

          at java.util.WeakHashMap.eq(Unknown Source)

          at java.util.WeakHashMap.get(Unknown Source)

          at com.adobe.flash.compiler.internal.workspaces.Workspace.getCanonicalEm bedData(Workspace.java:933)

          at com.adobe.flash.compiler.internal.units.EmbedCompilationUnitFactory.g etEmbedData(EmbedCompilationUnitFactory.java:120)

          at com.adobe.flash.compiler.internal.units.EmbedCompilationUnitFactory.g etCompilationUnit(EmbedCompilationUnitFactory.java:62)

          at com.adobe.flash.compiler.internal.tree.as.EmbedNode.resolveCompilatio nUnit(EmbedNode.java:116)

          at com.adobe.flash.compiler.internal.tree.as.EmbedNode.resolveCompilatio nUnit(EmbedNode.java:126)

          at com.adobe.flash.compiler.internal.tree.as.EmbedNode.resolveCompilatio nUnit(EmbedNode.java:43)

          at com.adobe.flash.compiler.internal.units.CompilationUnitBase.updateEmb edCompilationUnitDependencies(CompilationUnitBase.java:946)

          at com.adobe.flash.compiler.internal.units.ASCompilationUnit.handleOutgo ingDependenciesRequest(ASCompilationUnit.java:458)

          at com.adobe.flash.compiler.internal.units.CompilationUnitBase.processOu tgoingDependenciesRequest(CompilationUnitBase.java:886)

          at com.adobe.flash.compiler.internal.units.CompilationUnitBase.access$50 0(CompilationUnitBase.java:107)

          at com.adobe.flash.compiler.internal.units.CompilationUnitBase$6$1.call( CompilationUnitBase.java:378)

          at com.adobe.flash.compiler.internal.units.CompilationUnitBase$6$1.call( CompilationUnitBase.java:374)

          at com.adobe.flash.compiler.internal.units.requests.RequestMaker$1.call( RequestMaker.java:228)

          at com.adobe.flash.compiler.internal.units.requests.RequestMaker$1.call( RequestMaker.java:222)

          at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)

          at java.util.concurrent.FutureTask.run(Unknown Source)

          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

          at java.lang.Thread.run(Unknown Source)          TestProject.as          /TestProject/src          line 0          Flex Problem

If you try to set compression to false:

package

{

     import flash.display.Sprite;

     public class TestProject extends Sprite

     {

         [Embed(source = "Image.png", mimeType = "image/png", compression="false")]

         private static var _imageClass:Class;

         public function TestProject()

         {

         }

     }

}

You get the following:

The attribute compression can't be used with the mime type: image/png

Change it to jpeg:

package

{

     import flash.display.Sprite;

     public class TestProject extends Sprite

     {

         [Embed(source = "Image.png", mimeType = "image/jpeg", compression="false")]

         private static var _imageClass:Class;

         public function TestProject()

         {

         }

     }

}

You get the following:

The attribute compression can't be used with the mime type: image/jpeg

Is anyone else getting these same results with Flash Builder 4.7 with Flex SDK 4.6 and AIR SDK 3.5? I expect that we still should be able to compress embedded assets within Flash Builder?

TOPICS
ActionScript
1.9K
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
Engaged ,
Feb 14, 2013 Feb 14, 2013

Upgraded Flex 4.6 SDK to use the new AIR 3.6 SDK and the Flash Builder 4.7 to use the new AIR 3.6 SDK with the new compiler and I am still getting this. I had some other people try these steps and they got the exact same error so it doesn't seem to be just me. Is noone here getting this or am I the only one trying to embed a png directly into a Flash Builder project? =/

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
New Here ,
May 22, 2015 May 22, 2015
LATEST

Remove the compression option. The error goes away. I assume that compression for PNG is automatic.

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