actionscript strings carriage return

Posted on 2006-07-12
Last Modified: 2012-05-05
i would like to output strings on seperate lines from an xml file

_root.presentation.Retailers.waslide.waholder.text = this.firstChild.childNodes[i].childNodes[0].firstChild.nodeValue+this.firstChild.childNodes[i].childNodes[1].firstChild.nodeValue;

this outputs like this

storename address
but i would like a break between the lines

so it outputs


may sound like a stupid question but how do i include a carriage return to bring the second string to the next line?
Question by:paulp75
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 37

Assisted Solution

CyanBlue earned 300 total points
ID: 17092697
You could try adding the '\n' like this...

_root.presentation.Retailers.waslide.waholder.text = this.firstChild.childNodes[i].childNodes[0].firstChild.nodeValue + '\n' + this.firstChild.childNodes[i].childNodes[1].firstChild.nodeValue;


Accepted Solution

BishopNeo earned 200 total points
ID: 17093330
If you are putting this into a dynamic text field within a Flash clip you can use 'newline'.  Like so:
_root.presentation.Retailers.waslide.waholder.text = this.firstChild.childNodes[i].childNodes[0].firstChild.nodeValue + newline + this.firstChild.childNodes[i].childNodes[1].firstChild.nodeValue;

Author Comment

ID: 17095546
both of these methods worked great. thanks for the help

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Reduce the size of the Flash SWF file it executes 12 425
IE 11 Flash Player issue 7 262
Rotating Adobe pdf document 4 338
type of website 13 51
This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
Suggested Courses

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question