unable to resolve 'assets/cross_cursor.png' for transcoding.
Here is what the code looked liked.
[Embed(source="assets/cross_cursor.png")]
So I said to my self, "Oh come on! I thought you can handle pngs. Poop !" - Googled the error and found this link. And the solution was to add a "/" in front of "assets":
[Embed(source="/assets/cross_cursor.png")]
Now I'm happier :-)
11 comments:
Do you have any idea how to fix this problem for fonts?
I am trying to embed a font as such:
fontFamily: "Century Gothic";
fontWeight: lighter;
fontStyle: normal;
src: url("/assets/gothic.ttf");
I have placed the gothic.ttf TrueType font file in assets and I always get the error. Any ideas?
Thank you.
Hi Ned,
If you haven't found this solution already, you just need to add
-managers flash.fonts.AFEFontManager
To the "Additional Compiler Arguments" in the properties of the project.
Thanks..!
Was wondering what caused the error!
Thanks for your post. It resolved my issue, but for some reason it was only necessary on some files. Others worked fine without the preceding slash.
Cheers.
i tried to resolve this problem by adding '/' at the fornt but didnot work. The solution i found is to add two dots and slash. e.g
[Embed("../assets/soundSample.mp3")]
Thanks for sharing
I had this problem with @Embed('../img/check.png'), and I changed it to @Embed('/../img/check.png') and it works. Thanks for posting!
Note for the search engines, I came across this when trying to generate ASDoc.
This problem is driving me crazy...I've tried all of the above to add a static legend png to a CreatePDF widget in the SFV and nothing works...I still get this error message
[Embed(source="/assets/images/basemap.png")]
[Bindable]
var pngBytes:Class;
myPDF.addImageStream( new pngBytes() as ByteArray, 0, 0, 0, 0, 1, "false");
Thanks,
That's the answer that I'm finding all over the internet, but I can't seem to get it to work. I must be doing something else wrong. I just started using FlashDevelop for the first time today, and I'm using the FlashPunk engine with it. Here's my code:
package
{
import net.flashpunk.Entity;
import net.flashpunk.graphics.Image;
public class MyEntity extends Entity
{
[Embed(source="/assets/fireball.png")]
private var PLAYER:Class;
public function MyEntity()
{
graphic = new Image(PLAYER);
}
override public function update():void
{
trace("MyEntity updates.");
}
}
}
Any ideas?
hum - not sure - maybe SDK version ? I'm using Flex 4.1
I found a workaround for this problem:
It could be a JDK problem.
http://mytechieblog.blogspot.com/2011/06/error-unable-to-transcode-assetsxyzpng.html
Cheers
Aneesh
Post a Comment