Solved

actionscript strings carriage return

Posted on 2006-07-12
3
1,064 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
Comment Utility
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
Comment Utility
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
Comment Utility
both of these methods worked great. thanks for the help
:)
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

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,…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.

763 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now