Tuesday, March 30, 2010

Opening a PDF inside Flash compile...

I'm trying to open a pdf inside flash.?I followed a tutorial online but I'm have issues with the compiler.?Here's my code:

import flash.html.HTMLLoader;

import flash.html.HTMLPDFCapability;

import flash.html.HTMLWindowCreateOptions;

if( HTMLLoader.pdfCapability == HTMLPDFCapability.STATUS_OK )

{

?var htmlLoader:HTMLLoader = new HTMLLoader();

?var url:URLRequest = new URLRequest( ''01_Advanta2_Master.pdf'' );

?htmlLoader.width = 800;

?htmlLoader.height = 600;

?htmlLoader.load( url );

var pdfHolder:UIComponent = new UIComponent();

pdfHolder.addChild (htmlLoader);

?addChild (pdfHolder);

}

It results in these errors:

1046: Type was not found or was not a compile-time constant: UIComponent.

1180: Call to a possibly undefined method UIComponent.

Opening a PDF inside Flash compile...

You need to have components in the library in order for them to be accessible.

No comments:

Post a Comment