swftools-common
[Top][All Lists]
Advanced

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

Re: [Swftools-common] PDF2SWF viewer in actionscript 3.0


From: Brad Pitcher
Subject: Re: [Swftools-common] PDF2SWF viewer in actionscript 3.0
Date: Wed, 22 Jul 2009 16:56:13 -0700

Thanks for the tip, Matthias!
That code alone is enough to display the pdf with the pages scrolling
swiftly by.  swfc gave me a warning about not defining a bounding box,
so I added that.  Then I placed a call gotoAndStop() in the Main
function, but this time swfc complained that it couldn't find
viewport, so I defined it as a public variable and now it works great!
 The final result is the following:

.flash filename=annotate.swf bbox=600x800 version=9
    .sprite viewport
    .end
    .put viewport x=10 y=40

    .action:
        package {
            import flash.display.MovieClip;
            import flash.display.Sprite;

            public class Main extends MovieClip
            {
                public var viewport:Sprite = new Sprite();

                function Main()
                {
                    viewport.gotoAndStop(1);
                }
            }
        }
    .end
.end

---------
Brad Pitcher
Software Engineer
Master of Computer Science - University of Oregon
(702)723-8255
Sent from Eugene, Oregon, United States


On Sat, Jul 18, 2009 at 8:54 PM, Matthias Kramm<address@hidden> wrote:
> On Sat, Jul 18, 2009 at 12:15:42PM -0700, Brad Pitcher <address@hidden> wrote:
>> as you can see it's incredible simple, I just can't get it to work.  I
>> tried making viewport a global variable or a public class variable but
>> nothing seems to work.  Does anyone know what I'm doing wrong?
>
> You need a SWF object named "viewport", not a variable.
> Try something like this swfc script:
>
> .flash name=viewer.swf version=9
> .sprite viewport
> .end
> .action:
>    package {
>        import flash.display.MovieClip;
>        public class Main extends MovieClip
>        {
>            function Main()
>            {
>            }
>        }
>    }
> .end
>
>
>
>
>




reply via email to

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