[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Swftools-common] incremental loading of slides
From: |
Boris Reitman |
Subject: |
Re: [Swftools-common] incremental loading of slides |
Date: |
Tue, 12 Oct 2010 17:45:24 +0200 |
Ok, here's what I came up with and it works! Here it is working:
http://random.hypervolume.com/loadswf.swf
The code is below. Some questions:
- how do I pass a url parameter to swf (flashargs). As you see, now I
have hardcoded to load "x9.swf"
- the bbox dimensions. I just looked at the dimensions of the x9.swf
and copied them here. Is it always going to be a fixed size when I
generate with pdf2swf ? If not, how do I just say -- make it all 100%
fit ?
The code:
------------------>8--------------------------
.flash filename="loadswf.swf" bbox=720x540 version=8 fps=60 compress
.box spot width=1 height=1 color=black
.box box1 color=white fill=#336633 width=50 height=50
.box box2 color=white fill=#99cc99 width=100 height=100
.outline o1:
moveTo 0,0
lineTo -20,20
lineTo 0,40
.end
.outline o2:
moveTo 0,0
lineTo 20,20
lineTo 0,40
.end
.gradient rainbow:
0% yellow
100% orange
.end
.gradient rainbow2:
0% orange
100% yellow
.end
.gradient rainbow3:
0% red
100% orange
.end
.gradient rainbow4:
0% orange
100% red
.end
.filled f1 outline=o1 fill=rainbow line=0
.filled f2 outline=o2 fill=rainbow2 line=0
.filled f1b outline=o1 fill=rainbow3 line=0
.filled f2b outline=o2 fill=rainbow4 line=0
.button leftbutton
.show f1 as=shape x=20 y=0
.show f1b as=hover x=20 y=0
.on_release:
viewport.prevFrame();
.end
.end
.button rightbutton
.show f2 as=shape x=0 y=0
.show f2b as=hover x=0 y=0
.on_release:
viewport.nextFrame();
.end
.end
.sprite viewport
.put spot x=0 y=0
.action:
var dummy_value=0;
.end
.end
.put viewport x=0 y=0
.put leftbutton x=655 y=0 scale=150% alpha=90%
.put rightbutton x=690 y=0 scale=150% alpha=90%
.action:
loadMovie("x9.swf",_root.viewport);
.end
.end
---------------------------8<-----------------
On Mon, Oct 11, 2010 at 9:30 PM, Chris <address@hidden> wrote:
> Hi Boris,
>
> I'm not really a pdf2swf chap - rarely, if ever, have I had call to use it.
> Other
> than attempting to answer questions of course. I did not write the viewer
> code, nor have I really looked at them either, as always preferred to script
> my own in
> swfc. The source of the viewers is available to edit though, if you fancy
> trying
> to wade through it yourself.
>
> Have you tried the very simple swf load script I put here,
>
> http://wiki.swftools.org/index.php/Swfc_Code_Snippets
>
> as a starting point for rolling your own basic viewer? Change the dimensions
> of
> the viewing frame, add a few simple buttons, and you're practically there.
> As you
> go along, simply consult the documentation, and keep asking on the list if
> the need
> arises. Common answers of interest can always be posted on the wiki.
>
> While it obviously depends on the size of your converted file, swf files
> viewed
> directly in a browser, will nearly always load quicker.
>
> HTH.
>
> Regards,
>
>
>
> Chris.
>
> On Mon, 11 Oct 2010 19:02:13 +0200
> Boris Reitman <address@hidden> wrote:
>
>> Hi,
>>
>> When I run pdf2swf without default viewer, and with --stop option, the
>> output SWF is loading quick, just the first frame. However, if I use
>> the SimpleViewer (-b option) then all of the SWF must load until I see
>> the first frame and the buttons. Same with rfxview viewer. It is a
>> bug, and it think it occurs because the viewport child in is declared
>> before the buttons. I tried writing my own viewer in AS3 and AS2 but
>> didn't succeed. Any help would be appreciated.
>>
>> Thanks,
>> Boris
>>
>> > The purpose of a (pre-)loader, is to waste time showing a pretty animated
>> > picture
>> > while the poor user waits patiently for a sizable swf file ( in this
>> > instance your
>> > slide collection conversion ) to load. Once the swf is fully loaded the
>> > first
>> > page of it is viewable.
>> >
>> > Since you want to load and view your converted pdf frame by frame, page by
>> > page, slide by slide, n effect 'streaming' it, you *DO NOT* need to waste
>> > time
>> > using a (pre-)loader! You simply need a *viewer* to play back those
>> > individual
>> > frames.
>> >
>>
>> >
>> > http://wiki.swftools.org/index.php/Pdf2swf
>> >
>>
>
>
> --
> Chris <address@hidden>
>