5 Replies Latest reply on Apr 16, 2006 1:15 PM by Calwen

    Formatting paragraphs strategies

      As i understand, padding paragraphs isn't supported in Flash. I'm not happy to just put a full line height after each paragraph, especially because the texts on my site will be loaded from a XML source.

      You'll find on my working site, an example on the Ego section. The XML file loaded can be found there.

      1. The first solution for me was to put an extra node ( <espace> </espace> ) after each new paragraph and put all the text into a dynamic textfield. This is actually what is code.

      2. Another solution would be this code. It creates a textfield for each node and place it after the code calculated the needed height. (see below)

      This, however has a drawback, i'm not fluent enough for now to how to devise a scrolling area for all these textfields... And is this the right method anyway? How do you manage spaces between paragraph? I want a simple solution for coding the XML file since it could be another person who will deal with the content.

      Which method is preferable? Are there other solutions?

        • 1. Formatting paragraphs strategies
          Calwen Level 1
          Hello guy, yes it is a bit of problem that padding is not supported. The idea of having multiple text fields and to set their _x and _y position once they've been populated and formatted is not a bad idea but it sounds to me like that can become very tedious if you plan to have a lot of contents. Although if you stick to the idea you can wrap them all in a movie clip and add that movie clip in a textArea instance and it will be scrollable. The following link could help http://blog.inventis.be/embedding-images-and-movie-clips-in-flash-text-fields/

          1 person found this helpful
          • 2. Formatting paragraphs strategies
            Thank you for the tip! But i don't see how to attach my ConteneurText_mc to a TextArea... The link you mentionned deals with external data.

            In my piece of code (below), the MovieClip ConteneurText_mc appears outside the TextArea.

            • 3. Formatting paragraphs strategies
              Calwen Level 1
              Hello guy you need to have and HTML text field and use the IMG and SRC tag to attach a movie clip from the library see below :

              textField_txt.htmlText = "<p>Here's a movie clip symbol:<img src='symbol_ID'>";

              Have a look there for molre info: http://livedocs.macromedia.com/flash/mx2004/main_7_2/wwhelp/wwhimpl/common/html/wwhelp.htm ?context=Flash_MX_2004&file=00001046.html

              • 4. Re: Formatting paragraphs strategies
                Thank you Calwen. There is something, however i'm wondering: does Flash set for long document? Some people are advocating the use of Flash as a good alternative to HTML (see, for example, "Flash Applications Design Solutions" (Cheung and Bryant), but in fact, is it?

                PS: Cheung and Bryant don't say it is THE solution however. Just food thoughts here.
                • 5. Formatting paragraphs strategies
                  Calwen Level 1
                  Guy, I am working on a daily basis with Flash in the e-learning industry and my personal website is all about Flash but when I need information and purely information I want to get it quick and to be able to navigate my way to it quickly without having to wait for loading or look for the hidden button flying around the screen and here, to my opinion HTML reigns supreme. Most search engines are now going for the lightweight nearly empty web page with a text field and a search button, (Google was the first to get that). Point A is the user, Point B is the information he is looking for, it's best to have a straight line going from point A to point B without all those intermediate points that slow the essential goal which again is finding the information quickly.
                  1 person found this helpful