is now part of CreativePro.com!

*** From the Archives ***

This article is from November 6, 2008, and is no longer current.

Exporting an InDesign Book to XFL for Flash

17

Dave wrote:

Like most magazines, we work with separate InDesign files for each story. I had hoped I could bring them all into an ID book and export to XFL but the only options are PDF and Digital Editions. Is there something I’m missing? Why wouldn’t they include XFL as an option for exporting a book?

It’s an excellent question, Dave. I think the answer is: XFL is really a 1.0 feature for both InDesign and Flash, and Adobe hasn’t gotten around to making it “robust” and fitting it into all the places it needs to go yet.

For those of you who don’t know, XFL is Adobe’s new interchange format that lets you export your pages from InDesign CS4 and import them into Flash. Each page of your InDesign document appears as a single frame in Flash CS4.

Your question sparked a lively email debate among several people I forwarded it to, including Michael Ninness, the InDesign senior product manager, who wrote:

In theory, it would be possible to automate some of this via scripting. Meaning, you could script ID to export each doc in a Book as a separate XFL file. That would help somewhat, but it would not create the single XFL file he desires.

That said, not sure he would want a single XFL file anyway, as it would take Flash a long time to open the resulting file. And in some cases, it may actually run out of memory when attempting to do so. Flash CS4 is doing something similar to what ID does when it opens an INX file. That is, it uses its scripting engine to “rebuild” the document.

That explains why it takes so long to open even a relatively short InDesign document (saved as XFL) in Flash. I’ve walked away from my computer waiting for it to process, wondering whether Flash had just crashed.

Keith Gilbert (who is writing a piece on the XFL workflow for InDesign Magazine) followed up with some more pertinent details:

The root problem is that in the XFL export from ID (or the XFL import into Flash, not sure which), each ID page gets turned into a Flash “symbol.” The first symbol is given the name “Page_1”, the second “Page_2”, etc. This is regardless of the actual page number used in the ID file, by the way, which is unfortunate.

So, if you have two 10-page ID files that you export to two XFL files and open the XFL files in Flash, they will both contain Symbols named “Page_1”, “Page_2”, etc. When you copy and paste the 10 frames from the first Flash file into the second Flash file, the Symbol names “collide” and there is no automatic way to resolve this. So you can’t simply copy frames from one Flash file to the other.

To which the inimitable Chris Converse (who has apparently been coding so much recently to forget his keyboard has a Shift key) replied:

if you take a minute to rename the movie clips in the library, you can copy and past the clips into other flash movies without collisions. this can be tedious, tho…

a swf file can import other flash movies.  if i were developing a flash movie from multiple ltile books, i would explore the option of using the “load movie” functionality of flash (swf), where each individual flash movie is loaded into a master at runtime…

Well, if we don’t have a definitive answer, then at least we have some interesting ideas to work with. But I think the key here is that while CS4 is definitely a big step forward in the integration of InDesign into an RIA/RID workflow, much work remains for Adobe before this is really seamless and easy for designer/developers.

David Blatner is the co-founder of the Creative Publishing Network, InDesign Magazine, CreativePro Magazine, and the author or co-author of 15 books, including Real World InDesign. His InDesign videos at LinkedIn Learning (Lynda.com) are among the most watched InDesign training in the world.
You can find more about David at 63p.com

Follow on LinkedIn here
  • James Fritz says:

    A possible solution would be to use the move pages command. Have all of the ID docs open, then select the pages and move them to 1 doc, then move to the next and repeat until all of the pages are in 1 doc. Then you could export the entire thing to INX.

  • Hi!

    This is actually very interesting subject. I have figured out this one too and we are developing a kind of “player” or “container” for swf-files produced by indesign or Flash (from XLF files). This container is actually also swf-movie made with Action Script 3. It has some basic controls like next and previous page, zoom etc. Somewhere in the UI of this container, there is a drop down menu that shows the names of all swf-files that has been published to same folder with this container-file. So if you publish all the indd-files in the book to the right folder, end user can load those movies to the container one by one.

    Theres no need to customize the container because it only shows swf-files in same folder with itself. You simply copy it to your server, put some swf-files there as well and thats it…

    This not ready yet, I hope it gonna work…

  • Dave Haglund says:

    Would the “move pages” command have the same problems as dragging pages from one document to another from the thumbnail panel? That approach can cause problems with master pages and style sheets that are named the same but actually are different.

    The Flash Player approach sounds very cool if I can figure out how to do what you are doing :-)

    Let us know if it works,
    Dave

  • Bryn Bowman says:

    I would agree with Chris and Petteri. The way to do it is to load the different articles at run time. As Dave pointed out in his question, many magazines work on separate files, and then collect them using an InDesign book. On the web, you would want to use a master swf(or book) to load all the articles into one container. This would offer several benefits. You don’t have to preload the entire magazine at the beginning, and you can easily navigate between the articles as Petteri is suggesting with the description of the component they are building.

    If you are not a flash developer this can be a very daunting task, and I imagine that is why dave wants to have everything in one book file, but managing your assets in flash to keep file size down is key to performance and not crashing someone’s browser.

    To load the articles in a swf, you will need to combine a few rather complicated techniques. 1, you will need to store references to all your “articles” in an array, or an XML file(I would use an external XML file, also loaded at run time). 2, you will need to load the articles at run time. How this happens would depend on how your user would navigate through the information. For example, when a user clicks next page, the file would load the next page. I would suggest an external class called Bulk Loader to handle all the loading. It will greatly simplify things once you get it running.

  • I’ve done some further experimenting, and have come up with another workaround that might be helpful in some cases. It turns out than an XFL is a zip file, which can be opened and modified. Within the zip file, there is a way to make a couple of simple changes to the component XML files so that when Flash opens the XFL file the pages aren’t always named Page_1, Page_2, etc., but can be assigned any arbitrary names that you wish. I’m writing this up in detail for an upcoming InDesign magazine article about Flash export from InDesign that I’m working on.

  • First version of our InDesign SWF “magazine-browser” is ready. You can test it in address:

    https://www.prepress.fi/lehtiselain/PPS_lehtiselain4.html

    Language in magazine is Finnish, but I guess it doesn´t matter for testing…. This version is coded for one swf-file (from indesign or flash) but hopefully in next version there will be some kind of menu for choosing from different swf-files.

    This one is very easy to use. You simply have to publish a swf file from indesign to same folder with this browser-swf. Name of the swf, that comes from ID has to be exactly right, otherwise magazine-browser will not “suck” it in. All the interactive functions made in InDesign, works fine (page curl, hyperlinks, buttons etc)

    Controls (downside) are from left to right:
    -Full Screen (works with browsers only)
    -Home (=back to page1)
    -previous and next page (page curl doesn´t work yet)
    -zoom in and out
    -zoom 100%

    And when layout is larger than screen:
    -you can drag it with mouse
    -you can go up and down with arrowbuttons
    -you can go to top of the page

    Flash Player 9 or 10 is required…

  • Petteri,

    Your “magazine-browser” is cool. Is this something that you are planning to sell to others?

  • Keith,

    How did you “unzip” the xfl to get to the contents? Thanks.

  • Keith,

    absolutely. And the price is not going to be high.

    Latest version works with external XML-file. So you can publish as many indesign-SWF-magazines there as you like. Magazine Browser generates a ComboBox-dropdown menu to the top of the screen. If you have 5 magazines in XML-file, then you see 5 choise in ComboBox etc… InDesign SWF-files can rest basicly anywhere as long as you refer them correctly in XML-file, thus its recommended to keep them under same Domain.

    Latest version is:

    https://www.prepress.fi/lehtiselain/PPS_lehtiselain6.html

    “Valitse lehti” in combobox means “Pick a magazine”.

    I have also made an AIR-version of this for desktop usage…

  • @Sean: You should be able to just change the .xfl to .zip and then use an unzip program to unzip it. (If I recall, the built-in zip program on the mac didn’t work, so I had to use a free third-party zip tool.)

  • Ben Feigin says:

    Keith really hits the nail on the head as far as this problem goes, however with a simple extension from adobe… A mass library re-namer does just the trick. Infact if you put objects into folders and then use the rename it will automatically append the folders name.

    https://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&extid=1091471#

  • Petteri Paananen says:

    I wounder of the price of InDesign SWF ?magazine-browser.

  • By the way, that previous post looks like sent by me but it´s not… my name appeared there after I posted this answer, I don´t remember anymore who was the original sender… strange, a bug in forum software?

    Anyway…
    There´s no price tag for it yet. I can send you a package for testing, if you like…

    Send me an email: petteri.koti[at]NOSPAMdig.fi

    (remove NOSPAM from address and turn [at] to @)

  • Eduardo Viana says:

    Hi, i’m from Brazil and interested in yours magazine-browser for my magazine client. Please, tell me when its alread. I’d like to test it too. Thanks.

  • Richard Weeks says:

    I am also interested in the magazine browser technology. Please would you let me know when available. Thanks

  • It´s available now:
    https://www.prepress.fi/index.php?id=157

    Most recent demos:
    https://www.prepress.fi/eDocBrowser
    (this is set of 3 dummy SWF´s linked together)

    https://www.prepress.fi/e_news
    (2 real magazines, this is with search)

    https://www.pohto.fi/pohto_enews/
    (2 small 4-page magazines)

  • Peg Walsh says:

    We are trying to take the 288 page full color catalog into
    one FLIP book…is it possible?
    With what I’ve read (2008) it could take forever…print version is over 5GIG.
    Any suggestions?
    I also have to combine 17 sections of the CS4 InDesign
    Catalog into one 288 page to do this…again, what is the
    best way to do this??

    Any help will be greatly appreciated

  • >