camerRoll use in AIR 25, 26
I have several apps that have a drawing function that includes a way to save a screenshot. AIR 23 and earlier, this function works correctly both in iOS and Android versions. With AIR 25 and 26, it stops on the var cameraRoll line and goes no further. The Adobe API reference shows it works with AIR 25 and older with no change in the examples. What am I missing? Appreciate some insight
Thanks, Jon - Animate 2017.5, AIR 26.0.0.118 (or AIR 25.0, 23.0)
function saveCamRoll(event:MouseEvent):void
{
drawToolClose_btn.visible = false; // hides the close button so not in screenshot
toolHide_mc.visible = true; //covers all the drawing tools so don't show in screenshot
var cameraRoll:CameraRoll = new CameraRoll();
var bitmapData:BitmapData = new BitmapData(stage.stageWidth,stage.stageHeight); // want everything on the screen for the screenshot
bitmapData.draw(stage);
cameraRoll.addBitmapData(bitmapData);
camRoll_btn.gotoAndPlay("over"); // adds a "click sound show user knows something happened
drawToolClose_btn.visible = true; //shows close button
toolHide_mc.visible = false; //shows the drawing tools
}
I have imported libraries
import flash.display.MovieClip;
import flash.display.Stage;
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.events.MouseEvent;
import flash.events.Event;
I have set up listeners
function addListeners(): void {
toolHide_mc.visible = false;
camRoll_btn.addEventListener(MouseEvent.CLICK, saveCamRoll);
camRoll_btn.buttonMode = true;
}
