tags:

views:

38

answers:

2

hello,
i'm totally new to flash and action script, here some action script code, for capturing images from webcam (from here):

var cam:Camera = Camera.getCamera();
var video:Video = new Video(640,480);
video.attachCamera(cam);
video.x = 20;
video.y = 20;
addChild(video);

import flash.display.Bitmap;
import flash.display.BitmapData;

var bitmapData:BitmapData = new BitmapData(video.width,video.height);
var bitmap:Bitmap = new Bitmap(bitmapData);
bitmap.x = 360;
bitmap.y = 20;
addChild(bitmap);

capture_mc.buttonMode = true;
capture_mc.addEventListener(MouseEvent.CLICK,captureImage);

function  captureImage(e:MouseEvent):void {
   bitmapData.draw(video);
}  

i've googled a bit, and found some information about flex sdk, and it's command-line tool for compiling .as to .swf (./bin/mxmlc), but any information about converting .fla to .swf in linux!
thanks for your attention!

A: 

FLAs were created in Flash Professional; which is not available on Linux.

I do not know of any alternate IDEs for editing FLAs on Linux. You may consider running Flash Pro on an alternate machine or in a a Windows VM.

www.Flextras.com
A: 

If you are lucky and that FLA comes from CS5, it is only a compressed XFL file. You can read more XFL here:

http://blog.zarate.tv/2010/04/18/xfl-finally/

But it's a rather long shot : )

Juan

Zárate
hm, but in tutorial, in the beginning, author says that i should create .fla file by hands? and finally, that code from tutorial, doesn't look like "classic" Action Script 3 code. what have i missed? :)
Anthony Koval'
How does XFL help here? It's not like mxmlc will accept it as input. The article you point to vaguely hand-waves about the inevitability of a Linux IDE that will read them, but lots of things have taken years between "inevitable" and "here" on Linux.
Warren Young
If it were XFL based - you could decompress it, extract the relevant bits and get on with your work. Maybe should've said that the new XFL-based FLAs open up the work with FLAs in Linux which was simply not possible before.Also, note that you don't need to put your code in a MXML file to compile using the Flex SDK since it compiles pure AS project as well.HTH!J
Zárate
I'd forgotten that you get a Stage even compiling a bare .as file. So yes, the above code may compile and work as-is. I've deleted my answer suggesting that he move to MXML.
Warren Young