ActionScript 3 :: Flash - Check Input Text With Movie Clip Button?

Jan 30, 2012

im just working on my new project. All what i need is, i want to check input text using button, if the value on the input text box is equals 1, trace("true"), else trace ("false").

here's the example link [URL]

the problem is, when im trying to input text to 1, it's always goes to else, which means false. also all number. sorry for my bad english. here's what i did

var check:Boolean = false;
var input1:String;
var answer:String = "1";

[Code]....

View 2 Replies


Similar Posts:


Actionscript :: Input Text And Check Button?

Dec 24, 2009

My project is to get a input text from user and user can check their answer by simply click on the button check, if their answer is true a message "good job" will be display. but,my code have an error.check this code 4 me? .

ans1_box.restrict = "0123456789";
var setUpProblem:Function = function():Void
{

[code]........

View 1 Replies

ActionScript 3.0 :: Flash Using Input Text That's In A Movie Clip

Jan 9, 2012

Tearing my hair out on this, and it seems like it shouldn't be that difficult.I've got an input text box (opAnswerTxt) that I've added to a movie clip (questAns) using AS3:That's fine -- I'm able to type text into the text field. Now I need to trace this text. (Ultimately, I will want to capture the text in a variable and then reuse the text in a dynamic text field, but just tracing to make sure I can get the text first.)I added a button (opSaveBtn) - also to the MC - and added an event listener to the button:[code]My output is the original default text I have in the text box, rather than the text I just typed in.When I add the input text box to the stage, rather than to the MC, it works fine.[code]

View 2 Replies

ActionScript 3.0 :: Using A Button To Check An Input Text Field

Dec 14, 2010

I am an educator and I am designing an interactive activity for my students. I created two buttons named button_B and button_G, and an input textfield named in_Text.when a student presses button_B, the letter "B" is entered into the input text field; if a student presses button_G, the letter "G" is entered into the input text field. More than one letter entry is acceptable as a student's answer: for exmple the entry BBB, BGB within the input field is okay.I have no trouble writing AS3 to accomplish this task, however:For a student's solution to the input text field to be correct, it has to contain the four values BBB, GGG, BGB, and GBG in any order. I created an array named solution_S with these values. I also have an enter the solution button named enter_btn. The student can check their solution by pressing the enter_btn button; if the input textfield is correct, the quiz moves on to the next frame in my timeline; if it is incorrect, it moves to a different frame in my timeline.

View 3 Replies

ActionScript 3.0 :: Check Text Inside Movie Clip To XML File?

Sep 17, 2010

this current situation as i cant seem to find a solution anywhere.The Coding are below:

ActionScript Code:
var xmlReq:URLRequest = new URLRequest("Beginner.xml");
var xmlloader:URLLoader = new URLLoader();

[code].....

View 9 Replies

Load Input Text Into A Movie Clip?

Sep 22, 2009

I am trying to load text that someone enters on the main timeline into a dynamic text field embedded in a movie clip.

variable name of the input text is "EmailName"

instance name of the dynamic text within the movie clip is named "txtEmailName" it's variable name is "EmailName"

View 1 Replies

ActionScript 3.0 :: Text Input Check In Flash

Oct 3, 2011

I have created a simple game which asks young children to spell in a text input box the image they see - typically banana, apple etc. I have a text input box into which they spell the word. A button they click to check their answer and a dynamic text box which displays either Wrong or Well done. The code I have applied to the button is pasted below:

on (press) {
if (answer1.text.indexOf("banana") != -1) {
show.text="well done";
} else {show.text="wrong";
}}

The problem I am having is that if they have a variant of the answer in the input text box it displays correct. For example, with the code above, the following answer would receive a correct response - "bananananananan". Is there any way to slightly tweek the code so that they need to spell the exact word? I have noticed that this works the same for simple maths questions. 5 + 5 with an answer of 1000 will give a correct response because somewhere in the answer is 10.

View 4 Replies

ActionScript 3.0 :: Text Input To Control Movie Clip?

May 5, 2011

I've been trying to contol a movie clip by inputting certain text. I've tried different bits that I've found online, but I can't seem to get it right.I want it so that it only if the text is (for the purpose of this) "Test" and you press enter does it call the function "doSomething" else it doesn't allow you to enter it, or it calls a different function.This is the code I have:Quote:

myText.addEventListener(KeyboardEvent.KEY_DOWN,han dler);
function handler(event:KeyboardEvent){
if(event.charCode == 13)

[code]......

View 3 Replies

Actionscript 3.0 :: Move A Movie Clip By Input Text?

Apr 16, 2010

I want to move a movie clip by input text x , y , z when i put value in text feild the movie clip is move ..

View 2 Replies

ActionScript 2.0 :: Input Text Does Not Work Within A Movie Clip?

Jun 6, 2008

how to make input text work when within a movie clip? I have a scroll with text and on the bottom i have my input fields, but when i view it it appears that you can type in it but nothing happens... the field from comes through fine though.

View 6 Replies

ActionScript 3.0 :: Text Input Enlarges Movie Clip Too Much?

Feb 22, 2009

in CS4:

public class TestComponent extends MovieClip{
var textInput:TextInput = new TextInput();
function TestComponent():void{

[Code].....

why the height has become 100 instead of 22, like the textInput. Right now I just have to store the height before adding stuff to it since components seem to "corrupt" it.

View 1 Replies

ActionScript 2.0 :: Using Input Text To Trigger Movie Clip Events?

Feb 13, 2009

I'm trying to do something that seems simple, but I've been looking all over for the right information and I can't seem to find it.I've got an input text field and various movieclips. On the click of a button or hitting "enter", i am able to trace what is typed into the input text field.I want certain inputted numbers to trigger movie clip events (gotoAndStop, etc).

View 2 Replies

ActionScript 2.0 :: Put An Input Text Field Inside Of A Movie Clip?

Apr 26, 2010

How can i put an input text field inside of a movie clip?

View 9 Replies

ActionScript 3.0 :: Input Text Inside Dragable Movie Clip?

Oct 1, 2010

i was create a input text field inside a movie clip movie clip > input text field i am creating a dragg able game,so this movie clip was called from library and then i give it dynamic listener for dragging ability

Code:
var mc:hub = new hub();
mc.name="myClip"+ke;
this.addChild(mc);

[Code].....

and there is no default value. i was search from internet and have solution to set mousechildren to false,but if i do it,i could use my input field second question is how i acces my input text if i use movieclipname.inputtextname.text it got error., i can use getChildByName because i add many of this movieclip from library.

View 2 Replies

ActionScript 2.0 :: Make A Draggable Movie Clip With An Input Text Box In It?

Aug 27, 2004

I want to make a draggable movie clip with an input text box in it. It's going to be a "Make your own comic" game, where you can type in the speach bubbles what you want the characters to say.

View 7 Replies

ActionScript 2.0 :: Dynamic Text Not Displaying Input Inside Movie Clip

Aug 22, 2011

I'm updating a game in a Flash, using Actionscript 2 (what it was originally built in). It's a quiz game with different categories. At the end of each test is a results page showing their score for each of all the categories; each score being saved and displayed each time it's brought up. I need to have a print button added to this page, which I was able to do with

Code:
printButton.onPress = function() {
print(drawingArea, "bframe")
}

And labeling the frame of what I want to print #p. This works, but the drawback is, I can do that on each results page frame for each category; the error that results from multiple frames labeled the same thing, 'causes the dynamic text fields displaying the score to go blank when the print button is clicked. Even if it didn't, it would still print all of the frames with that label, printing multiple copies of the same results screen. Initially I planned to tie all the quizzes to a single results page; one results page, one results frame, only one frame with the #p label, and is the only thing printed.

The problem there is, I need to be able to have a back button that goes back to a point in the category the user just finished; so they can take the test again if they want, or take another part of the test in that category. So my idea was to put all of the dynamic text fields and the print button, inside a movie clip. All the text boxes have maintained their names and have embedding enabled. All of the actionscript, on any level of that frame, has been placed accordingly into the movie clip - and yet the dynamic text boxes will not populate with the score like they do outside the movie clip.

Worst still, the print button wont work at all inside the movie clip. Clearly I'm missing something, but I can't be that far off base in thinking this would work, am I? If I can make the movie clip show the results and work the print button, then I can use instances of the movie clip in as many frames as I need, but the only place the script or label for the print button will exist, is inside the movie clip. This is the script for the button putting the data into the text fields.

Code:
on (release) {
gotoAndStop ("resultsGK"){
warningMsg2 = clear ();
if (saveRecordName_var == "" | saveRecordName_var == undefined){
warningMsg2 = "Name doesn't exist,
[Code] .....

View 1 Replies

ActionScript 2.0 :: Can't Make Text Input Affect Resizing Of Movie Clip

Jun 13, 2007

I have a Runtime Input Textfield nested in a Dynamic draggable/scalable Movie Clip

How can I make the text input affect the resizing of the movie clip?

I got this... that puts trace on the textfield after the movie has been exported.[code]...

View 5 Replies

ActionScript 3.0 :: Input Text Control Time Line And Movie Clip?

Apr 3, 2011

I would think this would be pretty simple, but I don't really know anything about actionscript 3.0. Please put this into terms I can understand. Basically, I want to be able to input text in a text box and have the movie jump to another frame based on what is typed into the box after the "enter" key is pressed. For example, If you type "Frame 2" and press enter, It could go to frame 2 and stop.

Additionally, I want to beable to have it control movie clips within the frame. For example, if you type "MovieClip1 Frame 3" it could seemingly transform an individual element in the frame by making the movie clip go to and stop at it's third frame.Finally, in the case that something is typed that doesn't match up (that the movie "doesn't understand,") I would like a movie clip to switch from being invisible (frame 1 of the movie clip) to showing an error message (frame 2 of the movie clip).The idea is, I want to make a visual text-based adventure game. Like, you could type "go north" and it would go to frame 3 where there's the northern part of the village.

View 5 Replies

ActionScript 3.0 :: Flash Form - Multiple Text Input / Dropdown And Check Boxes

May 4, 2011

I am new to writing ActionScript and I'm designing a customer form for my web site. I am using multiple textInput's, Dropdown boxes and check boxes. Here is some of the code I have now for this form: [URL].
Code:
package{
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.net.*;
[Code] .....

View 1 Replies

ActionScript 2.0 :: DropTest - Check And See If The Dragged Movie Clip Is Completely Within The Bounds Of Another Movie Clip

Jan 11, 2010

I'm creating a small drag & drop activity, and I want to be able to check and see if the dragged movie clip is completely within the bounds of another movie clip (or at least in the bounds of a certain x/y zone on the main stage. I can't use dropTest because it returns true if any tiny bit of the movie clip overlaps with the dropTest movie clip.

I also thought of something that just checks the x/y coordinates of the dragged movie clip, but I'd need this to reflect a range of values rather than one coordinate. For instance, I'd want to return true if the movie clip's x is between 50-60 AND the y is between 50-60. I'm attaching a small graphic to illustrate in case my explanation isn't clear enough [URL]

View 3 Replies

ActionScript 3.0 :: Movie Clip On Main Timeline Receiving Input From Nested Movie Clip

Feb 23, 2011

I've got a main timeline .swf file called "blank.swf" which contains nothing but two blank movie clips one called called "pproduct", the other called "ppalette". In the script frame of this main timeline I use the simple "Loader = new Loader();" method to load a URL of an .swf file into the "ppalette" movie clip. The "ppalette" movie clip contains several color chip buttons, each of which use the same Loader method above to load an external .swf into a clip. Here's what I want to do: let those color chip buttons, when the "blank.swf" file loads, be used to load an .swf movie into the "pproduct" clip on the main timeline. I'm wanting to be able to swap depths with various movie clips which will take out the movie which has the palette, but I want whatever that palette has loaded in the original "pproduct" clip to stay there.

[Code]...

View 3 Replies

ActionScript 2.0 :: Check Input Text For Response?

Nov 8, 2010

I have made a text field and a button. The button has the following script applied:
on (press) {
if (textbox.text.indexOf("batman") != -1) {
gotoAndStop(2);
}}
This is taken from a tutorial and works, but it sends me to frame two if I type in "batmannnnnodppsidjssnakd" for example. Could I easily make this just respond if the textbox ONLY contains batman?

View 6 Replies

Flex :: Text Input Validation For Numeric Check?

Apr 30, 2011

I am seeing a strange issue in flex. I need to reset all text input fields to 0 once the
user submits the values to be calculated. In the method

private function calculate():void {
resetToZero();
var num:Number = parseFloat(s21.text);

[code].....

View 1 Replies

ActionScript 2.0 :: Form Field To Check Length Of Input Text?

Feb 27, 2006

i'm trying to get a Flash form to test certain conditions, one of which is the full date (ie 2006 as opposed to 06), but the AS below (in bold) isn't working... does anybody know the right script?

on (release) {
if (!name.length) {
text.emailstatus = "please enter your name";

[code]....

View 15 Replies

ActionScript 3.0 :: Loop Objects On Stage Input Text Check Box?

Oct 9, 2010

i have several check boxes and input texts on stage and would like to null out their values with a reset button but seem to be having issues, can anyone take a look

[Code]....

TypeError: Error #1010: A term is undefined and has no properties.
at Main/resetHandler()

View 9 Replies

ActionScript 2.0 :: Check What The User Types In Input Text Field?

Nov 25, 2010

I have input text box. the user can place there answer to question 1 in the textbox. what is the capital of the united Kingdom.the answer is london. so i want a to be able to check the user has subbmitted and typed letters london as there answer. i want to check in iput textbox ( the letter keys "london")

ActionScript Code:
var score = 0;
if(question1 == "london"){
score +=1;

View 9 Replies

ActionScript 2.0 :: If Statement: Check If An Input Text Field Is Empty

Jun 3, 2004

I want to check if an input text field is empty. I only managed to do it this way;

mytext = textfield.text;
if(mytext != "") .....

The problem with this approach is that I also want to exclude variables with whitespaces.
I tried; if(!isEmpty(mytext) )..... but that didnt work.

View 11 Replies

ActionScript 2.0 :: Check User Answer By Checking Input Text Box

Jul 26, 2004

how do i check the answer that enter by user.... the marks is given by checking whether they user key in the keywords or not... i m thinking of using string method...but i not able to do it...

View 1 Replies

ActionScript 2.0 :: Check To See If The User Inputted A Number Into An Input Text Field

Jan 28, 2010

I'm trying to do a check to see if the user inputed a number into an input text field. I'm also running a check to see if the user has left the input blank (which works just fine), but I can seem to get the NaN function working.

(using actionscript 2.0 w/ flash CS3)

Quote:

this.btn_step1next.onRelease = function() {
if ( zipcode.text == "" || zipcode.text == isNaN() ) {
message.text = "Please enter your ZIP code to continue.";
} else {

[Code]....

View 2 Replies

ActionScript 2.0 :: Dynamic Text Box And A Movie Clip With A Button In It In The Same Frame

Apr 28, 2002

I have a dynamic text box and a movie clip with a button in it in the same frame. What I want to happen is when you click the button, it will add 1 to the text box. (when I say 'Add one' I mean if the text box says 5, after pushing the button, it will equal 6). I hope people understand what I mean, if not, ill try to explain it better.

View 14 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved