Flash Extension: Combine Textfields

Justin | conferences,design,extensions,Flash | Sunday, October 12th, 2008

This extension combines multiple textfields into one editable textfield. I put this together as an entry for the Hackathon at Flash Camp.

UPDATE 10/12/08: This project took home the ‘Most Useful‘ award at Flash Camp.

Creative Suite 4 will be introducing a new Flash format, XFL. This format can be created by other applications, including InDesign and After Effects, and then edited by Flash Professional. So print designers and video artists now have a new window into Flash. One consequence of retaining the formatting of an InDesign document into Flash, is that text blocks get broken into individual lines. This will be familiar to anyone who has opened a PDF in Illustrator. This extension will recombine those textfields into one block while retaining the individual formatting properties.

Video demo of InDesign to Flash with XFL: Part One, Part Two, Part Three.

Download
(compatible with Flash MX 2004, Flash 8, Flash CS3, and Flash CS4)
Combine Textfields.mxp

If you’re interested, you can also download and look at the source.

Source
CombineTextfields_src.zip

UPDATE 11/20/08: Unfortunately ligatures are brought in as shapes rather than editable text, so they are essentially ignored by this extension. I have it on good authority that this will be resolved in Flash Authoring (Flash Player 10 already supports ligatures), but I have no idea when.

UPDATE 11/20/08 (#2): Version 1.1.0 posted. I found a Flash bug with Windows that was preventing the textfields from being sorted properly, so I adjusted some code to account for that bug. Version 1.1.0 addresses this issue. Apparently Flash CS4 in Windows doesn’t recognize the label attribute of radio tag in an xmlui file unless it’s value begins with an uppercase character. This may occur in other versions of Flash, but I only tested CS4. If the explanation of this bug doesn’t make sense to you, don’t worry, the extension will still work for you. It’s a pretty esoteric use case, so most JSFL* developers won’t even encounter this bug. I also found a bug that occurs when the XFL has set the faux bold property of a textfield. If this is the first textfield that you’re sorting from, it will make all of your text faux bold, and Flash doesn’t currently allow JSFL to control this property. Flash has moved to using the bold face of a family, rather than the faux bold control. This is also likely to occur with faux italics. It only occurs when the entire textfield is set to faux bold or italic, and should not occur when individual phrases within a textfield are set this way. This is partially a bug with Flash’s new font controls and partially with InDesign’s XFL export. Both features are brand new (and fantastic), so these kinks will likely be worked out in the future. I’ve contacted both teams and the InDesign group will likely fix how the tag is generated in the XFL.

*JSFL is the language used to write Flash extensions.

11 Comments »

  1. “This format can be created by other applications, including InDesign and After Effects”

    Just to be clear to readers, my understanding is that XFL is ONLY available for EXPORT from AE and Indesign and IMPORT into Flash. No other products in CS4 support the exporting or importing of the format. It will be great when all CS products can have a common language of sorts, but not this time around….

    Comment by Aran — October 12, 2008 @ 10:19 pm

  2. That’s exactly right, Aran. The fact that the format is based on XML and contains all of the original assets (like images that can be edited in Photoshop), will likely open up new possibilities for the format in the near future. It’s also possible that Adobe could release the format as open source for other developers to work with.

    Comment by Justin — October 12, 2008 @ 10:28 pm

  3. [...] the release of my Combine Textfields extension for Flash, I’ve put together a similar extension for Adobe Illustrator. This [...]

    Pingback by Announcing Merge Text Extension for Adobe Illustrator | Ajar Productions — November 23, 2008 @ 11:17 pm

  4. [...] request—following similar extensions for Flash and Illustrator—here’s an extension for InDesign that merges multiple textframes into one, [...]

    Pingback by Merge TextFrames Extension for Adobe InDesign | Ajar Productions — November 28, 2008 @ 3:15 am

  5. [...] the merge text extensions for Flash, Illustrator, and InDesign, Keith Gilbert wrote me wondering about getting swatch information from [...]

    Pingback by New Extension: Send Colors from InDesign and Illustrator to Flash | Ajar Productions — December 5, 2008 @ 10:27 pm

  6. Useful extension. Very much appreciated!

    Comment by Okto — December 8, 2008 @ 6:11 am

  7. [...] Textframes: para combinar varios marcos de texto en uno solo, también disponible para Flash e [...]

    Pingback by Dándole de comer a Adobe InDesign | Más de 30 Scripts y extensiones | ceslava - Diseño y Formación — December 15, 2009 @ 3:36 pm

  8. Friggin Awesome!!! Just saved me a ton of time!!

    Comment by Typestries — February 25, 2011 @ 3:34 pm

  9. Thanks! Glad to hear it, Typestries.

    Comment by Justin — February 25, 2011 @ 10:36 pm

  10. I need an opposite way, broke texts in a frame.

    i.e.: I have a text frame: [0080 5060 4025 2452]

    I need this: [0080] [5060] [4025] [2452]

    Comment by Jonathan — April 26, 2012 @ 7:08 pm

  11. Hi Jonathan,

    Check this out: Break text into lines.

    Comment by Justin — April 26, 2012 @ 7:55 pm

RSS feed for comments on this post. TrackBack URI

Leave a comment

You may use the following html tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> .


5 × two =

Subscribe without commenting