Page 1 of 1

ActionScript error after setVisiblePages

Posted: Sun May 20, 2012 10:59 am
by hibiscus
I'm using the P2F AS3 API to load a document in a Flex application. I'd like to display only one page of the document at a time so I'm calling setVisiblePages. The code looks like this:

Code: Select all

presentationLoadHandler(e:Event) :void {
 ...
 var p2fdoc = presentationDocument.getDoc();
 p2fdoc.setCurrentPage(1);
 p2fdoc.setVisiblePages(1,1);
}
This actually does appear to work, but immediately results in the following error:

TypeError: Error #1010: A term is undefined and has no properties.
at print2flash_fla::MainTimeline/GetPageText()
at print2flash_fla::MainTimeline/MakeDocAccessible()
at print2flash_fla::MainTimeline/ScanPages()
at print2flash_fla::MainTimeline/CheckLoadedPages()
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()

Is there something I'm doing wrong? Any help would be great.

Thanks.

Re: ActionScript error after setVisiblePages

Posted: Sun May 20, 2012 11:38 am
by staff
Could you send us an example Flex project that demonstrates this problem to our support e-mail so that we can investigate it?