Can somebody explain me either it really exist or this is some myth?
Which mime-type should i use to embed .jxr images? In the list of supported mime-types i find nothing new. I tried to load jxr image, but application does not recognize this format.
All i receive - a lot of different errors.
[Fault] exception, information=TypeError: Error #1034: Type Coercion failed: cannot convert Main_JxrImg@3d6e241 to flash.display.Bitmap.
As you can read on the new features (in http://www.adobe.com/devnet/flashplayer/articles/whats-new-flash-playe r11.edu.html) I do not know, if mime-type has anything to do with the problem. If it is converted to JXR you should be on your way. I found the following, that could help you:
http://www.ketzler.de/2011/11/convert-png-to-jpeg-xr-for-use-in-flash- flex-and-as3/ (talks about using XN View to convert the file)
http://examples.oreilly.com/0636920021698/JPEGXR.as (an example class, that loads a jxr file)
Does that bring you anything?
According to http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf 60546-7ffb.html#WS2db454920e96a9e51e63e3d11c0bf69084-7f96 it looks like, there is no mime-type to reckognize jxr-files via embed - it only supports
sorry. If I hear more, I will update.
You can do it that way:
public var JPEG:Class;
image.source = new JPEG();
where "image" is standard spark Image: <s:Image id="image" />
or using standard Loader:
var _loader:Loader = new Loader();
_loader.loadBytes( new JPEG() );
Unfortunatelly this didn't work for me:
<s:Image source="@Embed(source='assets/jpeg-xr.jxr', mimeType='application/octet-stream')" />
I used Flex 4.6.0 SDK and Flash Player 11.1
Hope it helped
Europe, Middle East and Africa