load PDF file inside the application (Android and Ipad)
Want to open PDF file inside the application. I try this code, its working in the PC but when I publish this, as an APK file it’s not working in my android device
package {
import flash.display.SimpleButton;
import flash.events.MouseEvent;
import flash.events.Event;
import flash.html.HTMLLoader;
import flash.net.URLRequest;
public class bpdf extends SimpleButton {
public function bpdf() {
// constructor code
this.addEventListener(MouseEvent.MOUSE_DOWN,downF) ;
}
private function downF(e:Event):void {
var htm:HTMLLoader= new HTMLLoader();
htm.load(new URLRequest("test.pdf"));
htm.width=200;
htm.height=300;
htm.x=50;
htm.y=20;
this.parent.addChild(htm);
// create a close button for htm and add it (to this.parent) and its listener here
}
function onCloseEvent(e:Event) {
if(!HTMLLoader.isSupported){
this.alpha=.1;
}
}
}
}



