Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash








Line Breaks In Dynamic Text Field


How do you do it. I basically want to be able to put double spaces between my paragraphs.

This is how my text field is set

ActionScript Code:
set (myTextField, "A bunch of text here");




KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 02-29-2004, 06:02 PM


View Complete Forum Thread with Replies

Sponsored Links:

Line Breaks In Dynamic Text Field
How do you do it. I basically want to be able to put double spaces between my paragraphs.

This is how my text field is set

ActionScript Code:
set (myTextField, "A bunch of text here");

View Replies !    View Related
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.

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
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
Grrr ... Line Breaks In Dynamic Text
... how go about it? Pressing "enter" doesn't give me a paragraph or line break. Instead, I get error messages.

Tne text is in

On clip event (load) ... variablename="mytextbutnolinebreakpossible"

View Replies !    View Related
Sending Text To PHP But I Need Dynamic Line Breaks
Sending text from Flash to PHP e-mailing script but I need dynamic line breaks in my string that I send to the script. How do you create dynamic line breaks in Flash. Anybody have an idea? (<br> doesn't work either)

View Replies !    View Related
Adding Line Breaks In Dynamic Text
It seems like it should be easy, but I am trying to add hard line breaks to text strings that I am building dynamically, and can't find the right code to insert these breaks. Any help would be appreciated

View Replies !    View Related
Removing Line Breaks From A Dynamic Text Box?
I've got a text box with stuff coming from an xml doc.

it will onyl be about 2 lines but I dont know if there is line breaks before or after the text. I need to get rid of them

is there anyway in flash I can set flash to ignore any breaks?

View Replies !    View Related
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
&quote2= blah blah blah
&quote3= 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:

&quote4=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 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
Line Breaks In Email Form Field
Hi,

I don't know if you'll be able to help me with this or not, but here's my problem.

I've been using a Perl "form to email" script that works just fine using html forms. Now I've created a Flash form and I'm using the same script to process it, and everything is working hunky dory except for the "message" area which is a multiline text field. When filling out the form, it wraps properly and I can create line breaks with the Enter key, but when it comes through to my mail, the message area has lost those line breaks. The rest of the fields are separated by line breaks, so it's something with this message area that's not recognized the same as a <textarea>. I'm wondering if this an issue with the script or with Flash? As I said, a normal html <textarea> comes through formatted with line breaks just fine.

Does anyone have a suggestion about this?

Thanks very much,

View Replies !    View Related
New Line In Dynamic Text Field
flash mx

i have a multiple line dynamic text box on stage and somewhere in another mc on the stage has a box that sets the value of that text box

on(release)
{
_root.textbox = "text here";
}

how can i do like a new line in the actionscript, so that it displays something like:

text
here

in the textbox?

please help...

View Replies !    View Related
Line Count Of Dynamic Text Field?
Hello,
I have a dynamic text field that gets lots of different texts sent to it. what I want to be able to happen is if the loaded text goes over 3 lines some scroll bars to appear.

Is there away I can count the amount of lines in a the dynamic text box.

I have messed around with it, but all the values I get back are from the original text from authoring mode and not the dynamic txt loaded into it.


thanks
Kaan.

View Replies !    View Related
Mousing Over Which Line In A Dynamic Text Field
Description
List of users will show up in scrolling text field. When the mouse is over a line of text (the usersname) it lights up (changes color for that line) and when clicked returns the text in that line (the usersname).

I did this years ago in Director using the mouseline function but I can't figure how to do it in flash. Can anyone point to an example of clue me into a way to do this?

-- thanks

View Replies !    View Related
Breaking Line In Dynamic Text Field
Hello guys,

Please help. I have an XML with a node, let's say like this:

Code:
<ROW text="This is a line which needs to be broken right here /n to go on from the other line"></ROW>
How can I break the line exactly where the /n is after I loaded this XML? Or how to change the XML to get this in the easiest way?
Thanks a lot for any comments, opinions, help, etc!

Poco

View Replies !    View Related
Target The First Line Of A Dynamic Text Field
I have a dynamic text field that is loading xml (specifically 3 lines). It loads them fine, however, I can't figure out a way to bold the first and only the first line of the text box. Is there a way to do this?

View Replies !    View Related
Detect A Line Break In A Dynamic Text Field
I'm bringing in some data dynamically and need to detect if there is a line break after it has been placed in the text field. If there are none, I need to reposition the text box.

Found this code on another site, but can't seem to get it to work:


Code:

lineBreak = MainMovie.Cat2.indexOf('
');

if (lineBreak > -1) {
trace("yes")
}

else {
trace("no");
}




Thanks for your help!

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
Multi-Line, Word Wrap Dynamic Text Field Question...
Hi gang -

I have Dynamic Text Field that receives info via .asp. The text field is set to Word Wrap and MultiLine. In my test environment I have a .txt file named the same as my .asp page which provides data to display in the field. When I test movie, the information appears as intended with multiple lines of text, no problem. When I put it "live" it grabs the info by .asp no problem, but the textfield is not honoring the word wrap/multiline settings, on the PC (which is odd in and of itself, Mac displays properly so I know the text gets into the Flash). It is basically only displaying what can fit on one line of a multi-line text field. (The display field is large enough to handle 3 lines of text.) Now I have used this process in dozens of sites doing the same thing, the same way. For some reason, which I cannot ascertain, this textfield is not working on the PC and I can't figure out why.

Has anyone else had a similar problem? I'm at a loss atm so any help is much appreciated.

View Replies !    View Related
Importing XML Data And A Carriage Return (new Line) Into Dynamic Text Field
Regarding importing XML into Flash, I am wondering if anyone knows a way to add a carriage return (a new line) at a certain point inside one single XML element (ie. something like: <abc> line one ??? line two </abc>. The one thing I got to work was to make my variable point to one element in the xml, then add + "

" then add text from another element. However this is annoying because for each text box I will have to know exactly how many paragraphs there are so that I can add the right amount of new lines and references to new elements when assigning the dynamic text's variables value. Any help offered would really be appreciated.

View Replies !    View Related
Importing XML Data And A Carriage Return (new Line) Into Dynamic Text Field
I recently read the great tutorial on importing XML into Flash at http://www.kirupa.com/developer/acti...dataflash5.htm.

I am wondering if anyone knows a way to add a carriage return (a new line) at a certain point inside one single XML element (ie. something like: <abc> line one ??? line two </abc>. The one thing I got to work was to make my variable point to one element in the xml, then add + "

" then add text from another element. However this is annoying because for each text box I will have to know exactly how many paragraphs there are so that I can add the right amount of new lines and references to new elements when assigning the dynamic text's variables value. Any help offered would really be appreciated.

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
HELP: How To Detect Line Number/string Under Mouse In A Static/dynamic Text Field
Hi folks,

Is there a way to detect the line number/string under the mouse in a static/dynamic text field, like we can do in Macromedia Director?

Need help urgently.

Thanks in advance.

Yossarian,
Mumbai, India.

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
Get Index Of Line Breaks In Input Text
I cant seem to be able to break apart an input text fields value into segments based upon line breaks. Can anyone point me in the right direction?

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
Getting Rid Of Extra Invisble Characters Which Create Double Line Breaks In Text
Hi

These characters are created in Notepad when you hit 'Return', making a single line break a double line break when the txt is imported into the swf and viewed off line (online, there actually is no problem, but I'm making a CD presentation).

Does anyone know a method to get rid of these unseen, unwanted characters?

(BTW, %0A at the end of the line does not solve the problem )

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
Multi-line Text Field Auto Line Break
When a Dynamic Multiple line text field is used in Flash CS3, it has a very annoying feature that auto inserts a line break at the end of inserted text. It also auto inserts a line break if no text is entered too.

I'm having a problem with this because the text is being saved from flash to a text file on the desktop. With every multi-line text field there's a nasty looking line break.

Any way of "turning off" this auto-line-break-at-the-end feature?

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
Trying To Pass Text From Form Text Field To A Flash Dynamic Text Field
Hi, I was hoping someone might enlighten me as to how/if I can do this...

Currently I'm using javascript which works fine to pass text from textfield A to textfield B:


Code:
window.onload=function()
{
document.forms.form1.shirtText.value=document.forms.form1.KitGroupID_16_TextOption_38.value
}
Is there a way to pass the textfield A text to a dynamic text input (flash) as I'd like to use the font embedding flash offers. I can make it work when loading a value from a txt file but I'm not sure how to access the value identified above as KitGroupID_16_TextOption_38 and make it appear in a dynamic input box. Eventually I might want to have 3 font choices for the user but I'd like to just see if I can get this working properly first.

Your help/advice would be greatly appreciated,

-Scott

View Replies !    View Related
Long Text Doesn't Fit Inside Single-line Input Text Field
Hi, I've been browsing these forums for a long time but this is my first post.

I'm creating an interface by which a user can design and order their own customized decal. Please see my example (I've added my script at the bottom of this post):
http://www3.sympatico.ca/sin.young/decaldesigner.html

My issues are:

1. I've set the character limit to 21, but if you were to type in 21 "W"s into the input field for whatever reason, or choose a wider font, the text shifts to the left and some of the characters become hidden as they don't all fit. I'd like to make the width of the text to always fit inside of the width of the white area. I can't figure out how to make this work.

Here's an example that does pretty much what I'm trying to describe: www.stickerjunkie.com.


2. I have the Standard Colors combo box working perfectly but can't seem to get the Fonts combo box working.

Any hints or links to actionscript tutorials/help that might be useful to my predicament is extremely appreciated.

// display colors and formatting
decalColor = new Color(decal);
color1 = new Color(decalColor);
//
function changeColor(comp) {
decalColor.setRGB(comp.getSelectedItem().data);
}
//Standard Colors array
standardcolors = [{label:'STANDARD COLORS'},
{label:'White', data:0xffffff},
{label:'Black', data:0x000000},
{label:'Silver', data:0x9c9c9c},
{label:'Gray', data:0x636b73}];

collistStandard.setDataProvider(standardcolors);
collistStandard.setSelectedIndex(0);
collistStandard.setChangeHandler('changeColor');
//
//Fonts array
myfonts = [{label:'FONTS'},
{label:'Arial', data:'Arial'},
{label:'Serpentine', data:'Serpentine'},
{label:'Enviro', data:'Enviro'},
{label:'Forte', data:'Forte'}];

fontlist.setDataProvider(myfonts);
fontlist.setSelectedIndex(0);
fontlist.setChangeHandler('');

View Replies !    View Related
How To Keep Text Field Text Values After Moving In Time Line?
I'm trying to to make flash application that requires the user to input data on several keyframes in the time line. I have buttons that take the user back and forth between the different keyframes so a user can input the needed data in what ever order they wish and/or go back and change it if they want.

My problems is, that as soon as the user clicks the button to go to another point in the timeline, and they come back, those input textfields that they entered data in are now empty again.

I hope that all makes sense. It seems that there must be an easy way (or even a hard way) to prevent this, and get these fields to retain the input data.

Any help would be GREATLY Appreciated!!!!!

Thanks in Advance!

View Replies !    View Related
Line Break Or Line Feed For Dynamic Text
I am usin a textArea so now it is different than the last post about styles.
This text is dynamic and is assigned from within the Flash file it resides.
It comes from a list selection listener and I want to pre-format it with line breaks.

Since it resides in the file I will be using a textArea with HTML on to get the line breaks.
But now I can't Style it the same way with the setStyle methos

Currently I have one line is like this.

myNotes.text = "This is Line one<br>This is another Line<br>and another line";



Any help would be appreciated.

Thank you,
WBell





























Edited: 01/24/2009 at 12:49:08 AM by W_Bell

View Replies !    View Related
Loading Dynamic Text Breaks Formmail Forms [renamed]
This matter is something I haven't been able to solve for long and now I'm really desperate to find out an answer.
Here's a link to a very simple zip file (as example) containing the conflictive fla and other files, for those of you who may want to have a look at it.

TO SIMPLIFY THINGS:
It seems that whenever I use a couple of AS instructions to load some Dynamic text from a text file, Forms which are based in formmail, stop working (no matter if these forms are made of dynamic or static text). Why??

INTO MORE DETAILS:
In the attached fla example file here, I've simplified things very much by just leaving 2 Forms (one made with Dynamic text and another one without any dynamic text on it).
Very peculiar, if in frame 1 I call the variables from the text file:

ActionScript Code:
webcontent= "File.txt"loadVariablesNum (webcontent, 0);

the 2 Forms stop working properly: The static one doesn't even seem to submit data and the dynamic one, it seems data has been sent but data is never received.
As soon as I delete these 2 lines of AS, they work properly again (although of course, no words can be seen in the Form made with dynamic text).

Both submit buttons contain the following AS:

ActionScript Code:
on (release) {        subject = "Customer Form from your Web";        recipient = "info@mydomain.com";        loadVariables ("http://www.mydomain/cgi-bin/formmail.pl", "", "POST");        _root.Form.gotoAndStop ("Thanks");}

So...I don't have the least idea of what's going on with this all.
Perhaps any of you could explain what's wrong with such a simple thing like this and how to avoid this strange behaviour.

Thank you very much!

View Replies !    View Related
Loading Dynamic Text Breaks Formmail Forms [renamed]
This matter is something I haven't been able to solve for long and now I'm really desperate to find out an answer.
Here's a link to a very simple zip file (as example) containing the conflictive fla and other files, for those of you who may want to have a look at it.

TO SIMPLIFY THINGS:
It seems that whenever I use a couple of AS instructions to load some Dynamic text from a text file, Forms which are based in formmail, stop working (no matter if these forms are made of dynamic or static text). Why??

INTO MORE DETAILS:
In the attached fla example file here, I've simplified things very much by just leaving 2 Forms (one made with Dynamic text and another one without any dynamic text on it).
Very peculiar, if in frame 1 I call the variables from the text file:

ActionScript Code:
webcontent= "File.txt"loadVariablesNum (webcontent, 0);

the 2 Forms stop working properly: The static one doesn't even seem to submit data and the dynamic one, it seems data has been sent but data is never received.
As soon as I delete these 2 lines of AS, they work properly again (although of course, no words can be seen in the Form made with dynamic text).

Both submit buttons contain the following AS:

ActionScript Code:
on (release) {        subject = "Customer Form from your Web";        recipient = "info@mydomain.com";        loadVariables ("http://www.mydomain/cgi-bin/formmail.pl", "", "POST");        _root.Form.gotoAndStop ("Thanks");}

So...I don't have the least idea of what's going on with this all.
Perhaps any of you could explain what's wrong with such a simple thing like this and how to avoid this strange behaviour.

Thank you very much!

View Replies !    View Related
Current Line In Text Field
I have a programically generated input text field that has an initial maximum height. This text field exists in a movie clip scrolled by a FScrollPane.

My problem is that the text field is larger than the height of the Scroll Pane such that when the user types past the end of the visible section I need to automatically scroll the Scroll Pane so that the user can always see the text that they're typing. Ideally I'd like to know the x/y coordinates of the caret so it was a simple matter of testing if it is past the bottom of the ScrollPane's viewing area.

Is there a way of determining the x/y coordinates of the caret?

Or

Is there a way of determining the current line the caret is on?

(I know you can get values for scroll, maxscroll and bottomscroll for a Text Field but this doesn't help determining the current line nor does the current caret index position as the user could use returns in the text)

Thanx for any help

View Replies !    View Related
Width Of Text On The Last Line Of Multiline Text Field
I think this has been solved here:
http://www.actionscript.org/forums/s...d.php3?t=90797

However, when I paste that into Flash I get an error that says: "Attribute used outside class". Can anyone help me figure out why that's happening.. or offer a better solution for what I need to accomplish.

Ultimately, I'm trying to place a Quote MovieClip to the end of the last character in the last line of a dynamic text field.

Thanks.

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved