Import Complex Formatting in Flash #45
Chapter 6, Text
|
207
HACK
Figure 6-13 shows the appearance of the group that Flash creates during the
paste operation. Just think how long it would have taken if you did it by
hand in Flash!
It doesn’t matter where you copy your formatted text from, as long as you
paste it into Word and then recopy and paste it into Flash. And the preced-
ing trick is not just for equations; if you have any HTML that you want to
use in Flash (for example, you may want to “Flashify” a static HTML menu
and use the HTML version as a guide), simply copy it into Word from the
HTML page, and then paste it into Flash. Amazingly, it works perfectly on
Windows (although it might not work on a Macintosh).
Copying and pasting is a great way to base the layout of a
Flash form on an existing HTML/JavaScript form.
Figure 6-14 depicts highlighting the O’Reilly site mast and side menu and
copying the HTML to the clipboard.
Paste the HTML content into Word, as shown in Figure 6-15, and then copy
it from Word to the clipboard and from there to Flash.
Figure 6-16 shows the O’Reilly mast and side menu running in a SWF after
being pasted into Flash and some minor cleanup being applied. All ele-
ments are static, but this layout could be used as a guide to rebuilding parts
of the site in Flash.
If you want to import whole pages of a technical document (to create a Mac-
romedia Breeze-style web tutorial on a technical subject, for example), the
easiest way to do it is by distilling the Word document into a PDF (or get-
ting the PDF from a third party) and then importing the PDF into Flash
using File
Import.
Final Thoughts
Although you can use simple online PDF documents or formatted HTML to
present technical discussions on the Web, Flash has an advantage over such
methods—your technical diagrams can be animated. Illustrating physics
concepts, for example, is difficult with static diagrams, but Flash SWFs with
animations presenting the concepts will help immensely.
Figure 6-13. A complex equation represented as a group of text elements in Flash
208
|
Chapter 6, Text
#45 Import Complex Formatting in Flash
HACK
If that doesn’t convince you there is a need for presenting math formulas in
Flash, take a look at a few of the animation engines being implemented in
Flash (such as Robert Penner’s scripted easing equations at http://www.
robertpenner.com). Using Flash to explain them seems most appropriate!
Figure 6-14. Highlighting the O’Reilly site mast and side menu
Figure 6-15. HTML pasted into Word, then reselected and copied back to the clipboard

Get Flash Hacks now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.