My TextField Is Fed With Too Much Text
hello everyone.
hope you can help me. I would like to be able to let people add their own text in their Flash. this is accomplished using an .xml-file.
but if too much text is written in the .xml-file, I'd like to be able to automatically cut away the part that is too much and replace it with '...'
I've made this simplified example that simulates the situation:
Code: var square:Sprite = new Sprite(); var mySize:Number = 100; square.graphics.beginFill(Number(0x006600)); square.graphics.drawRect(0, 0, mySize, mySize); square.graphics.endFill(); var myFormat:TextFormat = new TextFormat(); myFormat.color = Number(0xFFFF33); var myText:TextField = new TextField(); myText.multiline = true; myText.wordWrap = true; myText.width = myText.height = mySize - 20; myText.border = true; myText.htmlText = "<a href='http://www.co3.dk'>this is text with a link</a> ...and this is just text without a link, but there is too much of it"; myText.setTextFormat(myFormat); square.addChild(myText); myText.x = myText.y = 10; addChild(square); in this example the TextField is not able to show all of the text. can I somehow cut away the part that is too much and replace it with '...' ?
thanks felisan
ActionScript.org Forums > ActionScript Forums Group > ActionScript 3.0
Posted on: 09-15-2008, 08:27 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Loading Text & JPG Nito TextField Makes Textfield White
Hi guys !
Does anyone know, why a textfield may become white when loading text + JPGs into it? Sometimes it happens to me, sometimes not. I haven't figured out why.
If you have any clues... I'd be really thankful
The AS I'm using:
_target.container.t.html = true
_target.container.t.condenseWhite = true
_target.container.t.autoSize = "left";
_target.container.t.htmlText = _data.texto
The String ( &HTML ):
"Text lorem ipsum bla bla ..... <img style='WIDTH: 154px; HEIGHT: 59px' height='298' width='856' alt='' src='http://www.spacilong.com/arq/img/AlcatelLucent_Hor_2col_sm.jpg' />
[textfield] How To Check If Input Text Is More Than Textfield Height?
Hi guys, Is there a way to check if the text that has been input into the textfield is more than the height of the textfield.
I have set the scrollbar hidden and it will become unhidden once the text is greater the the textfield height.
I did try to count the input text and set the visiblity of the scrollbar against that count. Unfortunatly this is unreliable.
Anyone got a better idea?
Cheers
Paul
[textfield] How To Check If Input Text Is More Than Textfield Height?
Hi guys, Is there a way to check if the text that has been input into the textfield is more than the height of the textfield.
I have set the scrollbar hidden and it will become unhidden once the text is greater the the textfield height.
I did try to count the input text and set the visiblity of the scrollbar against that count. Unfortunatly this is unreliable.
Anyone got a better idea?
Cheers
Paul
Normal And Bold Text In Dynamic Textfield With Embed Text
Hello everyone, i have a problem, i trying to show bold and normal text in a dynamic textfield with embed fonts, so i can made fade in & out with that textfield, but i can΄t show at the same time bold and normal, i only can display or normal or bold text.
Does anyone know what can i do?, or if this can be achieved?
Thansk everyone!!
How To Load Text From A Text File Using Dynamic Textfield?
is there a way that i can load text from a textfile using dynamic textfields? i can use an alternative where if the textfield's name is 'poetry', i'll just make a button that changes the text like
on( release )
{
poetry = "blafhlanflh lnalfhafl af";
updateAfterEvent();
}
but what if i have many poems to load? it will make the file bigger so im thinking that maybe ill just load text from a text file so even if i have many poems or other data, i can just load them from text files making load time faster...is there any way? hope you understood my dilemma...thanks in advance!
How Do I Load Text From A Text File Into A Dynamic Textfield?
is there a way that i can load text from a textfile using dynamic textfields? i can use an alternative where if the textfield's name is 'poetry', i'll just make a button that changes the text like
on( release )
{
poetry = "blafhlanflh lnalfhafl af";
updateAfterEvent();
}
but what if i have many poems to load? it will make the file bigger so im thinking that maybe ill just load text from a text file so even if i have many poems or other data, i can just load them from text files making load time faster...is there any way? hope you understood my dilemma...thanks in advance!
How To Save A Textfield Text To An External Text File
I have an application that combines words introduced by the user to create new words. I would like to be able to save the resulting combinations into an external txt file. Do any of you know how this could be done with actionscript?
How Do I Use Change Text Style Halfway Through TextField.text
Or something like that ... it doesn't have to be a textbox.
How would you display this within a canvas:
"Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam imperdiet. Proin dapibus. Aliquam tristique ante nec lacus. Donec volutpat erat a sem. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Curabitur facilisis viverra augue. Proin vel urna vitae metus rhoncus vestibulum. Suspendisse pellentesque condimentum magna. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Ut lacinia."
I have dynamic HTML text that needs displaying but I really am stuck on how to accomplish this easily. I know the hard way, creating various text objects, placing them on the page, finding the width and height and rejigging based on space remaining. Is there a control that can do the above easier though?
Any Gurus out there?
How To Save A Textfield Text To An External Text File
I have an application that combines words introduced by the user to create new words. I would like to be able to save the resulting combinations into an external txt file. Do any of you know how this could be done with actionscript?
Text In Textfield Being Cut Off
Ok Ive got a dynamic textfield, which I load text into. I check the number of characters and once its gets over 48, I add ".." onto the end of the textfield, and it worked fine until I spotted a problem.
Some characters (letters) are wider then others, so with some lines the above approach worked fine, but with strings that had wider characters in them, the string was longer then the text box, but still had less then 48 characters so was not caught by my code.
How do I solve that problem?!?
thanks for any help
boombanguk
BUG: Text Goes Outside Of TextField
hi,
I ve'got an input TextField. What I want to do is to reset the TF content and put some prompt text inside, which I set using AS (e.g. 'your email').
The problem:
If before resetting the TF, the text in it is longer than the TF width, Flash doesn't put the prompt text where it is supposed to (left-aligned inside the textfield), but further to the left outside of the TF. Actually the offset is more or less equal to the diference between the previous text length and the TF width.
In my real project the misplaced text is visible right away, and when I tried to recreate the problem in a test .fla, it becomes visible after resizing the test player window.
The text returns into the right place after clicking on the textfield (and no, setting focus progammaticaly does not help).
Does anyone know what can help?
Why Won't This Put Text Into My TextField?
Code:
#include "vars.as"
function submit_amount_of_players()
{
if (n_players.text.length > 0)
{
amt_of_players = n_players.text;
for (var i:Number = 0; i<amt_of_players; i++)
{
pn[i].createTextField("p_n"+i, this.getNextHighestDepth(), Xbase - 50, YBase*(i+1), 200, 200);
pn[i].text = "Player "+i;
tf[i].createTextField("t_f"+i, this.getNextHighestDepth(), Xbase, Ybase*(i+1), 350, 350);
tf[i].text = "Player Name";
//no text here is written
}
n_players._visible = false;
submit_amt._visible = false;
amt_p._visible = false;
}
}
submit_amt.onRelease = submit_amount_of_players;
Can't See My Text In Textfield
_root.createEmptyMovieClip("menu", 0);
_root.menu.draw(200, 20, 0x000000);
txtField = _root.menu.createTextField("label", 0, 0, 0, 20, 20);
txtFormat = new TextFormat()
txtFormat.color = 0xFFFFFF;
txtFormat.bold = true;
txtFormat.font = "Arial";
txtFormat.size = 8;
txtField.setTextFormat(txtFormat);
txtField.text = "Hello";
txtField.multiline = false;
txtField.autoSize = true;
txtField.type = "dynamic";
How To Set Dyn. Textfield To HTML-Text?
Hello!
I saw in some examples that you can use HTML-code in a dynamic text-field (for example to set the textcolor: fieldTextVar = "<FONT color=""+color+"" >"+text+"</FONT>";
).
When I make a new dynamic textfield and assign this text to the fieldTextVar, the whole HTML-code appears in the text. What do I have to do to make flash to use the html-code instead of showing it?
Fading Text In A Textfield
Hello all,
I have a question about fading text. I have a MC with a textfield and when I hit a button the MC and the textfield fades perfectly, however the problem is with the text inside the textfield. While the MC/textfield fades the text does not. Is there a way to correct this to have the text fade as well?
Thanks inadvance
Joey
Passing TextField Text Along?
I have a createTextField that I'm trying to pass the content along into another createTextField...but I'm having problems.
Here's the createTextField:
code:
$front_sub_txt = "Your header here";
_root.createTextField("fnt_sub", 323, $fntsubx, $fntsuby, 120, 80); // depth, x, y, width, height
sub_fnt_myformat = new TextFormat();
sub_fnt_myformat.size = 14;
sub_fnt_myformat.color = $fsubcolor;
sub_fnt_myformat.align = center;
sub_fnt_myformat.font = $fsubfont;
sub_fnt_myformat.bold = true;
sub_fnt_myformat.bullet = false;
sub_fnt_myformat.underline = false;
sub_fnt_myformat.embedFonts = true;
sub_fnt_myformat.variable = "fnt_sub_var";
fnt_sub.multiline = true;
fnt_sub.wordWrap = true;
fnt_sub.border = false;
fnt_sub.type = "input";
fnt_sub.html = true;
fnt_sub.htmlText = "<p align='center'>"+$front_sub_txt+"</p>";
fnt_sub.setTextFormat(sub_fnt_myformat);
Now, what part of that actually contains the text that someone would type in there? (Note the type "input".) So when I pass the info on to another createTextField it has the text?
I've tried fnt_sub_var, I've tried fnt_sub, fnt_sub.text, fnt_sub.htmlText,
$fst = fnt_sub.htmlText;
and then trying to use $fst but that always comes up with "Type your header here" as predetermined above the createTextField, regardless of if anything's typed in the field.
Otherwise every time I get an "invisible" area where the new createTextField should be (the mouse turns into a barbell over the area) but nothing's there, and a TRACE always comes up "undefined" for any of those variable.
Thanks for any clues!! =)
Liam
Passing TextField Text Along?
I have a createTextField that I'm trying to pass the content along into another createTextField...but I'm having problems.
Here's the createTextField:
code:
$front_sub_txt = "Your header here";
_root.createTextField("fnt_sub", 323, $fntsubx, $fntsuby, 120, 80); // depth, x, y, width, height
sub_fnt_myformat = new TextFormat();
sub_fnt_myformat.size = 14;
sub_fnt_myformat.color = $fsubcolor;
sub_fnt_myformat.align = center;
sub_fnt_myformat.font = $fsubfont;
sub_fnt_myformat.bold = true;
sub_fnt_myformat.bullet = false;
sub_fnt_myformat.underline = false;
sub_fnt_myformat.embedFonts = true;
sub_fnt_myformat.variable = "fnt_sub_var";
fnt_sub.multiline = true;
fnt_sub.wordWrap = true;
fnt_sub.border = false;
fnt_sub.type = "input";
fnt_sub.html = true;
fnt_sub.htmlText = "<p align='center'>"+$front_sub_txt+"</p>";
fnt_sub.setTextFormat(sub_fnt_myformat);
Now, what part of that actually contains the text that someone would type in there? (Note the type "input".) So when I pass the info on to another createTextField it has the text?
I've tried fnt_sub_var, I've tried fnt_sub, fnt_sub.text, fnt_sub.htmlText,
$fst = fnt_sub.htmlText;
and then trying to use $fst but that always comes up with "Type your header here" as predetermined above the createTextField, regardless of if anything's typed in the field.
Otherwise every time I get an "invisible" area where the new createTextField should be (the mouse turns into a barbell over the area) but nothing's there, and a TRACE always comes up "undefined" for any of those variable.
Thanks for any clues!! =)
Liam
Passing TextField Text Along?
I have a createTextField that I'm trying to pass the content along into another createTextField...but I'm having problems.
Here's the createTextField:
code:
$front_sub_txt = "Your header here";
_root.createTextField("fnt_sub", 323, $fntsubx, $fntsuby, 120, 80); // depth, x, y, width, height
sub_fnt_myformat = new TextFormat();
sub_fnt_myformat.size = 14;
sub_fnt_myformat.color = $fsubcolor;
sub_fnt_myformat.align = center;
sub_fnt_myformat.font = $fsubfont;
sub_fnt_myformat.bold = true;
sub_fnt_myformat.bullet = false;
sub_fnt_myformat.underline = false;
sub_fnt_myformat.embedFonts = true;
sub_fnt_myformat.variable = "fnt_sub_var";
fnt_sub.multiline = true;
fnt_sub.wordWrap = true;
fnt_sub.border = false;
fnt_sub.type = "input";
fnt_sub.html = true;
fnt_sub.htmlText = "<p align='center'>"+$front_sub_txt+"</p>";
fnt_sub.setTextFormat(sub_fnt_myformat);
Now, what part of that actually contains the text that someone would type in there? (Note the type "input".) So when I pass the info on to another createTextField it has the text?
I've tried fnt_sub_var, I've tried fnt_sub, fnt_sub.text, fnt_sub.htmlText,
$fst = fnt_sub.htmlText;
and then trying to use $fst but that always comes up with "Type your header here" as predetermined above the createTextField, regardless of if anything's typed in the field.
Otherwise every time I get an "invisible" area where the new createTextField should be (the mouse turns into a barbell over the area) but nothing's there, and a TRACE always comes up "undefined" for any of those variable.
Thanks for any clues!! =)
Liam
Button.textfield.text
button.textfield.text
i want to assign instance name to textfield which is under any button.
like this
trace(button.textfield.text);
but when i use instance name for that textfiled i cant access it using actionscript..
but when i try like this
trace(button.instance1.text);
its working.....
can anyone tell me why i cant give instance name to textfiled...
thanks
TextField.text Property
hey guys!!
PLz tell me if TextField.text property is only for string?? To be clear, I want to retrieve value for an Array from input text fields placed on stage.THe function is actually to get an average where I need value for variable sum.
Script I have written is below-
function average() {
var sum = 0;
var numbers = arguments.length;
i = 0;
while (i<=arguments.length) {
sum = sum+arguments[i];
i++;
}
trace(sum/numbers);
}
average(fld1.text,fld2.text,fld3.text);///here it takes input numbers in text fields (i.e. instance name txtfld1 and so on)as string and does calculation.
What do I do if I want those values as numbers???(ouchhhh...is it a stupid question??)
Text Position In TextField
Hi, is there any way i could start the text from the bottom? Like i can align the text left, centre and right, but can i align it to bottom?
Load A Text To Textfield
I have made a button which will contain text about my hobbies at menu page. Now i stopped to this problem: when i click the button, i whant that the text load into dynamic textfield at the menupage. becouse i dont wanna make so many scenes to this webpage.
Get The Selected Text Of A TextField
hi
can i get the text that the user select from the textfield
means i've a textfield i put some text in it then the user select a word for example i want to get this word
thank you for the help
Text In Textfield Not Sizing...
hi,
im creating a textfield in an empty MC.
im setting the width of the MC to a lower size, but
the text isn't sizing with it... the font size is still the same...
im not using TextFormat bcuz i want the text to be change as accuratly as the width of the MC changing...
here's a piece of code -
code:
mc = _root.createEmptyMovieClip("textMC",3);
mc.createTextField("nodeTitle", 1, 0, 0, 100, 100);
mc.nodeTitle.multiline = true // the text will adjust it self to lines
mc.nodeTitle.autoSize = true;
mc.nodeTitle.wordWrap = true;
mc.nodeTitle.text = "adlfkjalsd kfjasldkgjas ldkgjasldkgjas dgjasldg";
mc._width = 10;
thanks in advance,
Avi.
Loading Text Into TextField?
my failed loading text into textField: http://www.fzvastgoed.nl/pcxpert (at the bottom)
The .fla file is downloadable at:
http://www.fzvastgoed.nl/pcxpert/loadingText.zip
In the main.swf (_level0 is this) i put:
PHP Code:
// ----------------<LoadVars>----------------------\
var myLV:LoadVars = new LoadVars();
myLV.onLoad = function(success:Boolean) {
if (success) {
_level5.loadedInfo.htmlText = myLV.info;
} else {
_level5.loadedInfo.text = "There has been an error loading the requested information. Please contact the Webmaster and report your error at michaellobry.com.";
}
};
// ----------------</LoadVars>----------------------\
In the page_downloadsText.swf i put:
PHP Code:
// ------------------<Load CSS>---------------------- \
var cssStyles:TextField.StyleSheet = new TextField.StyleSheet();
cssStyles.load("stylesheet/markup.css");
cssStyles.onLoad = function (success:Boolean) {
if (success) {
downloads_txt.styleSheet = cssStyles;
_level0.myLV.load("text/Downloads.txt");
} else {
downloads_txt.text = "Error loading Downloads.txt";
}
}
// ------------------</Load CSS>---------------------- \
// loading Downloads.txt at startup/ default
_level0.myLV.load("text/Downloads.txt");
The paths are correc. Why doesn't the text load?
[F8] Phantom Textfield.text
I'm trying to load a string into a textfield. When tracing the value of the .text property of the field, it shows up as what I'm trying to set it as. However the text isn't visible.
PHP Code:
with (_root.main_site.header_module.nav['main_link'+i]) {
link_var = main_links.childNodes[i].attributes.display_name;
trace(link_label.text); // returns "NEWS", the default
link_label.text = link_var;
trace(link_label.text); // returns the value in link_var
_x = total_width;
}
For what it's worth, the typeface I'm using is DIN Mittelschrift, size 11, bold. The font is embedded, but since I have it on my machine I wouldn't imagine that being the issue.
Can anyone help?
Change Textfield Text
Hi all!
I have a textfield inside a moveclip called my_mc. The textfield is pointing to a property of an object. This is the path:
_root.myob.prop1
When I start the movie all seems to be right. But when I change the value of the myob.prop1 I want my textfield to change. But nothing happens. Why not?
Regards compmon
[F8] Using Text Within A Textfield As A Button...
with textfields you are able to use anchors within your text, however they only point to http:// addresses.
I want the same effect, however, instead of going to an http:// address, I would like clicking on the word to trigger a function. Is this even possible?
TextField Vs Text And Label
Hopefully someone can explain the differences here to me.
I am new to AS, and it's a little frustrating.
I have a sprite and it's being added to a custom UI component
Here is the drawing code within flex:
Code:
import flash.text.TextField;
import mx.controls.Label;
import mx.controls.Text;
var someText = new Text();
var someTextField = new TextField();
var someLabel = new Label();
graphics.clear();
graphics.lineStyle(1.0, lineColor, 1.0);
graphics.beginFill(fillColor, 1.0);
var radius:Number = size / 2;
graphics.drawCircle(radius, radius, radius);
someText.text = "Text";
addChild(someText);
someTextField.text = "TextField";
addChild(someTextField);
someLabel.text = "Finally a Label";
addChild(someLabel);
I have tried adding only one of the 3 children here (just textfield, just label, just text) and running independantly.
The only text that actually DISPLAYS on the sprite is a textfield.
The others don't seem to have been added at all, or at least don't display anything.
The problem is that I don't want any interactivity.
I just want to display text, so I would rather use a Label or a Text rather than a TextField, but for whatever reason this doesn't work for me.
Can anyone let me know how I can get the Label to show up instead, or at least explain to me why there is an incompatibility?
TextField: http://livedocs.adobe.com/flex/3/lan...TextField.html
Text: http://livedocs.adobe.com/flex/3/lan...rols/Text.html
Label: http://livedocs.adobe.com/flex/3/lan...ols/Label.html
Highlight Text In A Textfield?
Hi,
doe's anybody know's if there's a why to make text in a text field highlighted(beckground color)?
I know there isn't any property like that for textfield or text foramt but there is an action named highlight in flash and I dont know what it's for.
I'll apreaciate any help,
Thanks,
Oz.
Adjusting Textfield For Text
I'm not sure on the correct terminology here, but if you look at the sample files attached, what I want to get rid of the blank space between the border of the text field and the last line. I can't seem to think of a way to do this.
help?
Can We Edit Text In A TextField?
Hey,
Is there a way to re-edit the text in a TextField that I coded?
I have started to write a class to deal with creating text in my app and create text using:
myText = new SomeText("text", 0xFFFFFF);
...calling this constructor:
ActionScript Code:
public function SomeText(txt, colour) {
_txt = new MovieClip;
_txt.name = "_txt";
fontHelv = new FontHelv();
txtFormat = new TextFormat(fontHelv.fontName, 12, colour);
txtField = new TextField();
txtField.embedFonts = true;
txtField.text = txt;
txtField.setTextFormat(txtFormat);
txtField.selectable = false;
txtField.autoSize = TextFieldAutoSize.LEFT;
txtField.name = "txtField";
_txt.addChild(txtField);
this.addChild(_txt);
}
I was then hoping I could use something like:
myText.editText("new text");
...to call something like:
ActionScript Code:
public function editText(txt):void {
var workMC:MovieClip = this.getChildByName("_txt");
workMC.getChildByName("txtField").text = txt;
}
But I keep getting errors. Is this possible?
TextField Text Co-ordinates
Hi there,
Is is possible to return the x and y positions of a specific bit of text in a textfield?
Cheers
Niall
TextField Vs Text And Label
Hopefully someone can explain the differences here to me.
I am new to AS, and it's a little frustrating.
I have a sprite and it's being added to a custom UI component
Here is the drawing code:
ActionScript Code:
graphics.clear();
graphics.lineStyle(1.0, lineColor, 1.0);
graphics.beginFill(fillColor, 1.0);
var radius:Number = size / 2;
graphics.drawCircle(radius, radius, radius);
someText.text = "Text";
addChild(someText);
someTextField.text = "TextField";
addChild(someTextField);
someLabel.text = "Finally a Label";
addChild(someLabel);
I have tried adding only one of the 3 children here (just textfield, just label, just text) and running independantly.
The only text that actually DISPLAYS on the sprite is a textfield.
The others don't seem to have been added at all, or at least don't display anything.
The problem is that I don't want any interactivity.
I just want to display text, so I would rather use a Label or a Text rather than a TextField, but for whatever reason this doesn't work for me.
Can anyone let me know how I can get the Label to show up instead, or at least explain to me why there is an incompatibility?
Changing Text In A Textfield
My problem: I cannot get the text to change in a
Code:
txtField = passedObj.createTextField( "txt_Content", passedObj.getNextHighestDepth(), 40, 40, 200, 1000 );
txtField.text = "wheioaheiowa4";
txtField.embedFonts = true;
txtField.antiAliasType = "advanced";
txtField.sharpness = 300;
txtField._quality = "BEST";
txtField.selectable = false;
txtField.multiline = true;
txtField.autoSize = true;
txtField.wordWrap = true;
txtField.type = "dynamic";
var txt_Fmt:TextFormat = new TextFormat();
txt_Fmt.size = 16;
txt_Fmt.color = 0xFFFFFF;
txt_Fmt.font = "Arial";
txtField.setTextFormat(txt_Fmt);
The following code works, but ONLY if it's in the same class. If I call it on the textField from another class, it does not replace the text. Instead it displays "BLAH" above the old textField, but in the debugger does NOT create a new textField. (So you see "BLAH" and "wheioaheiowa4" overlapped).
Code:
txtField.replaceText( 0, txtField.text.length - 1, "BLAH");
txtField.replaceText( txtField.text.length-1, txtField.text.length, "");
ANY suggestions would be appreciated, or some good links to solid ways of manipulating dynamically created text.
Appending Text To A Textfield?
Hey guys,
New to flash and just trying to create a point of sale application for work. An example of my problem would be..
I have say 5 buttons that have a price and name associated with them. on the left I have a textfield that will show the user the items they selected. Lets say the click on 3 buttons... Guinness, Bulmers and Corona.. each time the button is pressed I want to add the name of the product and price to a list of items that have been selected. In this fashion..
Guinness . . . 3.60
Bulmers . . . . 4.50
Bulmers . . . . 4.50
Corona . . . . 3.70
TOTAL: 16.30
I'm able to store and work out the total fine. I'm just having a problem appending the items to a list.
TextField A Lot Of Space In Between Text?
Hello all,
I have a textfield which takes in some text dynamically. It works fine, however each line break is huge for some reason! WHY!
"Have a butchers here":
Thanks for any help.
Textfield - Get Text Width
It there a method, possibly of the textfield object, that returns the width in pixels that a given string would create?
I'm sure i read the help for this recently but i can't now for the life of me find it. I specifcally remember it saying it would always treat it as one line of text and ignore returns.
I have a way of doing what i want to do (hidden text field and textwidth property) but i'd still like to know if that bit of action script exists.
fgf
Loaded Text Not At Top Of Textfield
Hi,
I have made a dynamic scrolling textfield in which I load three different texts with three buttons. The first time I click a button the text appears at the top. When the user scrolls down and presses another button, the text appears according to where the scrollbar was located at that moment. How can I always make the texts appear at the top?
code on buttons:
on (release) {
loadText = new loadVars();
loadText.load("lening.txt");
loadText.onLoad = function(success) {
if (success) {
// trace(success);
veld.html = true;
veld.htmlText = this.myText;
}
};
}
this is the link
Thanks very much!
Text Movement Within Textfield..How?
I was looking at this site today:
http://www.mortierbrigade.com/
Click on work and then select a portfolio peice.
Notice the text that is highlighted and what happens when you rollover it. The other text moves out of the way.
Does anybody have the slightest idea how this is done?
Text In Dynamic Textfield Gets Cut Off
Hi
I have a dynamic text field which is just one line of text.
For some reason letters like g or p that go below the regular line of text get cut off.
I have made the field bigger, and also played around with the _height Property but it doesn't make a difference.
I have imported the font into the Library. When I embed it the font doesn't cut off but looks very different. And if I change the field to a static field it doesn't cut off either, but the font looks a little different as well.
Any ideas?
AS3 - TextField - HTML Text
Hi,
I would like to find a nice solution to the following problem:
I have a large HTML text containing text and images (<img>) inside a source TextField. I need to split this content into several TextField's of a fix width and height so that no scrolling is required.
I tried to use all the new goodies that AS3 provides (getLineText(), bottomScrollV, etc). They are very helpful and if I had normal text (no HTML tags) to deal with, I could split the content without a problem. My problem is to do this on a HTML content. It is very difficult to find the HTML version of a splitted content.
Does anybody have an idea I could do this job?
Any help is greatly appreciated.
Space Around Text In TextField.
Hi,
See attatched code.
I made a simpel textFiled with some text and a border.
Does anyone knows how to get rid of the extra space between the text and the border of the textField? I'm goning crazy with this.
I made the width of the textFiled the width of the text and the height of the textField the height of the text. But because of the extra space the text will not show as I wanted to be.
Is there a solution for this? To remove the extra space surrounding the text?
Thanks.
Attach Code
var myFont:Font = new libFont();
var myFormatTag:TextFormat = new TextFormat();
var tagContainer:MovieClip = new MovieClip();
addChild(tagContainer);
myFormatTag.color = 0x000000;
myFormatTag.font = myFont.fontName;
var lineTag:TextField = new TextField();
lineTag.name = "TextFieldTag";
lineTag.defaultTextFormat = myFormatTag;
lineTag.text = "gjpqyURL.com";
lineTag.width = lineTag.textWidth;
lineTag.height = lineTag.textHeight;
lineTag.x = 0;
lineTag.y = 0;
lineTag.selectable = true;
lineTag.border = true;
lineTag.embedFonts = true;
lineTag.antiAliasType = AntiAliasType.ADVANCED;
//lineTag.rotation = -90;
tagContainer.addChild(lineTag);
Clear Text In Textfield
I have a textfield with the text "type here" in it. I want it so that when the user clicks in it the text disappears.
The textfield uses an onChange listener to initiate a list filter function so I want to maintain this and add another function just to clear the text.
Text Button In Textfield?
I have a textfield, or a paragraph of text. I want to make one word in the textfield be a rollover which will link to an url. Yes I have selected the word and made it link ok BUT, I'd like it to behave like a button with a rollover state and a hit state. However when i make the word a button and place it into the textfield it moves and doesn't look good when i play it as a test movie. How can i maake a text button in a textfield?
m
TextField Text Bunching Up
Hi everyone. I'm using a dynamic textfield with an arabic typeface (Jalal LT Light, properly embedded) and the characters are getting all bunched up. Has anyone had this problem or know anything about it? I tried setting the letterspacing to > 0 but, while it does what it's supposed to do, many characters are still bunched.
Thanks if anyone has any insight
Getting Coordinates Of Text In TextField
Hi everyone,
I'm working with a simple textfield that loads htmltext from an xml file. After the text loads in the textfield, is there a way to get the coordinates of content contained in a specific xml tag? I want to display an icon across from designated words or phrases, and I was wondering what would be the best way of doing this.
Thanks,
newbie
|