swftools-common
[Top][All Lists]
Advanced

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

Re: [Swftools-common] how to use swfcombine to combine swfviewer with a


From: Mayank Jain
Subject: Re: [Swftools-common] how to use swfcombine to combine swfviewer with a swf generated from pdf2swf
Date: Sat, 4 Dec 2010 17:59:57 -0500


Regards,
Mayank Jain


On Thu, Nov 25, 2010 at 4:02 AM, Chris <address@hidden> wrote:
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.
/swftools-2010-10-12-2000/swfs.

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
  .sprite view_frame
     .put spot x=0 y=0
   .end
.put view_frame x=10 y=10 scale=20%
.end
#
# swfc code ends here

Compile it with 'swfc',

  swfc viewer.sc

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 simplify
the relevant wiki page so any other newcomers can also benefit?

Chris,

I appreciate you have taken out time to answer my questions and your answers are helfpful for me to generate a simple viewer now I want to move to the next level.  Where can I find the complete documentation of all the features supported by swftools, like searching in the swf file, maximizing to the full screen, selecting of text. Can I create something similar to http://flexpaper.devaldi.com/. they have a very good look and feel.

Regards,
Mayank Jain 

Anyway, HTH.

Regards,



Chris
--
<address@hidden>


reply via email to

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