Hi Matthias,
I read your replies on related questions but I think there is still a
problem in exporting to Flash 9, ActionScript 3 with PDF2SWF.
When I execute:
pdf2swf.exe --flashversion=9 "pdf1.pdf" -o "flash9.swf"
I get a SWF file with (swfVersion=9) but with (actionScriptVersion=2)
instead of 3.
This means that it will be loaded in an AVM1Movie container by Flash 9 or
Flex 2. I get the following error when I run my testcode in Flash 9:
TypeError: Error #1034: Type Coercion failed: cannot convert
flash.display::[EMAIL PROTECTED] to flash.display.MovieClip.
at LoaderInfoExample/::initHandler()
My testcode in Flash below.
Kind Regards,
Rick
package {
import flash.display.*;
import flash.events.*;
import flash.net.URLRequest;
public class LoaderInfoExample extends Sprite {
private var url:String = "swftools/flash9.swf";
public function LoaderInfoExample() {
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.INIT,
initHandler);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR,
ioErrorHandler);
var request:URLRequest = new URLRequest(url);
loader.load(request);
addChild(loader);
}
private function initHandler(event:Event):void {
var loader:Loader = Loader(event.target.loader);
var info:LoaderInfo = LoaderInfo(loader.contentLoaderInfo);
trace("url=" + info.url);
trace("");
trace("swfVersion=" + info.swfVersion);
trace("actionScriptVersion=" + info.actionScriptVersion);
trace("");
MovieClip(loader.content).gotoAndStop(5);
}
private function ioErrorHandler(event:IOErrorEvent):void {
trace("ioErrorHandler: " + event);
}
}
}