You can create a container in AS3 and load your AS2 application into it. So you can use AS3 code in that container to save the image into your PC. Let me know if you need help regarding this.
You need to deploy both the files in your release. AS3 swf will be your primary swf and AS2 swf will be loaded into it.
// code
package
{
import asfiles.encoding.*;
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.net.*;
import flash.utils.ByteArray;
public class AS3Container extends MovieClip
{
public var myRequest:URLRequest;
public var l:Loader;
public function AS3Container()
{
myRequest = new URLRequest("scene.swf"); // load your AS2 swf
l = new Loader();
l.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete);
l.load(myRequest);
saveButton.enabled = false;
saveButton.addEventListener(MouseEvent.CLICK, saveHandler);
}// end function
public function onComplete(event:Event)
{
this.addChild(l);
l.width = stage.width;
l.height = stage.height;
saveButton.enabled = true;
}// end function
public function saveHandler(event:MouseEvent) : void
{
saveImage(l,"myImg.jpg");
}// end function
public function saveImage(image:Loader, imageName:String) {
var _rect:Rectangle = null;
var _matrix:Matrix = null;
trace(image.x+","+image.y);
_rect = new Rectangle(image.width/2, image.height/2, image.width, image.height);
var jpgSource:BitmapData = new BitmapData(image.width, image.height);
jpgSource.draw(image, _matrix);
jpgEncoder = new JPEGEncoder(100);
var jpgStream:ByteArray = jpgEncoder.encode(jpgSource);
var file:FileReference = new FileReference();
file.save( jpgStream, imageName );
}
}
}
The approach used in this link will help you to save using AS3 and PHP. http://subashflash.blogspot.in/2013/10/save-image-from-as2-project-using-as3.html.