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




Keep Format Of Text



I have a dynamic text field. How can I keep the format properties when I change the text ? (I am loading the text from id3)



FlashKit > Flash Help > Flash Newbies
Posted on: 03-10-2007, 05:24 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

How To Format External Text File To Show In Three Separate Columns Through Text Area?
Hullo everyone!

Could anyone suggest a piece of advice to visualize the following idea?

I should like to import an external .txt file into flash and display it by means of a text area component, which would take the better part of the screen and be skinned to fit the rest of the page design. The text ought to be formatted by way of an external .css file. Images are optional.

I can do all this allright, but what I should like to have is the text formatted to be displayed in three separate columns. The idea for this naturally comes from the Flash version of the Macromedia Edge newsletter.

I should be most thankful if anyone cared to come up with a solution.

CreateTextField, Dynamically Loaded Text, And Setting Text Format..
I'm trying to format some text that i'm loading into a text box, that's inside a movie clip, that's created at load time. It seems that I have everything but the snippet of code that will apply the text formatting. I just don't know where to get it from, or rather, what to point it at.

my code is

Code:
//creates empty movie clip
this.createEmptyMovieClip("enter_mc", 10);
//creates text field inside movie clip
this.enter_mc.createTextField("welcome_txt", this.getNextHighestDepth(), 0, 0, 100, 300);
//sets text formatting
var my_fmt:TextFormat = new TextFormat();
my_fmt.bold = true;
my_fmt.size = 20;
//

LV = new LoadVars();
// declare a new LoadVars object
LV.load("enterTxt.txt");
// load content in it
LV.onLoad = function(success) {
if (success) {
// when the file is loaded...
_root.enter_mc.welcome_txt.text = this.enterTxt;
// load the value of the variable "enterTxt" in the
// file into the text field "named" welcome_txt
}
};
and that works to create the movie clip, the text box, and load the text.

this

Code:
_root.enter_mc.welcome_txt.setTextFormat(my_fmt);
would make sense for formatting the text but it doesn't format the loaded text. there's nothing special about the text that's being loaded.

I'm at a loss, any help would be greatly appreciated.

Space In Html Freaks Out Text Format In Text Field
heres the html

<P ALIGN="LEFT"><FONT FACE="Helvetica" SIZE="43" COLOR="#000000"><A HREF="http://www.thelink.com" TARGET=""><U>link1</U></A> <A HREF="http://www.thelink.com" TARGET=""><U>link2</U></A></FONT></P>

Text Format Property: Leading (=text Spacing, BUT)
Hi!

In Flash it is possible to set the line spacing to a negative value - with the result of tighter lines.
It is also possible to define line spacing via ActionScript (.leading property of text format), but it is not possible to set negative values.

I really need those text lines with less spacing than 0pt.

Does anyone know how to fix this problem? Maybe a workaround?

Thank you!

Tensile

How To Format Text Within Dinamic Text Field?
Hi!

A couple of days ago, I was crying for help about how to put a link to URL, dinamically from a external text.

I had two pretty answers that figured out my issue. That was good!

Now, I am stepping forward, and trying something else that seems do not work. Or I am very wrong, or the "renderize text as HTML" option is not so much eficcient, because seems to me that it dont recognizes the most of the simplest HTML tags. For instances, I tried the <B></B> tag and the only thing I got was to vanish anything I put between the two tags!

Well, that's my question: how to format text (bold, italic, font color, font face, etc) from a external text????

Thanks!

How Do You Format Text In A Text Area Component?
I'm looking for an easy way to create a scrollable block of text without getting into all the action script (I think I'm allergic to scripting and programming of all kinds, I just like to make stuff look cool, which I'm good at). I tried using a text area component, which seems to work fine, but is the only way to get the text into the area is to open the component inspector and paste the text into the parameter text field? Then also, how do you format the text once it's in? Thanks...

We Are 138

Format And Load Text Into Dynamic Text Box?
The nicest and smartest people are on Kirupa.
Kirupa rocks.

What is the simplest most fool-proof way of pre-formatting text (even outside of Flash) then having it load into a Flash dynamic text box so that it LOOKS THE SAME? Whoever is kind enough to answer this, please be sickeningly descriptive. I can't get anything to work from tutorials. In fact, I can't even get a basic text file to load into a Flash text box! The text needs to maintain the hyperlinks assigned to various words.

* Scottie

I can design a city but can't fix a pipe.

Text Format
when writing text in flash you are given 4 options in the parameter window. Align to left, right, center, or on both sides (to make a perfect block). When i select the last opion to so that the text is aligned on both sides it never works. it allways looks like its only aligned on the left hand side. Does anyone know a way to make loaded txt files appear in these perfect blocks. Maybe a html tag or something? thanks in advance

Text Format
Can anyone help me with the syntax for changing the colour of a dynamic text field using script.
Do I change the instance name of the field or the field name and what is it?

Thanks

Text Format
Hi all.....

I need ur help to solve my problem..
I make textfield then i want to set font and font size in the text field. I load
text from XML.
Here is the code but it doesn't work.


many thanks

code :
for (i=0;i<2;i++){
_root.createTextField("head"+i,i,380,80+(i*280),30 0,80);


_root["head"+i].border = true;
_root["head"+i].borderColor = 0xcccccc;
_root["head"+i].background = false;
_root["head"+i].backgroundColor = oxFFCC00;
_root["head"+i].autoSize = "left"
_root["head"+i].wordWrap = true
_root["head"+i].html = true


}

myFormat = new TextFormat();
myFormat.size = 14;
myFormat.font = "Arial";
_root.head.setNewTextFormat(myFormat)

Text Format
Hi,

I was wondering if anyone knows a way to change which color you highlight in. As in when you take your mouse and select text on a white background you get a black border and white text so that you know what you selecting.

now in flash when you have a dynamic text box and you make it selectable you can highlight text with the mouse but what happens is that no matter what color the text is it will always hightlight with a black bg and white text. my problem is that my bg is black and my text is white so you cant tell what you selecting? does anyone know how to make it so you can tell what you selecting

I have attached an example.

textselect.swf

AJ

Format XML Text
Hi All,

I am filling a dynamic text field with content from an XML document. How would I apply formatting to that text, such as bold, italic, font, color and add a link? Is this possible in the xml document and transfer to Flash?

Thanks.

_t

Text Format
How would you get flash to read a text field and seperate it into lines, for example:

line 1
this is line 2
here is line 3
this starts line 4

How would I read that as 4 seperate lines into an array or something like that? Thanks.

Text Will Not Format?
The code is still Times New Roman help!!!!


var imageText:TextField = new TextField();
var textStyle:TextFormat = new TextFormat();
var imageLoader:Loader;
//imageLoader.load(new URLRequest("thumbnails/image3.jpg"));
var xml:XML;
var xmlList:XMLList;
var xmlList2:XMLList;
var xmlLoader:URLLoader = new URLLoader();
var xmlLoader2:URLLoader = new URLLoader();
textStyle.font = "Helvetica";
xmlLoader.load(new URLRequest("data/images1.xml"));
xmlLoader2.load(new URLRequest("data/images2.xml"));
xmlLoader.addEventListener(Event.COMPLETE, xmlLoaded);
xmlLoader2.addEventListener(Event.COMPLETE, xmlLoaded2);

function xmlLoaded(event:Event):void {
xml = XML(event.target.data);
xmlList = xml.children();

for (var i:int = 0; i < xmlList.length(); i++) {
imageLoader = new Loader();
imageLoader.load(new URLRequest(xmlList[i].attribute("thumb")));
imageLoader.x = 0;
imageLoader.alpha = .5;
imageLoader.y = i * 72 + 1;
imageLoader.name = xmlList[i].attribute("source");
addChild(imageLoader);
imageLoader.addEventListener(MouseEvent.CLICK, showPicture);
}
}


function xmlLoaded2(event:Event):void {
xml = XML(event.target.data);
xmlList2 = xml.children();

for (var i:int = 0; i < xmlList2.length(); i++) {
imageLoader = new Loader();
imageLoader.load(new URLRequest(xmlList2[i].attribute("thumb")));
imageLoader.x = 103;
imageLoader.alpha = .5;
imageLoader.y = i * 72 + 1;
imageLoader.name = xmlList2[i].attribute("source");
addChild(imageLoader);
imageLoader.addEventListener(MouseEvent.CLICK, showPicture);
}
}


function showPicture(event:MouseEvent):void {
imageLoader = new Loader();
imageLoader.load(new URLRequest(event.target.name));
imageLoader.alpha = 1;
imageLoader.x = 208;
addChild(imageLoader);
imageOne.visible = false;
imageText.x = imageLoader.x;
imageText.y = 435;
for (var j:int = 0; j < xmlList.length(); j++) {
if (xmlList[j].attribute("source") == event.target.name) {
imageText.text = xmlList[j];
}
}
for (var p:int = 0; p < xmlList2.length(); p++) {
if (xmlList2[p].attribute("source") == event.target.name) {
imageText.text = xmlList2[p];
}
}
}
imageText.autoSize = TextFieldAutoSize.LEFT;
addChild(imageText);
imageText.setTextFormat(textStyle);

Text Format Without AS?
Pretty simple? i can not figure it out.

How do I underline text in flash 8? its not the same as in 2004, i'm missing the underline icon (and ctrl-U does not work).

And how do I adjust th space between the text lines, so my text will exactly fit in the textbox?

Thanks,
Demeter

Text Format
for some reason the text format doesnt look like its being applied

ActionScript Code:
register = new TextField();
            hyperlink = new TextFormat("Arial",null,0x0000FF,false,false,true);
            register.setTextFormat(hyperlink);
            register.text = "Register";
            register.selectable = false;
            register.x = 10;
            register.y = 15;
            register.addEventListener(MouseEvent.CLICK,signUp);
            addChild(register);

Format Text From Xml
I am using flash MX to load dinamic text (fom a xml file).
I know in MX 2004 i can format the text with css.
Is there a way to do this in MX? (change the color, size,....of text)

10x!

Format The Text Box
how can i change the dimension of a text box without make unclear the text?

Any Way To Format Text In Xml
hi guys,

I have a photogallery done in flash. Its having a external xml file where the descriptions and image location is defined. Is there any way to add font color , font size , and all other font formating options inside the xml file to take effect inside flash movie. I have tried cddata , <b> , <fontface> etc etc... but no result. Please any one help

Format Text
Hi,

Would the textFormat object be better suited for formatting input text fields, perhaps in an application utilizing components, making the Stylesheet Object better suited for HTML and XML Objects?

Text Format Without AS?
This is not an AS question, I know how to do that, but.........

How do I underline text in flash 8? its not the same as in 2004, i'm missing the underline icon (and ctrl-U does not work).

And how do I adjust th space between the text lines, so my text will exactly fit in the textbox?

Thanks,
Demeter

Format Text
Hi,

Would the textFormat object be better suited for formatting input text fields, perhaps in an application utilizing components, making the Stylesheet Object better suited for HTML and XML Objects?

Currency Format On Text
Hey guys and girls,

I was hoping someone could possibly help me out with this problem that I am having.

I am trying to output a number and use currency formating on it. For example:

230 becomes - 230.00
2300 becomes - 2,300.00

Is there a built in way of doing this or can I force it to do this. Please any help would be greatly appreciated.

Thanks
Niklas Wahlberg

Format The Dynamic Text
Hey guys!

It's pretty easy to load a text file ( mytext.txt) into flash. I am building a pretty big site now and it needs to change it contents a lot. So that's what I'll be using!

Does anyone know how to make links then?

for example:
mytext.txt looks like this

content= He i want this text to be a link to another .swf movie

Is this possible? Or can you only use it for text and not for formatted text?

Hope somebody can explain or even knows a site where it will be explained!

thnx

Text Format Indent
Hi here's this problem i have been having with text format
im loading some details from an asp file into flash

lets say they are movie channel data
is in channel 1 movie 1 , channel 1 movie 2.

now i am parsing this data to display into flash
im am using html to display this data.

the problem is sometimes if the movie name is too big it goes on the the next line under the line number.
is there a way i can indent this data?. through actionscript

as in instead of displaying

1. Channel 1 Movie
a
2. Channel 2 Movie
abcd

i want to display it in this format

1. Channel 1 Movie
a
2. Channel 2 Movie
abcd

i am currently displaying the data using this code

_root.txt = _root.txt + n + ". " + "<p><a href="BottomLinkTransaction.asp?vChannelId=" + _root.chid + "&VmovieId=" + dummyy[1] + "">"
+ dummyy[0] + "</a></p>";


Thanks
Rahul

P.S I am using Flash Mx

Text Box Format Problems
This is probably an easy problem to fix.

When I format a text box how I want it(ie, certain things centered, different fonts, returns,...) and I view the swf, if looks different. Returns are missing, centered text is not centered,etc.

Please help!!

Ross

Format Of Dynamic Text
I have a dynamic text with a scrollbar. Everything was perfect but then my client ask me to justify this text.
I use the FULL JUSTIFY option and it works. But when i see it as a .swf movie, the text format was lost.
żEverybody knows how to make this works? I tried with the render as HTML option but it doesn´t work.

Change Text Format
Hi all,

I'd found out that you can check if a textfields bold format is set or not. (txtfield.bold), But how can I change that value? I tried:

_root.mytxtfield.bold = true;
and
setProperty(_root.mytxtfield,bold,true);

Neither one is working! is it anyway possible to change the bold status of a textfield?

Thanks!

Frans-Jan

Dinamic Box ... Format Text In MX
hi,
how can we justif the text inside a dinamic box?

How To Format Text Boxes With AS?
Hi,
in HTML, when you want to break a line, you type <br> . What do you do in AS to manipulate text?

And, if the text is too long for one linke of code, how do you type it to the seconde line, without breaking apart?
Thanks,
Manojo

Text Format (justify)
Is there a script to justify a text when you create a text filed dynamically! In the settextformat attributes, I have only found .align and it's only for right, left or center.

Thanks for helping me!

Text Format Will Not Work
Ok, I have never worked with the TextFormat settings in Flash MX, but I have read the help manuals and thought I had it figured out. Apparently not. Here's the scenario. I have a Dynamic textBox on the root timeline with a variable name of "myTextBox", it has no instance name. In my main timeline I have the following script:

my_fmt = new TextFormat();
my_fmt.size = 5;
myTextBox.setTextFormat(my_fmt);


The text box font size does not go to 5 point and the text does not change appearance. What am I doing wrong?

Thanks

Text Format Problem
I am dynamicall creating text field and want to format it throug code but formating is not working.... please help


Code:
i = 1;
createTextField("mcnews" add i, 3, 30, 0, 190, 30);
myTextFormat = new TextFormat();
myTextFormat = "Verdana";
myTextFormat.bold = true;

with (eval("holder.mcnews" add i add ".newstext" add i)) {
setNewTextFormat(myTextFormat);
color = 0xff0000;
type = "dynamic";
multiline = true;
wordwrap = true;
html = true;
_quality = "LOW";
htmltext = eval("news" add i);
}

How To Format A External Text?
Hi,
I was wondering if there is a way to load the text from a text file and format it some how (like bold, different sizes and...) when displayed in flash.

Thank you

Text Format Question
Hi there!

I know that this must be possible. I'm loading text from an external txt into one dynamic textbox. There should be a headline followed by 'normal' text. The problem is that I want the headline to be another font than the rest of the text. I'm using an embedded pixelfont for the main text and have to use another embedded pixelfont for the headline.
So how do I tell the text field to use the second font? Is it in the txt doc. or in the textfield itself?

Please help!!!

Format External Text
I have a txt file like this:

Line1 using li tag
Line2 using li tag

Line 3 normal text, not using li tag

Problem: When using li tag with the first 2 lines, I don't know how to get rid of the bullet on the 3rd line [automatically created]. I've tried different things like /li, p,br,but not work.

HELP PLEASE!

Text Format Problem
Hi - would someone mind checking this code for me? This is all working flawlessly, except for the text formatting. I want to customize the text formatting in the loading text box. I believe i've followed all the instructions in the help file, but it stubbornly resists my formatting and remains in the default times size and font. Everything else is great but final success eludes me! I can't see why the text won't show up in Helvetica! Thanks, in advance... Peter



function textposition() {
_root.pct_mc._x = 100;
_root.pct_mc._y = 100;
}


this.btn01.onRelease = function() {
_root.holder_mc._visible = false;
var loader:MovieClipLoader = new MovieClipLoader();
var loadHandler:Object = new Object();
_root.createEmptyMovieClip("pct_mc", this.getNextHighestDepth());
_root.pct_mc.createTextField("pct_txt", 1, 100, 100, 300, 100);
_root.pct_mc.pct_txt.border = false;
var my_fmt:TextFormat = new TextFormat();
my_fmt.color = 0xCC99FF;
my_fmt.font = "helvetica";
my_fmt.size = 14;
_root.pct_mc.pct_txt.setTextFormat(my_fmt);
_root.textposition();


loadHandler.onLoadStart = function() {
_root.holder_mc._visible = false;
_root.holder_mc.stop();
};
loadHandler.onLoadProgress = function(t:MovieClip, lb:Number, tb:Number) {
_root.pct_mc.pct_txt.text = "Loading "+ Math.floor(lb/tb*100)+"%";
};
loader.addListener(loadHandler);
loader.loadClip("myswf.swf", holder_mc);
loadHandler.onLoadComplete = function() {
_root.pct_mc._visible = false;
_root.holder_mc._visible = true;
_root.holder_mc.play();
};
};

[F8] Set Text Format On A Button
Hi

here is the code that I am using on my button. It works fine but what I would like to happen is when you click the button the text stays highlighted


Code:
// text formatting

// default text style
textStyle = new TextFormat();
textStyle.color = 0x000000;

// rollover style
rolloverStyle = new TextFormat();
rolloverStyle.color = 0xFF0000;

btn.onRollOver = function(){
// change Services text color to red
btnLabel.setTextFormat(rolloverStyle);
}
btn.onRollOut = function(){
// change Services text back to black
btnLabel.setTextFormat(textStyle);
}

Cant Set Format Of Dynamic Text
Here is the code im using to create a dynamic field and set formatting, but it doesnt work !


Code:
//text format for basic flash formating.
var textFormat00:TextFormat = new TextFormat();
//textFormat00.bold = false;
textFormat00.font = "Arial";
//---------------------------------------------------------------------------
for (var i = 0; i<3; i++) {
_root.createTextField("text"+i, 10000+i, 0, 30*i, 173, 26.4);
_root["text"+i].setTextFormat(textFormat00);
_root["text"+i].type = "input";
_root["text"+i].border = true;
_root["text"+i].font = "Arial";
_root["text"+i].selectable = true;
_root["text"+i].background = true;
_root["text"+i].backgroundColor = 0xFFFFFF;
_root["text"+i].setTextFormat(textFormat00);
}
im always being frustrated by the myriad of text formatting options in flash...
anyone lend an idea?
thanks in advance

[F8] Format Text Object
I have a text field that can be no more than 20 characters in length, if it is more, I want to cut the font size in half and make it 2 lines. the text is coming in dynamically from an XML file. this is the code I wrote, but it does not seem to be doing anything. the text shows up and it traces correctly, but the text does not change size.

PHP Code:



// new textFormat('font', size, color, bold, italic, underline, url, target, align, leftMargin, rightMargin, indent, leading);
// pass value null for unused parameters thar preceed needed values
this.createTextField('participant_txt', 1, 50, 50, 360, 150);
participant_txt.wordWrap   = true;
participant_txt.selectable = false;
largeFormat = new textFormat ('Arial', 48, 0x000000, true);
smallFormat = new textFormat ('Arial', 24, 0x000000);
participant_txt.text = 'this is my text, hope you like it';
trace('participant length: '+ participant_txt.length);
if (participant_txt.length < 19){
    trace('show small text');
    participant_txt.setTextFormat(smallFormat);
}else{
    trace('large text');
    participant_txt.setTextFormat(largeFormat);
}
stop();




any ideas as to what I am doing wrong or why this will not work

thanks

IMS

[F8] Text Format Object
I thought this would be simple, but apparently it is not. I must be doing something wrong. the code below is just an example of what I want to do

frame 1

PHP Code:



var fontSize  = '48';
var fontColor = '0x0000FF';
var fontAlign = 'center';

function reloadTextFormat(){
    myFormat = new TextFormat ('Arial', fontSize, fontColor ,null, null, null, null, null, fontAlign);
}
reloadTextFormat();

test1_txt.autoSize   = 'left';
test1_txt.wordWrap   = true;
test1_txt.selectable = false;
test1_txt.embedFonts = true;
test1_txt.text = 'this is a test1';
test1_txt.setTextFormat(myFormat);

test2_txt.autoSize   = 'left';
test2_txt.wordWrap   = true;
test2_txt.selectable = false;
test2_txt.embedFonts = true;
test2_txt.setNewTextFormat(myFormat);
test2_txt.text = 'this is a test2';




frame 10

PHP Code:



fontSize  = '20';
fontColor = '0xFF0000';
fontAlign = 'center';
reloadTextFormat();
stop();




basicall, I would just like to change the values on the fly, so I don't have to create a format for every different combination I come across.

make sense?

IMS

[F8] Text Format Problems
I have some text in a text field I am trying to bold by clicking a button. For some reason it doesn't work. I have found that the bold nor the italic seem to work. I am not sure why. I have attached a mock-up movie to demonstrate my issue. Could someone take a look and see if you can see what I am missing. Thanks!

[MX] Format Dynamic Text
Working on a FlashMX-based quiz with fill-in-the-blank answers. I've figured out how to accept lower or upper case answers, but how can I truncate an answer to eliminate any white space before or after the answer that the player types in?

example: "wolf" or "Wolf" shows as a correct answer but any blank space entered before the "w" or after the "f" shows as an incorrect answer.

My other question -- I'm trying to accept multiple answers as correct but the following line of code only gives a correct result for "wolf" but not "wolves". ??? Thanks in advance.

on (release, keyPress "<Enter>") {
answerA100 = answerA100.toLowerCase();
if (answerA100 == "wolf" || "wolves") {
_root.score = _root.score + 100;
replyBox.textColor=0x009966;
answerA100 = "Correct!";
}

How To Format Text Files?
Does anyone know how I can format my text files so that they appear in e.g. paragraphs in the dynamic text box?

wB

How To Format External Text?
Hi,

I am loading some text from a text file, but:
the list of variables (&something=otherthing) is not separated, so, how could i make new lines, or format it in any way? when i put a tag (for example a <b> bold text tag) it just shows in the text, as a part of the text.

and, the UIScrollBar doesnt allways show, sometimes its there, sometimes just in blank, even though there is text there, that is bigger then the box.

does anyone know those solutions?
please help me on this....

Thanks in advance

Format Text Not Working
ActionScript Code:
function attachEnemy(enemyText, xx, yy) {
    this.attachMovie("bomb", "bomb"+c, d++, {_x:xx, _y:yy});
    this["bomb"+c].createTextField("problem", 5, 0, 0, 1, 1);
    this["bomb"+c].problem.type = "dynamic";
    this["bomb"+c].problem.border = false;
    this["bomb"+c].problem.selectable = false;
    this["bomb"+c].problem.color = 0xff0000;
    this["bomb"+c].problem.size = 12;
    this["bomb"+c].problem.bold = true;
    this["bomb"+c].problem.italic = false;
    this["bomb"+c].problem.underline = true;
    this["bomb"+c].problem.align = "left";
    this["bomb"+c].problem.text = enemyText;
    this["bomb"+c].problem.autoSize = true;
    this["bomb"+c].maskMc._height = this["bomb"+c].problem._height;
    this["bomb"+c].maskMc._width = this["bomb"+c].problem._width;
    this["bomb"+c].explosionMc._height = this["bomb"+c].problem._height;
    this["bomb"+c].explosionMc._width = this["bomb"+c].problem._width;
    this["bomb"+c].maskMc._alpha = 10;
    c++;
}
For some reason my text wont format
Can anyone please help?
I appriciate your time
~Gabor

Format Text Default
Hello,
After I create a textfield I try to format it, so that the size of the font is 18px when the user starts to type, but I only get default format.

HTML Code:
var myText:TextField = new TextField();
myText.type = TextFieldType.INPUT;
myText.border=true;
myText.multiline=true;
myText.x=30;
myText.y=30;
myText.width=100;
myText.height=50;
var qFormat:TextFormat=new TextFormat();
qFormat.size=18;
myText.setTextFormat(qFormat);
addChild(myText);
myButton.addEventListener(MouseEvent.CLICK,myButtonF);
If I however write text in the textfield and click following button then the text gets formatted.

HTML Code:
function myButtonF(event:MouseEvent) {
var qFormat:TextFormat=new TextFormat();
qFormat.size=18;
myText.setTextFormat(qFormat);
}
I would appreciate it if someone could tell me how I can set the format of the text before the user starts to type.
Thanks

Set Format To Text Input
Hi there,
I've this text format:

Code:
var fontTotal = new prjFont();
var formato:TextFormat = new TextFormat();
formato.font = fontTotal.fontName;
formato.size = 15;
and this text input:

Code:
var fieldinp:TextField = new TextField();
field.addChild(fieldinp);
fieldinp.type = TextFieldType.INPUT
How can I set the format of fieldinp equal to formato? I'd like to see the input text in that format while I'm typin' it!

Setting Text Format?
I want to apply text formatting to a text field I've targeted using getChildByName however it wont let me because it recognizes the text field as a display object, not an actual text field.

What am I doing wrong?

Copyright © 2005-08 www.BigResource.com, All rights reserved