ActionScript 2.0 :: Clear A Dynamic Text Field?
Sep 21, 2009I need the proper command to clear a dynamic text field
View 5 RepliesI need the proper command to clear a dynamic text field
View 5 RepliesI'm making a calculator using Flash MX that works the same way as the basic calculator found on windows (not the scientific one). But having the user input a number, store it as a variable, store which function the user wants to perform and clear the text field then store the new input in the same text field as a different variable and multiply or add or divide or subtract the 2 numbers and getting the equals sign to display the answer when clicked is harder than I thought it would be.
View 3 RepliesWhats the action script to clear a text field?
View 4 RepliesThe theme question sais it all. I have an input text-field on the stage that has some text describing text in it before the user types anything. Now, how do I clear this text when the user focuses on (clicks) the field?
View 3 RepliesHow can you clear an input text field?
Say you have a user type a password in a text field, and if they get it wrong, what's a way actionscript can clear that text field so the user has a blank field to try and type into again?
I have something like this that doesn't work:
Code:
letrAOne = inputAOne;
if (letrAOne == "A") {
_root.letterAOne.gotoAndPlay(2);
}
else { inputAOne = "";
}
i'm trying to clear an input text field when i click back on the button to return to the page it will be clear for the next person to use etc except atm i can't get it to work i know its something along the lines of:
input_txt = "";
but how to do that from outside the Movie clip is a mystery to me.
I have a code that clear textfield when you click inside. My problem is that I have to many text fields so i am trying to write some function that can be used for all the text fields.
What I can't do is to add some other property to the textfield like I can do with any variable. So my code is:
// nome is a textField
var nome:TextField;
nome.text = "ol�" // text displayed inside the text field
[Code]....
I'm loading data in to textbox1 and on click I load more data in to textbox1 by replacing the existing data. Every time I load data there are hyperlinks in the text. Now I need to clear all the hyperlinks that was there when I click my next button to load more data. How can I clear all the links within the textbox when I click a button?
e,g,
//1st load
for(var i:Number=0; i<messageA.length; i++){
[code].....
I have a text field, which holds the session value. Now while when i do logout operation.. clearing the text field does not work...
sessionHold.text = ""; The above code does not work, its not clearing the session value in the field.
appSes = event.result as Array
var vinoth:String = String(appSes[0]);
Alert.show(vinoth);
sessionHold.text = appSes[1];
I have a dynamic text on the stage which gets updated (shows numbers) when some buttons are pressed.I just need to know if it is possible to show the first dynamic textfield in another dynamic textfield.Lets say the first dynamic textfield called "price" and the second one called "price2". when a button is pressed, the first dynamic textfield "price" will show a number. is it possible to show whatever is shown in the "price" in "price2" ?
View 1 RepliesI'm creating an XML-driven pie chart in AS3 with 2 text boxes in each pie slice. Both text fields are dynamic in the sense that they are populated by the XML doc and then told where to place themselves in the AS3. I've got them both using the same x and y position to place themselves at the moment (which of course puts them right one top of each other), but I'd like to make one of the fields (which acts like a label or a title to the larger number and % text field) place itself in a particular spot around the other text field. The result I'm looking for is to have the smaller "title" text field appear approximately 5 pixels above and left-justified to the larger "percentage" field.
Anyway, here are two sections of code that I've currently got. The first chunk, for the Tags portion, sets the position for the "percentage" text field using a good old x and y method. The second chunk, for Titles, is setting the position for the smaller "title" text.
//evaluate tags
private function evaluateTags():void{
for (s=0; s
[Code]....
I am trying to clear an input text field once reset is pressed.
I currently have
on (release) {
_root.textfield="";
}
on the reset button
and on the 1st frame of the reset button
function clearForm() {
textfield.text="";
}
Do I need both? I have tried 1 without the other and still no results.
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.
Is it possible to login through flash using one Dynamic Text Field and one Input Text Field and no buttons? If so how? I have seen many tutorials dealing with logging in to PHP using flash but it requires you to make your own php scripts which i am not familiar with. Can some one tell me how to do this with PHPBBs existing php scripts... I want to be able to login thorugh a Input Text Field box and have it verify it in PHP and also be able to register and view other PHP info such as users online and FAQ..
View 2 Repliesi have a problem with the line space flash creates when a dynamic text is loaded in a dynamic text field on the stage i put a dynamic textFild with istance name "profile_text". then im loadin in it a text. my text is written in the Notepad like this
[Code]...
i already set a Textformat to my dynamic text with i tryied to play with the "Leading".. but i think it something dealing with paragraph. how i can decrease spacing between paragraphs??
All I want to do is add text from my string to dynamic text field when I click dynamic buttons. What should the as code be for this? Here is my code. Right now I just have the click returning another shape.
[Code]....
What I'm trying to do is to write something in an input field and then it should show up in a dinamic field. I can make this happen, but the problem is that the dinamic field shows its new text in the same format as the Input field. For example, the input text is written in TimesNewRoman and the dinamic text is in Arial, but when the dinamic text shows the input, the text is still in TimesNewRoman when I want it to be in Arial.
View 11 RepliesI have 2 input textfields on the stage and 1 dynamic textfield.
-input1 is for quantity
-input2 is for page count
When a user enters a number into the page count it makes a calculation and places the outcome into the dynamic textfield. This textfield is for the individual price.All of this so far works. What I want to do now is create another dynamic textfield for the total. So the individual price is multiplied by the quantity and this result is put in the new dynamic text field. I have the code for that working but here is where it gets tricky (for me anyway).The total price is to start off invisible. When I roll over the individual price the total price is to appear (For a test lets just say when I roll over an area the total price appears).To stop cursor flickering this should be done inside a movieclip. So... I have create a movieclip and placed a dynamic textfield inside it. They all have instance names BUT how do I reference it in script?I need to tell the resulting calculation to be placed inside the textfield which is inside the movieclip. If it isn't inside a movie clip I can do it. But how to I reference it when inside one?
Problem: I am trying to get a very simple text resize going, for my main content area in a flash website. My aim is to get a button, that on click, increases the text size of a dynamic text field.
[Code]....
This is what I tried, I am very new to Action Script, so excuse the futility of my code.
I'm trying to input a dynamic text field into many dynamic movies. I use a for loop to successfully create 18 movies. I can't seem to get the text to be input dynamically however. The dynamic text field in the dynamic movies is named eventText. This code in the for loop successfully creates 18 movies:
[Code]....
I am using buttons with a dynamic textfield and a function to set the label for various different buttons:
public function setLabel(thisLabel:String) {
visibleLabel.text = thisLabel;
}
I set a label for each button:
btn_mc.button1.setLabel("2 | Al Sabkha Bus Station - Al Qusais Police Housing");
I have a dynamic textfield ... myText ... which I would like to use as a page title ... so once the button has been clicked, the dynamic textfield should update with the label of the button clicked.
What code can I use to shrink a piece of text in a dynamic text field to fit within a certain height and width.
View 1 RepliesI have a text inside a xml file and i would like to display this text in a dynamic text field, using the xmlConnector.The files are at the following address:[url]............
View 1 RepliesHow do I center text in within the border of a multiline Dynamic text field?
View 3 RepliesIm using a standard font (Gotham rounded) within a dynamic text field. As soon as I embed the numerals within this text field the text lowers within the text field.Double clicking the field then renders the text higher up! It seems that the height it shows when I double click is the height it compiles atThe other strange and annoying thing is that my colleague working on the same project is using the exact same font and same file but this doesnt happen to him and so the font redners out differently when he compiles
View 1 RepliesI'm trying to use a dynamic text field to pull in html text that contains a bulleted list. Easy enough, that works. But the bullets dont take on the color assigned to the field. I've tried putting it in the html text and also using NewTextFormat and neither work. Can someone help me. This should be a simple fix, but I can't find it... I just want my text and bullets to both be white.
Simple code below. Using html text inside the flash document and having a dynamic field on the screen named txt. Code should turn text and bullets green, but it doesn't work, only text turns green
this.txt.html = true;
var my_fmt:TextFormat = new TextFormat();my_fmt.color = 0x00FF00; // hex value for green
this.txt.htmlText = "<P> This is the first paragraph</P><BR><UL><LI>Bullet 1</LI><LI><BR>Bullet 2</LI><LI><BR>Bullet 3</LI><LI><BR>Bullet 4</LI><LI><BR>Bullet 5</LI></UL>";this.txt.setTextFormat(my_fmt);
So, I have some basic actionscript code. It's a legacy site, so I'm using AS2. The line of code simply does this:
myField.text = "some text"
So, I select the text field on the stage, then ensure the font is embedded. All the glyphs I want are checked, but then when I compile and test, the fonts don't show up when the code is executed. Instead, the textfield is blank! What happened?! Where did the text go?
I should mention that the .swf which I compile is loaded into another parent .swf during runtime. If that parent .swf does not contain embedded fonts, is that why it's broken?
I made a scrollbar, but now I have a problem, need to read the number of lines of Dynamic text field and if it is greater than x show the scrollbar and hide if is less. Like this:
if(text.instance>7){
scrollbar._visible = true;
}
else{
scrollbar._visible = false;
}
My problem is how do I count the total lines of dynamic text field after load a external text.
I am working in Flash CS5 and I have placed a text field (dynamic, classic text) on the stage. I am accessing it through Actionscript on the same frame like this:
var ct:TextField = TextField(getChildByName("Temperature"));
ct.text = "Hello world";
What ACTUALLY appears is this: So... The H, Ls, and D are gone. Mysteriously. Without warning. I am sitting here utterly confused. Is this just me?
PS. The text field is set to Myriad Pro Bold, a font on my computer, so it isn't like it's a font problem.
I have many countries like netherland,italy,beligum etc.. I am creating empty movieClip, inside that empty movieClip am creating dynamic text field and assigning the different countries text.. but that font is not dispalying as such in the text Field..
View 9 Replies