Solved

actionscript strings carriage return

Posted on 2006-07-12
3
1,071 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
[X]
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
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: 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