[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Swftools-common] PDF2SWF - export to Flash 9 ActionScript 3

From: Rick Companje
Subject: [Swftools-common] PDF2SWF - export to Flash 9 ActionScript 3
Date: Tue, 29 May 2007 10:38:56 -0000

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::address@hidden to flash.display.MovieClip.
    at LoaderInfoExample/::initHandler()

My testcode in Flash below.

Kind Regards,

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);

        private function initHandler(event:Event):void {
            var loader:Loader = Loader(event.target.loader);
            var info:LoaderInfo = LoaderInfo( loader.contentLoaderInfo);

            trace("url="" + info.url);
            trace("swfVersion=" + info.swfVersion);
            trace("actionScriptVersion=" + info.actionScriptVersion);

        private function ioErrorHandler(event:IOErrorEvent):void {
            trace("ioErrorHandler: " + event);

reply via email to

[Prev in Thread] Current Thread [Next in Thread]