ActionScript 2.0 :: Make A Flash Movie Where To Press A Button And A Number Appears In A Text Field?
May 11, 2005How do you make a flash movie where you press a button and a number (lts say three) appears in a text field?
View 6 RepliesHow do you make a flash movie where you press a button and a number (lts say three) appears in a text field?
View 6 RepliesHow do you make a flash movie where you press a button and a number (lts say three) appears in a text field?
View 6 Replieshow i can make the button when i press it do not load movie number twice(x2)?. and when you press again the button load the movie ,i just want to load just one time, the movie and when u click on it don't play again.
View 3 RepliesCan someone point me in the direction of a tutorial to scroll a text field down and up with the press of the 'down' and 'up' button? I realize this is very simple, so if you could be so kind to take 20 seconds and let me know.
View 3 RepliesI wrote a code that's suppose to change the number in a dynamic text when I press a button,<br>What did I do wrong?
Object(root).currentNum=1;
Object(root).pageNum.text = Object(root).currentNum;
Object(root).arrowLeft.addEventListener(MouseEvent .CLICK, arrowLeftClick);
function arrowLeftClick (e:MouseEvent):void{
Object(root).currentNum-=1;
}
now it's only showing me the number 1.
I *know* this is simple. I've read every thread on this board pertaining to this (including senocular's Best Of thread), done everything there and this still doesn't work and I can't see why.
I feel like an idiot even asking, because I've seen the examples and lengthy tutorials.
All I want to do, is change the color of a dynamic text field when you press a button. But I want the name of the field to be a variable.
Now, this is what's there:
1. the variable "_root.expinttype1" is equal to "branch" and is set elsewhere.
1a. There is an existing dynamic field called "branch" on screen.
2. On the button release I set the format:
[Code]....
Why? I set a dummy variable txt = _root.expinttype1; and even threw it into a text field to verify the data, and it shows "branch", so why doesn't this work?
i wanted to do a simple action that when you press a button a video appears, it's just that. But I don't have enough knowledge about flash and it's scripts.
View 4 Repliesi need to make a certain movie clip play when i press a button.
View 4 Repliesis there any way to increment a display number up or down my clicking / holding a button?
im making a project to select a fuel tank capacity and want the default to be 0.0 gallons and have the user increase the number or decrease the number by clicking and up or down arrow button... If they hold the same button that function would ideally increment faster, perhaps by multiples of ten until it reached a max / min number.
Is it possible to make a MC in flash and then randomise where it appears within the movie?
View 7 RepliesMy work need me create this flash:
When movie(flv) stop, one "continue" button appears, so you can click on it to go to next page.
I have a dynamic text box that acquires text from a txt file.
Sometimes the text is greater than the text field so I want to be able to show a page up and page down button. However I do not want these displayed if the text does not exceed the field.
Currently the buttons are always displayed.
I understand how to get the text field info, I do not understand the "easy" bit of only loading the buttons if the text field size is exceeded.
im fresh in action script and in new member on this forum. I work in AS2. So i have 10 buttons. I need script which will increase the number for 1, (0/10) when pressed. When the same button is pressed twice, then i want not to raise the number. When all the buttons are pressed, (when the number reaches 10/10) i wish that animation play.
View 11 RepliesWhen I click on a field to edit, the | symbol that allows you to type new text (for example, a timeline folder's name) disappears as quickly as it appears, therefore no way to edit anything.
View 9 RepliesI'm trying to make a button to load an input text field for email addresses. I've been trying lots of different approaches but nothing seems to be working.Code:Quote:
on (release) {loadVariablesNum("subscription.php",0,"POST");
gotoAndStop("thanks");
}
I just need the button to communicate with the PHP code I have setup.
I want to catch the enter key press when the user is filling an input text field in AS3.I think I have to do something like this:
nputText.addEventListener(Event. ? , func);
function func(e:Event):void{
if(e. ? == "Enter"){
[code]....
look into the Fla when I press the submit button without filling the name field the error message displayed Enter Your Name, how I write the code for the combo box so that without selecting a country no body can proceed ?
View 2 RepliesI have a interactive movie clip with buttons. The problem I have with my movie clip is that whilst the movie is playing and I click the forebtn, it stops the movie. Ideally I would like the movie clip to start playing straight away when I press the fore button.
[Code]..
I got help the other day of how to add dynamic text as the tutorial didn't work for me(that worked). but how to preload the text as it appears later than the movie which had already preloaded(i made a simple preloader for now) the address [URL]
View 13 RepliesI'm trying to build a flash keypad that fills in input text boxes when you press a button.I have two input text fields. I can assign each button a number and tell it to display that number in the text field when pressed. for example:
Code:
but1.onPress=function(){
InputText1.text += 1
}
[code]....
I can't seem to get the buttons to fill in the second text field.
whats the code
on (release) {
nextImage.text.copy();???
}
i dont know if im in the correct area
The code runs fine, but the problem I'm having is that the text box that is suppose to go onto of my answer buttons is behind the button itself... however, if I change two lines of code around, the answer validation code doesn't pick up the which answer was clicked (it returns undefined). This is infuriating!Look for the line "//INSERT HERE." If I take the line, "var answerField:TextField = createText(answer,answerFormat,answerSprite,0,0,450);" and put it there instead, it returns the right answers (doesn't return undefined), but I can no longer see the text. I've included the createText function as well.
private function askQuestion()
{
trace("asking question...");
[code]......
I want is to take a the text from and input text box and when you press a submit button have it post to a php page. All was going well... but then I changed my code from value1 = "password" to value1 = password.text; and the php instead of coming back with the user's password, comes back undefined. WHY WHY WHy, does it except it when I say value1 = "password" and not with the value1 = password.text; (and 'password' is the instance name of the input text... (not using flash vars)
[Code]...
I'm trying to figure out Flash CS5 on my own, and this should be easy, but... All I want to do is validate that the text entered in a text field is a number when a button is clicked. It can be a positive, negative, or decimal, but no letters or symbols.
View 3 Repliesi have a dynamic text field on the stage with the instance name of "inputBox". On the same frame i have the following code...
ActionScript Code:
var firstNumber:Number = 3;
var secondNumber:Number = 5;
[code]....
the above code works perfectly and it does trace back the result. However I'm confused on how i can put the result in the dynamic text field i have on stage. Can i use the instance name to do this...
I am creating a dynamic text field and "next" button. When the movie is played, the number "1" will be displayed on dynamic text field. When the "next" button is pressed, the dynamic text field will display 2 and so on...
It is like 1...2...3...4...5...
I'm writing a scrolling shooter game and have a dynamic text field that holds the game score. Running inside an ENTER_FRAME event listener, it updates every frame. By tracing the variable "score" I get the correct numbers showing up in the output tab, but on screen, I only see the number 2. It doesn't matter what position in the number it is (ie: 20, or 10372, or 521), only that digit will show up. If there is no number 2 in the score, the field only shows the word "Score: "
The variable is declared as such:
var score:int = 0;
The text field is called scoreCard and is set to "Classic Text" and Dynamic Text" and it is 638 pixles wide (almost the entire width of the stage).
Here is the code for updating the scoreCard:
scoreCard.text = 'Score: ' + score;
trace(score);
The trace was simply put in to see if the score was being tallied up correctly, which it is.
I have also tried eliminating 'Score: ' and simply used:
scoreCard.text = score.toString();
and gotten the same results.
I have the need to populate three text fields with a random number in each.How do i wire up each field to retrieve the results of the random number function I've written in Actionscript?
View 7 RepliesI'm working with an input text field that has to contain a max number of characters (90... I set this on the properties panel) and a max number of lines: 6 but i don't know how to set this property.... I've searched, and all I could find was the numLines property, but it doesn't allow to specify the number of lines iI need my text to have...
View 3 RepliesOn my stage I have a dynamic text field (instance name = lives).
In my actionscript I have created a number variable called livesnum. And then beneath that I'm setting the textfields value to be the livesnum variable but I get the following error:
1067: Implicit coercion of a value of type Number to an unrelated type String.
My actionscript is as follows :
var livesnum:Number = 4; //Amount of lives
lives.text = livesnum;
How would I achieve setting the textfield as the numeric value of the variable?