[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Swftools-common] how to use swfcombine to combine swfviewer with a
Re: [Swftools-common] how to use swfcombine to combine swfviewer with a swf generated from pdf2swf
Thu, 25 Nov 2010 10:02:35 +0100
On Wed, 24 Nov 2010 22:01:29 -0500
Mayank Jain <address@hidden> wrote:
>> So, for your given example to work as is, 'swfviewer.swf' must contain an
>> objectnamed 'viewpoint', because,
> Can you please guide me how to find which object is there?
Where did you get the file 'swfviewer.swf' from? Unless Kit is better informed
than I, ttbomk it isn't one of the default viewers distributed with SWFTools.
You'll find those in the swfs folder of the current SWFTools distributions, e.g.
If you must use 'swfviewer.swf' then swfdump with the appropriate flag should
show the objects inside it. Pick a suitable one.
> I need to create a viewer, so any pointer for that too.
Then look *closely* again at the example I pointed you at!
It shows you one way of loading one swf inside another, and under the code
snippet which links to information about creating your own viewer.
>.. or some pointer to create a new one.
OK, I'll try. Loading another swf with swfc script at it's simplest... ;o)
Create a file called 'viewer.sc',
# swfc code starts here
.flash filename="viewer.swf" bbox=200x200 version=8 fps=60 compress
.box spot width=1 height=1 color=aqua
.put spot x=0 y=0
.put view_frame x=10 y=10 scale=20%
# swfc code ends here
Compile it with 'swfc',
to give you the swf named 'viewer.swf'.
Now use swfcombine to add in the swf you wish to view, say 'poesie-book.swf'
swfcombine -o combined.swf viewer.swf view_frame=poesie-book.swf
Load up combined.swf and you should see the poesie-book.swf framed inside the
'view_frame' object of 'viewer.swf'
To get the code required to embed your swf viewer in a web page, use,
swfdump -E combined.swf > index.html
That of course is only the start. You need buttons to move backward and forward
through the frames of your loaded swf, buttons to enlarge and reduce the swf
pages, buttons to... etc. But, why not experiment yourself?
If further pointers are still required then maybe I should update and/or
the relevant wiki page so any other newcomers can also benefit?