Is it possible to convert an swf to image using actionscript.
You question needs a bit more detail. So I will make some assumptions.
I assume that you want to take a snapshot of the current state of you SWF, and then save that as an image file. You don't tell us where you want to save the image e.g. on a server, on the users local machine, or even keep it inside flash etc. so I can't really help you much there.
It is quite easy to get a snapshot of your SWF. What you want is the BitmapData class. This function should help. Just pass it a reference to a DisplayObject (can be stage), and it will return you the BitmapData object.
function snapClip(clip:DisplayObject):BitmapData
{
var bmpData:BitmapData = new BitmapData(stage.width, stage.height, true, 0);
bmpData.draw( clip, new Matrix() );
return bmpData;
}
var bmpData:BitmapData = snapClip( stage );
From there you can add the BitmapData to the stage like this:
var mc:MovieClip = new MovieClip();
mc.addChild( new Bitmap(bmpData) );
addChild(mc);
Or you can encoder your BitmapData into JPEG format:
import com.adobe.images.JPGEncoder;
var jpgEncoder:JPGEncoder = new JPGEncoder(85);
var jpgStream:ByteArray = jpgEncoder.encode(bmpData);
From here, to save it to a server you need to send the byteArray to a server-side script that can handle the saving.
Here are some links that may help:
I suggest you use Moyea swf to video converter which can easily convert swf to avi,flv,mov,wmv,mp4 etc and it also can convert swf to audio&image formats including JPG.