Loading .bmp (Bitmap) and .tiff file in Flash 10 using a Loader - actionscript-3

I am developing a Image uploader using Flash 10.
I am using FileReference object to browse images and Loader to show the image:
Sample code:
var tempFileRef:FileReference = FileReference(ev.target);
var oLoader:Loader = new Loader();
oLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onImageLoad);
oLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onIOError);
oLoader.loadBytes(tempFileRef.data);
It works fine with .jpg and .gif files but when I browse .bmp or .tiff file, I am getting the error:
Error #2124: Loaded file is an unknown type.
Is there a way to load and display browsed .bmp images from desktop?
Thanks

BMPDecoder class from Spark lib:
http://www.libspark.org/svn/as3/BMPDecoder/src/com/voidelement/images/BMPDecoder.as
Example of the usage: http://hi.baidu.com/leyhui/blog/item/d12be8b116ec915308230298.html
Regarding TIFFDecoder, it is still work in progress, but very promising one:
http://code.google.com/p/windowsbitmapdencoder/

No. Flash does not support .bmp and .tiff files.
Adobe Help Docs
"The bitmap image formats supported by Adobe Flash Player are GIF, JPG, and PNG."

Related

Read MP4 video metadata without playing it

I am loading a MP4 file in flash using flie reference to server, Now I want to check the size and codec of the video, if the size is less than 640X360, then I don't want to allow it for upload.
I have made filter to choose only MP4 files.
var aryFileFilters:Array = new Array();
aryFileFilters.push(new FileFilter("Video Files", "*.mp4;*.avi;*.mov;*.flv"));
aryFileFilters.push(new FileFilter("Audio Files", "*.mp3;*.wav"));
objFileRef.browse(aryFileFilters);
objFileRef.addEventListener("select", onUploadFile);
I have check over internet and found no way to do it, If you have something please share.
Thanks in advance.

save file in Blackberry 10 WebWorks html5

I found this https://developer.blackberry.com/html5/apis/blackberry.io.html example that load a file, but, nothing for save a file in html5 webworks to BB10
We actually have a sample that shows how to do this hosted on GitHub.
https://github.com/blackberry/BB10-WebWorks-Samples/tree/master/canvasToFilesystem
The sample shows how to save imageData from a Canvas element to the filesystem, but the actual file writing portion of the sample could be used for any file type.
https://github.com/blackberry/BB10-WebWorks-Samples/blob/master/canvasToFilesystem/saveCanvas.js#L31-L98

Swf is not showing on chrome when it loads images from external XML source

I have a swf file that's not working on chrome but works fine on other web browsers
you can test the flash from this url:
http://www.flawless-creativity.com/lifewindow/public/test-flash
In the as3 code I have a urlloader object that loads this xml file and handles it to show this slider:
http://www.flawless-creativity.com/lifewindow/public/services-xml
So I know the problem isn't in the as3 and not in the html embed code (I tried every embed code on the internet!), my only guess is that chrome doesn't allow swf files to load urls maybe for security... If that's true then how to solve this? Does the domain have to be trusted by google? And how to make google trust it?
I solved the problem ... In the as3 I added an enter_frame event listener , and in the event handler I started loading the xml URL

How to play .ts files (video/MP2T media type) in Browser?

I have one .m3u file that points to several .ts files (all in akamai).
Because we give to akamai a live stream, they convert it to these .ts files each of 10s. I see that the m3u files are easy to understand, but I can't find a browser based (flash, html5 or native plugin) player for these files.
If I give to vlc the link of the m3u file, vlc plays all the .ts files one after another as if it where only one big file. I want to use flash or something similar to be able to play in browser, the same way vlc can play those .m3u files.
Is this possible ?
You are basically talking about Apple's HLS format.
You can use an html5 object in your web page. You can use http://osmfhls.kutu.ru/ flash plugin. You can use jwplayer. There are more choices (e.g. flowplayer).

how do you insert a swf file with collada interactivity within it into an html page?

I have a swf file which I need embedded into a webpage. Does safari and google chrome support swf files with collada in it?