Solved

actionscript strings carriage return

Posted on 2006-07-12
3
1,070 Views
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

storename
address

may sound like a stupid question but how do i include a carriage return to bring the second string to the next line?
thanks
0
Comment
Question by:paulp75
3 Comments
 
LVL 37

Assisted Solution

by:CyanBlue
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;

CyanBlue
0
 
LVL 3

Accepted Solution

by:
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;
0
 
LVL 6

Author Comment

by:paulp75
ID: 17095546
both of these methods worked great. thanks for the help
:)
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
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 select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

830 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