SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Zealot
    Join Date
    Aug 2003
    Location
    Great White North
    Posts
    172
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    FLASH/XML formatting question...

    Good morning,

    I have been experimenting with Flash /XML integration, using some of the various components in MX2004 Pro. It works like a charm, except, that I am not able to achieve the formatting I want.

    For example, if I have a few nodes:

    <text>text1</text>
    <text>text2</text>
    <text>text3</text>

    the result in the TextArea is: text1text2text3.

    What I would really like to be able to do is for line breaks after each node is parsed.

    eg.

    text1

    text2

    text3

    How would I go about achieving this?

    Thanks,

    cob
    hockeyunderground.net
    - Fantasy Hockey Depot

  2. #2
    SitePoint Wizard jim_morrison3's Avatar
    Join Date
    Apr 2004
    Location
    UK
    Posts
    2,324
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,
    You can achieve this by clicking on the "Render text as HTML" button in the property inspector of the dynamic textbox. Then in the part where you load the text in the dynamic textbox place <br> tag between the variables. Hope it helps.
    Good Luck!
    There are things known and Things unknown
    And in between are the Doors.
    I love hand Coding.

  3. #3
    SitePoint Zealot
    Join Date
    Aug 2003
    Location
    Great White North
    Posts
    172
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by jim_morrison3
    Hi,
    You can achieve this by clicking on the "Render text as HTML" button in the property inspector of the dynamic textbox. Then in the part where you load the text in the dynamic textbox place <br> tag between the variables. Hope it helps.
    Hi Jim,

    I am using the Text Area component, I don't think it works the same?

    Also, you mention variables, I'm a little confused, this app is created using strictly components (specifically: XML Connector, ComboBox and TextArea), there is no scripting that I can see. The ComboBox and TextArea are dynamically populated from an XML document.

    I'm sorry if I am misunderstanding...

    Thx

    COB
    hockeyunderground.net
    - Fantasy Hockey Depot

  4. #4
    SitePoint Wizard jim_morrison3's Avatar
    Join Date
    Apr 2004
    Location
    UK
    Posts
    2,324
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am using the Text Area component, I don't think it works the same?
    Hi again,
    Sorry i skipped that you did mention the TextArea component in your first post. In case of TextArea component you have to write the following line of code.

    myTextArea.html=true;

    For the second part of your question i thought you were simply connecting Flash with XML using XML object. So ignore that part coz that part is different.
    Good Luck!
    There are things known and Things unknown
    And in between are the Doors.
    I love hand Coding.

  5. #5
    SitePoint Zealot
    Join Date
    Aug 2003
    Location
    Great White North
    Posts
    172
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by jim_morrison3
    Hi again,
    Sorry i skipped that you did mention the TextArea component in your first post. In case of TextArea component you have to write the following line of code.

    myTextArea.html=true;

    For the second part of your question i thought you were simply connecting Flash with XML using XML object. So ignore that part coz that part is different.
    Hi JM... thanks for your reply

    That seemed to do the trick! I also modified my xml so that it utilized proper html tags.

    Thanks again!
    hockeyunderground.net
    - Fantasy Hockey Depot

  6. #6
    SitePoint Wizard jim_morrison3's Avatar
    Join Date
    Apr 2004
    Location
    UK
    Posts
    2,324
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey glad I could be of some help.
    Good Luck!
    There are things known and Things unknown
    And in between are the Doors.
    I love hand Coding.

  7. #7
    SitePoint Enthusiast
    Join Date
    May 2005
    Location
    Manchester, UK
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    On a similar subject I can't seem to get my Text Area component to work with a stylesheet, this is what I've got at the moment!


    taHistory0.html = true;
    taHistory0.wordWrap = true;
    taHistory0.multiline = true;

    var loadtextStyle = new TextField.StyleSheet();
    loadtextStyle.load("wygtimeline.css");
    taHistory0.styleSheet = loadtextStyle;

    taHistory0.setStyle("backgroundColor","0xF7F8F9");
    taHistory0.setStyle("borderColor","0xF7F8F9");
    taHistory0.setStyle("borderStyle","solid");

    If anybody has any ideas that would be great!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •