JorawarSingh
09-16-2009, 05:49 PM
Hi All,
Firstly, I am new into flex 3.
There is a need in my project to show pdf file and do selection over the text. I got sollution to add flashpaper document. Flash paper compile the pdf file or any other printable document and convert it into swf.
So, here i am loading flashpaper document into my flex application. As the flex 3 is using as3 and flashpaper apis is in as2 i am using as3->as2->as2 bridge to communicate between the files.
Here is some more description.
I have a flex application where this code is written-
private function initApp():void
{
loadSwf();
}
private function loadSwf():void
{
var request:URLRequest = new URLRequest("assets/swf/sample.swf");
var loader:Loader = new Loader();
loader.load(request);
var fp = loader.content.getIFlashPaper();
//swfloader.source = loader;
var myComponent:SWFLoader = new SWFLoader();
myComponent.addChild(loader);
swfContainer.addChild(myComponent);
loader.contentLoaderInfo.addEventListener(Event.IN IT,test)
sending_lc.addEventListener(StatusEvent.STATUS, onStatus);
}
public function test(fp:*):void
{
sending_lc.send("lc_name", "methodToExecute" , "String");
}
in flashPaperDocument files which i am loading in flex load another file which is flashpaper compliled document.
The problem is this, everything loads fine, but i am not able to do selection over the text inside the flashpaper document.
Please help me or give me some directives or alternative ways to this?
Firstly, I am new into flex 3.
There is a need in my project to show pdf file and do selection over the text. I got sollution to add flashpaper document. Flash paper compile the pdf file or any other printable document and convert it into swf.
So, here i am loading flashpaper document into my flex application. As the flex 3 is using as3 and flashpaper apis is in as2 i am using as3->as2->as2 bridge to communicate between the files.
Here is some more description.
I have a flex application where this code is written-
private function initApp():void
{
loadSwf();
}
private function loadSwf():void
{
var request:URLRequest = new URLRequest("assets/swf/sample.swf");
var loader:Loader = new Loader();
loader.load(request);
var fp = loader.content.getIFlashPaper();
//swfloader.source = loader;
var myComponent:SWFLoader = new SWFLoader();
myComponent.addChild(loader);
swfContainer.addChild(myComponent);
loader.contentLoaderInfo.addEventListener(Event.IN IT,test)
sending_lc.addEventListener(StatusEvent.STATUS, onStatus);
}
public function test(fp:*):void
{
sending_lc.send("lc_name", "methodToExecute" , "String");
}
in flashPaperDocument files which i am loading in flex load another file which is flashpaper compliled document.
The problem is this, everything loads fine, but i am not able to do selection over the text inside the flashpaper document.
Please help me or give me some directives or alternative ways to this?