Error when using sample in SDK

Using Print2Flash Document API
Post Reply
Posts: 2
Joined: Mon Aug 11, 2008 10:49 pm

Error when using sample in SDK

Post by allan_p_h » Mon Aug 11, 2008 11:13 pm

I have tried running the actionscript 3.0 sample called docapisample, in the CS3 folder of the SDK samples, and I get the following error:
Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found.

What am I doing wrong? I get the same thing on my Mac, and in Windows XP.
I put a trace line in the Print2FlashDoc file, right at the end of the constructor function, the line was
trace("bug search "+url);
The result was
bug search sample.swf?connstr=_12185141947920.8780097858980298&conndomain=localhost

so it's definitely finding the classes. The line that's causing the error is
var P2FDoc:Print2FlashDoc=new Print2FlashDoc("sample.swf",10,50,500,350,this)
I commented everything else out while I was trying to find the problem. I also added the class path to the Flash movie settings, no luck.

I hope someone can help, thanks in anticipation

Posts: 267
Joined: Sat Dec 15, 2007 4:48 pm

Re: Error when using sample in SDK

Post by staff » Thu Oct 16, 2008 5:07 am

You need to launch this sample in the browser by choosing File/Publish Preview/HTML in the Adobe Flash CS3 menu. This problem arises because the debugger player seems not to handle URLs correctly.

If you need to debug your movie when it is running in a browser, you may accomplish this as well using Debug/Begin Remote Desktop Session/ActionScript 3.0 command in the Adobe Flash CS3 menu.

Posts: 1
Joined: Wed Jul 29, 2009 12:43 pm

Re: Error when using sample in SDK

Post by kielsoft » Wed Jul 29, 2009 1:55 pm

Yeah truely you may have problem in using the sdk with AS3 in Flash, The SDK works fine with with AS2 both in standalone flash app and the webpage embedded flash which it only works better only in web browser with AS3.

For a situation of standalone Flash app or to use with Adobe AIR (AS3 compatible), if you wouldn't mind, here is a simple solution:

1. Convert your document in print2flash and dont forget to uncheck "Disable Print2Flash Document API support". Assuming you called it "msword_note.swf"
2. Now edit the Flash 8 Sample to import Your converted file "msword_note.swf" and export to a standalone flash which can run in other app or on the web browser. Assuming you called it "myAppIn8.swf"
3. Create new AS3 flah and use Loader Class to import Your "myAppIn8.swf" as below. Assuming you called it "MyAppIn9.swf"

Code: Select all

var loader:Loader = new Loader();
loader.load(new URLRequest("myAppIn8.swf"));
That should work for You now.
To make the "myAppIn9swf" (AS3) to call function or pass variable to "myAppIn89swf" which is AS2, Use LocalConnection(). for more on LocalConnection() see this page ... tcount=249

Post Reply