A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: XML new line?

  1. #1
    Junior Member
    Join Date
    Jan 2007
    Posts
    27

    XML new line?

    XML new line?

    Hi all,

    I have a simple vertical nav menu by attaching MC's using an XML file. The names on the MC's come from the name attribute in the XML file, so the names read 'First Button', 'Second Button' etc., is it possible to put a line break in so it would read

    First
    Button

    Second
    Button etc.

    instead of

    First Button

    Second Button

    XML file
    Code:
    <cart>
    	<btn name="First Button" color="0xffcc00" />
    	<btn name="Second Button" color="0xffcc00" />
    	<btn name="Third Button" color="0xffcc00" />
    	<btn name="Fifth Button" color="0xffcc00" />
    	<btn name="Sixth Button" color="0xffcc00" />
    </cart>

  2. #2
    Senior Member
    Join Date
    Jul 2001
    Location
    Planet Earth
    Posts
    298
    put the html for a line break in and render the text on the menu as HTML.
    ---
    Thinking outside of the box will get you fired if the "box" is strict budget.

  3. #3
    flashguy
    Join Date
    May 2005
    Location
    In the mountains
    Posts
    341
    That's not necessary to render text as HTML.
    Just add in your XML text the code & # 10 ; (remove the spaces)
    wherever you want a single line break, like this:
    Code:
    <cart>
    	<btn name="First& # 10 ;Button" color="0xffcc00" />
    	<btn name="Second& # 10 ;Button" color="0xffcc00" />
    	<btn name="Third& # 10 ;Button" color="0xffcc00" />
    	<btn name="Fifth& # 10 ;Button" color="0xffcc00" />
    	<btn name="Sixth& # 10 ;Button" color="0xffcc00" />
    </cart>
    PS: I needed to add the spaces otherwise the HTML renderer for this page was interpreting it as the line break - LOL.
    Visit my business at http://www.ballooncreator.com - Software Tool For Party Balloons Online Design!

  4. #4
    Junior Member
    Join Date
    Jan 2007
    Posts
    27
    Thanks yanmoura thats works perfect

  5. #5
    flashguy
    Join Date
    May 2005
    Location
    In the mountains
    Posts
    341
    You welcome!
    Visit my business at http://www.ballooncreator.com - Software Tool For Party Balloons Online Design!

  6. #6
    Junior Member
    Join Date
    Apr 2009
    Posts
    2
    yanmoura, thank you very much for this hint, I was looking for this everywhere on the net and couldn't find it.

    Thanks again.

  7. #7
    flashguy
    Join Date
    May 2005
    Location
    In the mountains
    Posts
    341
    :d
    Visit my business at http://www.ballooncreator.com - Software Tool For Party Balloons Online Design!

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center