Adding Line Breaks And Paragraph Breaks In Dynamic Text - Best Method
I'm using dynamic text and wondering what is the best way (heck, any way) to mark line breaks or paragraph breaks. I'm curious about what Flash MX AS 1.0 is capable of/ supports. I have read a little about HTML enabbling and then using HTML tags, which is probably a good solution. Just wondering if there is something else, or if that is supported by AS 1.0 at all.
I have read a few threads on special characters (SC), including Moock's site, but line breaking doesn't seem to be part of SC.
And, I've read this, but it looks like it is for Action Script 2.0:
http://www.actionscript.org/forums/s...ght=line+break
Does anyone know off hand if AS1 supports CSS, or was that new in AS2.
-Thanks,
AB.
I hope everyone is not on holiday.
ActionScript.org Forums > ActionScript Forums Group > ActionScript 1.0 (and below)
Posted on: 05-30-2004, 04:34 PM
View Complete Forum Thread with Replies
Sponsored Links:
AS2 .. Adding Line Breaks In Dynamic Text
Hey there.
I've been poking around for an answer and I found some help here and on other forums, but the answers I found are not helping.
I have an app that loads random quotes from an external text file. The file liiks like this:
quote1=blah blah blah
"e2= blah blah blah
"e3= blah blah blah
All the way to 25 quotes total. I want to add line breaks in the text. Some answeres said insert
or
in the text like so:
"e4=This is a quote
from some dude (or
)
Also, I read that if you turn "render text as HTML" on, you could use <br> for line breaks.
I have tried all three options and all just display the extrea characters in my dynamic text when it pulls a quote.
Is there something I am missing? Is there an easier way to go about this?
Thanks in advance for your help!
View Replies !
View Related
Line Breaks In Dynamic Text
I'm using a dynamic text box to give information about items that the user selects. Is there a way to insert a line break (carriage return) in Actionscript.
Example:
onClipEvent (enterFrame) {
_root.imgText1.text="This is where I put the descriptive text for image 1. Some desciptions are rather lengthy and maybe I would like to insert a line break in this area of code... like maybe right here. The only problem is I don't know if such a thing can be done, or if it can, how to do it."
}
View Replies !
View Related
Line Breaks In Dynamic Text?
I have some text that goes into a dynamic text box and I would like to
break it. I would like to break it after the first sentence. I thought
the <br> might do it, but it seems not like this?
bodyCopy.errorText.text = "Username and password do not match.<br>Please
re-enter your username and password.";
Thank you!
View Replies !
View Related
Line Breaks In Dynamic Text Objects
All,
Forgive me this trivial question, but is there an easy way to insert a line break in a dynamic text field without using the HTML property?
I know you can set the text field's HTML property to true, which would allow you to use <br> tags, but that requires that you use a device font, and I would rather use an embedded, anti-aliased font.
In vb, you can put a "vbcrlf" in the middle of a text string to create the effect I'm looking for. Is there a similar trick in Actionscript?
Of course, you could also use two text fields, but my problem is that sometimes the field should include a line break or two, and sometimes it should not.
Many, many thanks in advance for your help and advice!
Cheers
View Replies !
View Related
Creating Line Breaks With Dynamic Text Boxes Using HTML?
I have an array with a series of informational text lines. I would like to place them in a status dynamic text box listing which ones have been processed. To do this I need to make a dynamic text box with line breaks after each item in an array. Here is my script so far:
imageClips = new Array();
imageClips = ["WindowsInit.jpg","CTRLA.jpg"];
I then have a dynamic text box with html enabled called:
Status
In my action script I have entered the following code:
Status.text = "<br>" + 1imageClips[0] + "</br>" + "<br>" + imageClips[1] + "</br>";
I want the first line to read "WindowsInit.jpg" in the list, and then break to the next line reading "CTRLA.jpg"
Whenever I run the script it does not work. Can someone tell me how to properly insert line breaks into dynamic text boxes using arrays of text with a line break?
Thanks,
Sam
View Replies !
View Related
[F8] Line Breaks In Dynamic Textbox
I'd like to output the value of multiple input textboxes to one dynamic textbox, but have the values separated by line breaks.
What is the operator for inserting a line break? Here's some code I'm working with.
submit.onRelease = function () {
alert.text = name.text + message.text;
}
How do I insert a line between name.text and message.text??
Any help would be appreciated. Thanks!
View Replies !
View Related
Line Breaks In Text Field?
Hello everyone,
Does anyone know if there is anyway to create line breaks in a text field. I have a large paragraph of text that I am inputting through actionscript. I don't want it to scroll along until the end of the text box, but would like to instruct it where to put the line breaks. Please don't tell me I have to put a seperate text box for each line!
I'm using MX Educational (Actionscript 1.0)
Thanks
Graeme
View Replies !
View Related
Finding Line Breaks In Text Field? HOW?
I am trying to find out how to detect a line break in a block of text in a text field. Like when you press the enter key once or twice. like this:This is one,:
this is two:
There must be a way? It's not a "space" character, but something else. Anyone have any ideas? Thanks - matt
View Replies !
View Related
:: ActionScript Text Animation -- Line Breaks?
I'm using the text effect I found in
ActionScript Text Animation , and the script works great.
My question is, is it possible to have line breaks? I tried adding spaces to end a line, but you'd have to wait for the script to read through the added spaces before the next line begins.
Thanks!
-zap
.:.·.:.·.:.·.:.·.:.·.:.·.:.·.:.·.:.·.:.
CARLO ERWIN V. ZAPATOS
Website Designer
SUYEN CORPORATION
Tel +63 2 887-2311, local 159
www.benchtm.comActionScript Text Animation
View Replies !
View Related
Extra Line Breaks In Text Loaded From XML
Hello all,
So I am loading some text from an XML file. It is a couple of lines, and it loads fine. But, the line breaks show up as more than one break. Actually, it seems like Flash sees it as one large line break or something. For example ...
<?xml version="1.0" encoding="utf-8"?>
<myData>
First Line
Second Line
Third Line
</myData>
... would show up as what looks like triple spaced lines. I was messing around with the ignore white space, but in AS3 that is supposed to be off by default I think. Plus I am not sure that even applys to what I am doing. Ideas?
- B
View Replies !
View Related
Line Breaks In Dynamically Loaded Text
Can any one help? I'm new to AS3, shakey at AS2 and in over my head. I have an external XML file I want to load elements of into a dynamic text field and in turn use the text listing as buttons to launch image and other XML files. I get the XML to load but either I get the first element, or all the elements in one line. How do I iterate through the list appending each element to the list? The sample below puts "Air Cleaner" in the text field. The child of "catpage" is the element I want to list.
//xml sample
<catagory>
<catsect>
<page>001</page>
<sorpage>012</sorpage>
<catpage>Air Cleaner</catpage>
</catsect>
<catsect>
<page>003</page>
<sorpage>014</sorpage>
<catpage>Brake Master Cylinder</catpage>
</catsect>
<catsect>
<page>007</page>
<sorpage>/data/xml/018.xml</sorpage>
<catpage>Clutch</catpage>
</catsect>
</catagory>
//AS3 Sample
var xmlPath:String = "data/xml/";
var priceListXML:XML;
var menuWords:String = "data/xml/menutest.xml";
var xmlFile:String = "014.XML";
var fileType:String = ".jpg";
var ltCatPage:Number;
var rtCatPage:Number;
var zoomImg:Number;
//Menu loader -- must include menu text and images
var xmlMenuLoader:URLLoader = new URLLoader();
var xmlMenuData:XMLList = new XMLList();
xmlMenuLoader.addEventListener(Event.COMPLETE, loadMenuXML);
xmlMenuLoader.load(new URLRequest(menuWords));
function loadMenuXML(e:Event):void {
xmlMenuData = new XMLList(e.target.data);
buildMenu(xmlMenuData);
}
function buildMenu(catagory:XMLList):void {
var menuText:XMLList = xmlMenuData;
menuList_txt.appendText(catagory.catsect.catpage.c hildren()[0]);
trace (menuText);
}
View Replies !
View Related
Creating Line Breaks In Multiline Text Fields
I have a multiline dynamic text field. Throughout my swf I want to add text to the field one line after another, sorta like a log file. So each time I add something I want to have a line break in the field then add some text. How can I do this? I see that flash uses a for line breaks in text fields, but that's one of the Flash characters which isn't allowed. Any ideas?
View Replies !
View Related
Scroller That Resizes And Fixes Text Line Breaks
I have seen this before either in the tutorials or movies section of Flash Kit. I just did a major search and could not find it.
-
I'm looking for a windows style scroller that scrolls an external text file. -
The window has a resize spot in the lower right corner that resizes the scroller and window while repositioning the text and the line breaks in the window.
View Replies !
View Related
Line Breaks Eats Away Parts Of The Input Text
I'm using some formmail script I found and it seemed to be working fine until recently I realized that it had been eating parts of the longer messages especially if there were line breaks. I thought setting a higher value for the multiline textfield's maximum characters will help, but it didn't.
I have this code in the frame where the form is.
Code:
stop();
_root.image.titlebar.gotoAndStop(2);
setProperty("_root.image.caption", _visible, "0");
scrollbar.setScrollContent("Message");
userName="";
userEmail="";
Message="";
errorMSG="";
ToName = "Z Architects";
ToEmail = "name@mail.com";
sendBtn.onRelease = function() {
if (!userEmail.length || userEmail.indexOf("@") == -1 || userEmail.indexOf(".") == -1) {
errorMSG = "Please enter a valid E-mail address";
} else if (!userName.length) {
errorMSG = "Please Enter your name before Sending";
} else if (!Message.length) {
errorMSG = "Please provide some feedback";
} else {
errorMSG = "Your email is now being sent please wait.";
loadVariablesNum("MailPHP.php", "0", "POST");
//gotoAndPlay("thankyou");
}
};
and then in the MailPHP.php
Code:
<?
$ToSubject = "Feedback to Z Architects";
$EmailBody = "Name: $userName
Email: $userEmail
Message:
$Message
";
$EmailFooter="
------------------------------------------------------------------------------------
This message was sent by: $userName from $REMOTE_ADDR via the Flash website";
$Message = $EmailBody.$EmailFooter;
if(mail($ToName." <".$ToEmail.">",$ToSubject, $Message, "From: ".$userName." <".$userEmail.">"))
{
Print "_root.contactPanel.errorMSG=Your message was successfully sent.";
}
else
{
Print "_root.contactPanel.errorMSG=Error sending your message.";
}
?>
View Replies !
View Related
Preserving Line-breaks When Copying Text To The Clipboard
I have a simple little program that i need to copy the text from this output box into the clipboard. I know about using System.setClipboard(text); but it's not preserving the linebreaks, or the "
". I'm filling this textbox from an array basically, so its like this:
Code:
for(i=0;i<array_length;i++){
output.text+=items[i]+"
";
}
it combines everything into just one long line...
View Replies !
View Related
Line Breaks Ignored When Using HTML Text CSS And Embedded Fonts
Anyone come accross this.
When using a StyleSheet with html text in a dynamic textfield with embedded fonts line breaks are ignored. It is as if TextField.condenseWhite is being set to true. Essentially the <p> tags are being treated as a <br/> tag.
If I dont embed fonts it works fine. Another weird thing is if i add an empty paragraph <p></p> between the first two paragraphs it makes any subsequent paragraph behave correctly. e.g.
<p>first paragraph text here</p>
<p>second paragraph text here</p>
<p>third paragraph text here</p>
displays as if there are <br/> between each one.
But
<p>first paragraph text here</p>
<p></p>
<p>second paragraph text here</p>
<p>third paragraph text here</p>
behaves correctly even for the third paragraph.
Here is the code i am working with (using XML as i am dynamically populating the textfield from XML)
any help much appreciated
UPDATE:
After reading http://www.kirupa.com/forum/showthread.php?t=307326
i tried the same experiment using a TF drawn in the IDE, the results for each, even though the TextFields are essentially the same are totally different.
updated CODE accordingly - just need a TF on stage, called "ideTextField" with font 'Arial'
Attach Code
package
{
import flash.text.Font;
import flash.text.TextField;
import flash.text.AntiAliasType;
import flash.display.MovieClip;
import flash.text.StyleSheet;
public class test extends MovieClip
{
public function test()
{
//get font
var arial:Font = new _Arial();
//get textfield from stage
var _IDE_TextField:TextField = TextField(getChildByName("ideTextField"));
//setup stylesheet
var _styles:StyleSheet = new StyleSheet();
var p_StyleObj:Object = new Object();
p_StyleObj.fontSize = "12";
p_StyleObj.color = "#000000";
p_StyleObj.fontFamily = arial.fontName;
_styles.setStyle("p", p_StyleObj);
var alink_StyleObj:Object = new Object();
alink_StyleObj.color = "#7CCCBF";
alink_StyleObj.fontWeight = "bold";
alink_StyleObj.textDecoration = "underline";
//
_styles.setStyle("a:link", alink_StyleObj);
var ahover_StyleObj:Object = new Object();
ahover_StyleObj.color = "#7CCCBF";
ahover_StyleObj.fontWeight = "bold";
ahover_StyleObj.textDecoration = "none";
//
_styles.setStyle("a:hover", ahover_StyleObj);
var aactive_StyleObj:Object = new Object();
aactive_StyleObj.color = "#7CCCBF";
aactive_StyleObj.fontWeight = "bold";
aactive_StyleObj.textDecoration = "none";
//
_styles.setStyle("a:active", aactive_StyleObj);
//dynamic textfield
var tf:TextField = new TextField();
tf.styleSheet = _styles;
tf.width = 500;
tf.height = 200;
tf.border = true;
tf.embedFonts = true;
tf.antiAliasType = AntiAliasType.ADVANCED;
tf.selectable = true;
tf.multiline = true;
tf.wordWrap = true;
tf.condenseWhite = false;
//ide textfield
_IDE_TextField.styleSheet = _styles;
_IDE_TextField.width = 500;
_IDE_TextField.height = 200;
_IDE_TextField.border = true;
_IDE_TextField.embedFonts = true;
_IDE_TextField.embedFonts = true;
_IDE_TextField.antiAliasType = AntiAliasType.ADVANCED;
_IDE_TextField.selectable = true;
_IDE_TextField.multiline = true;
_IDE_TextField.wordWrap = true;
_IDE_TextField.condenseWhite = false;
//
XML.ignoreWhitespace = false; //required as remove spaces between html tags
XML.prettyPrinting = false;
var textXml_doesnt_work:XML =
<text>
<p>first paragraph <a href="www.google.com">text</a> here</p>
<p>second paragraph text here</p>
<p>third paragraph text here</p>
</text>;
var textXml_othertags_ignored:XML =
<text>
<p>first paragraph <a href="www.google.com">text</a> here</p>
<br/><br/><br/><b></b><font></font><br></br>
<p>second paragraph text here</p>
<p>third paragraph text here</p>
</text>;
var textXml_works_forAS_textfield:XML =
<text>
<p>first paragraph <a href="www.google.com">text</a> here</p><p/><p>second paragraph text here</p><p>third paragraph text here</p>
</text>;
var textXml_works_forIDE_Textfield:XML =
<text><p>first paragraph <a href="www.google.com">text</a> here</p><p>second paragraph text here</p><p>third paragraph text here</p></text>;
var textXml_works_but_with_extra_paragrahs:XML =
<text>
<p>first paragraph <a href="www.google.com">text</a> here</p>
<p/>
<p>second paragraph text here</p>
<p>third paragraph text here</p>
</text>;
//grab the html from inside the <text> tags
//tf.htmlText = textXml_doesnt_work.children().toString();
//tf.htmlText = textXml_othertags_ignored.children().toString();
//tf.htmlText = textXml_works_forAS_textfield.children().toString();
tf.htmlText = textXml_works_forIDE_Textfield.children().toString();
//tf.htmlText = textXml_works_but_with_extra_paragrahs.children().toString();
//_IDE_TextField.htmlText = textXml_doesnt_work.children().toString();
//_IDE_TextField.htmlText = textXml_othertags_ignored.children().toString();
//_IDE_TextField.htmlText = textXml_works_forAS_textfield.children().toString();
_IDE_TextField.htmlText = textXml_works_forIDE_Textfield.children().toString();
//_IDE_TextField.htmlText = textXml_works_but_with_extra_paragrahs.children().toString();
trace(tf.htmlText)
addChild(tf);
}
}
}
Edited: 08/29/2008 at 07:22:00 AM by moonface
View Replies !
View Related
Flash Putting Too Many Line-breaks In Dynamically-loaded Text...
Here's how it goes:
- User types into multiline textbox in HTML form
- Text gets inserted into MySQL db
- Text is retrieved via PHP and passed to Flash
- Flash displays it in a textbox
The thing is, there are always too many line-breaks. For example, where the user has typed one line-break, Flash inserts 2 or 3. So basically, there are huge spaces between lines/paragraphs.
When I print the text to HTML file via PHP, it looks fine.
Is there a step I'm missing?
View Replies !
View Related
Strings Panel Deleting Text + Removing Line Breaks
Does any one have a solution to the strings panel deleting text when using it for multilanguages? (I have tried the 7.2 upgrade. It still is not stable.)
Also it is removing the returns (line breaks) from my lovely formatted dynamic text boxes. Something a client won't put up with. Any solutions to this?
regards
View Replies !
View Related
Dynamic Textbox _y Per Dynamic Line Breaks
I would like to feed variable character lengthed text data to text boxes in my dynamically placed buttons (touch screen kiosk). In my movies i am reading from either xml or db via FSP. I want the text in the text boxes (which label the buttons) to aways be centered in the button graphic, no matter how many lines. I imagine i would set up a conditional and set the _y of the text field per the amount of new line breaks that were dymically created by means of which are still a mystery to me..
Is there a way to achive this without manually adding "
" or whatever your prefered linebreaker is? I've done very similar things, but i've aways had to manually build and associate an array in flash to assure appropriate line breaking. Now i'm dealing with many hundreds of buttons and existing data (such as the strings i would like to label the buttons with)
this is one of, if not the last hurtle for me as far as how dynamic i want my projects to be...! please help!
btw, im using FlashMX
View Replies !
View Related
External Text Files In Flash: Getting The Line Breaks To Display Properly (HELP)
Jackass linebreaks!
nightmare. does anyone know of a way to get Flash to read the line breaks in Windows text files as single line breaks, and not double line breaks? I know about Flash thinking that "
" is a double line break, so I need to figure out a way to get around that using the code I have:
Code:
var XMLfile = "article_setup.xml";
importXML = new XML();
importXML.varTarget = this;
importXML.ignoreWhite = true;
importXML.onLoad = function (success)
{
if (success)
{
var vt = this.varTarget;
var root = this.firstChild;
vt.articleObj = new Object();
allArticles = root.childNodes;
for(var i=0; i<allArticles.length; i++)
{
article = allArticles[i].childNodes;
vt.articleObj["article" + i] = new Object();
vt.articleObj["article" + i].articleName = article[0].firstChild;
vt.articleObj["article" + i].articlePath = article[1].firstChild;
}
var i;
for (i=0; i<allArticles.length; i++)
{
listBox.addItem(vt.articleObj["article" + i].articleName);
}
select.onPress = function()
{
var myVariable = new LoadVars();
myVariable.onLoad = function(success)
{
if (success)
{
addText(this.article);
}
else trace("Error loading content.");
}
myVariable.load(vt.articleObj["article" + listBox.getSelectedIndex()].articlePath);
}
}
else
{
trace("ERROR PARSING XML");
}
};
function addText(textContent)
{
pbox.htmlText = textContent;
}
importXML.load(XMLfile);
stop();
View Replies !
View Related
Strange Breaks In Dynamic Text
I've loaded my external text into my mC, and can access it with no problem. However, I'm getting very strange line breaks that aren't indicated anywhere in my original text file. It's a single and continuous sentence all on one line. Sometimes the break is at the end of the dynamic text field, like it's supposed to be, but other times it breaks in the middle of a line without any sort of apparent regard for punctuation or anything, so I don't THINK that's it (though it could be, I suppose).
I thought that my Word Wrap option in Notepad might POSSIBLY be messing it up, so I turned that off, but it didn't change anything.
Any ideas?
View Replies !
View Related
[CS3] Prevent Word Breaks In Dynamic Text Box
I am working with arabic text that is being pulled in from xml into dynamically created text boxes, the only issue is:
when the text is wrapped to the next line, words are being "split" or "broken" in two, making no sense to the reader. is there a way to test if a word is being broken and then force the whole word to the next line?
I have messed with searching for spaces and amount of characters on a line, but the results have been multiple breaks happening : ie text looking like this:
hello how are
you
doing?
any thoughts on this?
IMS
View Replies !
View Related
XML, Get Rid Of Line Breaks?
i have this XML that i am importing for use as a nav:
code:
<subNav>
<market>Real Estate Merchandising
<example>Example 1</example>
<example>Example 1</example>
<example>Example 1</example>
<example>Example 1</example>
<example>Example 1</example>
<example>Example 1</example>
</market>
</subNav>
the problem that i am having is that the line break after 'Merchandising' is not needed. How can i get rid of this via code in flash?
thanks
View Replies !
View Related
[F8] Line Breaks
Hello! This is my first ever post, and I have to say I am a total flash newbie. I would have posted this in the newbie section but I feel that it may be better answered by a 'coder'. I think!
I've built a website, i've kind of somehow got it to work (I'm not a website developer at all really, just a guy who like fiddling around and making things!)
here is the site: www.audio-freaks.com
I have two problems/questions.
1) In the contact page, I have created a way to auto-populate an email. It works ok & gets the job done. BUT when I tried it on a friends computer, it no longer worked right - it didn't recognise the line breaks. I have since discovered that on 'outlook' it works fine, and on 'outlook express' or mac 'mail' it has no line breaks. Please could somebody tell me a way to make it work regardless of system/email client. Basically the email body contains a string that contains line break symbols (i've tried
etc )
2) I've used the scrollplane component to make my scroll zones. It works fine, but looks really ugly! I've tried to get my head round skinning but just can't seem to get it to work. Could somebody please help me change the colour of those dull grey bars? Doesn't need to be flashy, just to darken them & make them more contrasty would be fine.
If anybody could help me with any of these I would be very grateful.
thanks
Dale
View Replies !
View Related
PHP To Txt Line Breaks?
Hi all
can someone please help me to rewrite this php code so that the resulting txt file has a line break after each variable. right now it is a single line 600km's long.
<?php
$userName = $_POST['userName']; /
$userEmail = $_POST['userEmail'];
$userScore = $_POST['userScore'];
$userCity = $_POST['userCity'];
$userSex= $_POST['userSex'];
$userNews= $_POST['userNews'];
$userQone = $_POST['userQone'];
$userQtwo = $_POST['userQtwo'];
$userQthree = $_POST['userQthree'];
$userQfour = $_POST['userQfour'];
$userQfive = $_POST['userQfive'];
$userQsix = $_POST['userQsix'];
$userQseven = $_POST['userQseven'];
$userQeight = $_POST['userQeight'];
$add = $userName .
"<" . $userEmail . ">".
"<" . $userScore . ">".
"<" . $userCity . ">".
"<" . $userSex . ">".
"<" . $userNews . ">".
"<" . $userQone . ">".
"<" . $userQtwo. ">".
"<" . $userQthree . ">".
"<" . $userQfour. ">".
"<" . $userQfive . ">".
"<" . $userQsix . ">".
"<" . $userQseven. ">".
"<" . $userQeight. ">;",;
$open = fopen('users.txt', 'a');
$write = fwrite($open, $add);
if($write) {
echo "&verify=success&";
} else {
echo "&verify=fail&";
}
?>
thanks for your help
J
View Replies !
View Related
Line Breaks
I'm trying to figure out if it's possible to count the number of line breaks so that if that number is greater than the number of lines a dynamic text field will display a scroll next and previous navigation will appear. Any help would be appreciated. I searched through the forums but didn't have any luck finding what I was looking for.
View Replies !
View Related
Line Breaks?
The goal = to have different formatted text all in the same text field.
I am inserting text into seperate columns in a XLS Excel spreadsheet. There are 5 columns and each column will have a different formatting to it (which will be applied with CSS later). I turn the XLS into XML with a converter. I then import the XML into flash. I assign each text (from each column) to it's own variable call (so I have 5 variables for each type of formatting).
I want each of the five text types to be it's own paragraph in one final text field in flash. I am attempting to add line breaks using the HTML tag <BR>. I have told the text box on stage to render text as HTML. Here is the Code I have written (see specifically the blue):
//--------------------------------------------------------------------------<initialize XML>--------------------------------------------------------------------------\
var myXML:XML = new XML();
myXML.ignoreWhite = true;
//--------------------------------------------------------------------------</initialize XML>-------------------------------------------------------------------------\
//-------------------------------------------------------------------------------<call XML>---------------------------------------------------------------------------\
myXML.onLoad = function(success) {
if(success) {
var BOLD12PT = myXML.childNodes[0].childNodes[0].attributes.BOLD12PT;
var NORM10PT = myXML.childNodes[0].childNodes[0].attributes.NORM10PT;
var BOLD12PTUNDERLINE = myXML.childNodes[0].childNodes[0].attributes.BOLD12PT1;
var RED10PT = myXML.childNodes[0].childNodes[0].attributes.RED10PT;
var ITALICIZED10PT = myXML.childNodes[0].childNodes[0].attributes.ITALICIZED10PT;
loadTxt = function() {
myTextField.text = BOLD12PT + "<BR>" + NORM10PT + "<BR>" + BOLD12PTUNDERLINE + "<BR>" + RED10PT + "<BR>" + ITALICIZED10PT;
}
loadTxt();
} else {
myTextField.text = "Error";
}
}
myXML.load("CSS_Testing.xml"); //XML Location
//-------------------------------------------------------------------------------</call XML>--------------------------------------------------------------------------\
stop;
This is the output I get when I execute the SWF:
This text should be bold 12 pt<BR>This text should be default 10 pt.<BR>This text should be 12pt bold and underlined<BR>This text should be default red 10 pt<BR>This text should be italicized 10 pt.
I will worry about the CSS formatting next but why are my line breaks not working?
-Garebear
View Replies !
View Related
Line Breaks Within XML
I have been searching around for the solution on how to put a line break in an XML file...I went through the xml tutorial, but would like to extend its functionality and insert line breaks and perhaps lists (line breaks would be fine for now)
Any help would be appreciated!
View Replies !
View Related
Xml Line Breaks
Hi,
I'm trying to get line breaks in my xml document to show up in my swf. <br> tags dont work, /n doesnt do anything.
I have ignore white space in my actionscript. Anyone have any ideas? Thanks.
Rob
View Replies !
View Related
Loadvariables - Line Breaks
I have txt file like this -
txt=Establish a share vision
and work towards it!
In textfield it displays huge line spaces, but I have only one line break. This is what I got from debugger -
"Establish a share vision
and work towards it!"
Flash inserts automatically an
but also an
- what is
?
How can I display the loaded text correctly in textfield?
View Replies !
View Related
AS Panel Line Breaks
Is there any way of being able to write line breaks without a "statement ending" error?
EX:
Code:
var myText:String="
This is my text with
line breaks
and not ends.
";
This abviously gives errors, but im wandering if theres a way to edit the AS error handling or add some sort of syntax to act like PHP and see the line breaks as
and not as statement ends.
View Replies !
View Related
[F8] XML Loading With Line Breaks.. PLEASE HELP
Hello There,
in my application i am loading 5 to 10 XML files from the same folder of SWF..
its done in Flash 8..
but my client says.. they dont need to see (10) XML files in the folder.. they need a swf file only..
is there any way to use that in flash.. as text variables ,etc ?
i tried to change the code from . this to
var gXM = new XML();
gXML.onLoad = myLoad;
gXML.load("myxml.xml");
function myLoad(ok) {
.............
....................
------------- i chagned the code to
xmlStr("<xml><object>...<object/></xml>"); - <<<< its not working for multi lines XML .. its working for 1 line only. (line breaks)
var gXML= new XML(xmlStr);
//gXML.onLoad = myLoad;
myLoad();
Thanks a lot...
please help me..its urgent :-)
View Replies !
View Related
Line Breaks In Strings
Hi, I visit this site alot and I thought I would register and ask for some help!!
okay I have a string variable
var infobox:String;
and I put the dynamic text box on the stage assign the VAR name _root.infobox
and make the box large enough for a few lines of txt.
So I insert the info txt by using
_root.infobox = ("Oh so you have traveled far from another Lords estate and one of you companians has been...");
and when I test it, I noticed that the dynamic txt box does not Auto break or wrap it. So it goes off the Readable area. Which I why I need some help on making line breaks for this.
Any contenders?
View Replies !
View Related
Textfields And Line Breaks....
Im not sure if anyone can help me, but could possibly be something small...
Im building a Flash application, and Input textfields are used to pass text data to a mySQL database, im also using FPDF to convert the data from the mySQL database to a PDF form on the fly...
the main process is fine, but when the user enters text into the input fields (these are flash fields) and clicks the submit button the database appears fine with the submitted text with correct line breaks... but in the PDF all the line breaks are ignored? it's only fixed when i log into PHPmyAdmin and click "go" (i.e. save) on each record... i don't even have to modify the text data in the database but just save the database again as though i have edited something but really i haven't. Seems quite wierd?
the problem is whether it is a Database problem or a Flash problem?
I have no idea...
View Replies !
View Related
HTML In XML And Line Breaks
Hi all,
Have trawled various forums and tried every possible combination but cannot find a solution to my problem:
I have an XML file containing some simple HTML markup. The HTML contains both bold text and line breaks. Something like this:
Code:
<data>
<message><p>This is some <b>bold</b>text and this <br/> is a linebreak</p>
</message
</data>
I am putting this in a text field using:
Code:
textField.htmlText = xml.message
I cannot achieve both bold text and line breaks. I eiher get bold text and no line breaks or line breaks before and after the bold text.
I have tried converting to the text to a string, putting the HTML block into CDATA (that is, everything between the <message> tag). I have tried every possible combination using textField.condenseWhite, XML.prettyPrinting, ignoreWhitespace etc etc. I have tried putting the xml node straight into the textField, both with CDATA and no CDATA, no difference. I have used both E4X and "normal" xml parsing. I am not using embedded fonts but system fonts. I have put multiple <br/> tags in but they get ignored if I put CDATA around, if i remove the CDATA I get line breaks all over the place. No CDATA and prettyPrinting removes line breaks after the bold but also removes the "real" line breaks (the <br/> tag) as well.
I want to be able to have both bold text and line breaks where I want them.
I'm going crazy here, anyone has any suggestions? Do I have to write my own parser for this simple HTML text?
Thanks!
View Replies !
View Related
|