ActionScript 2.0 :: TextField - How To Capture User Answer On Frame 3
Jan 24, 2009
I created text field. Instance name of the text field is answer_txt01. When I enter the right answer "red", it should go to frame 2. However regardless of right or wrong answer, it goes to frame 3. How do I capture the user's answer on frame 3?
answer = answer_txt01.text;
answer_btn.onRelease = function() {
if (answer == "red") {
gotoAndPlay(2);
} else {
gotoAndPlay(3);
}}
View 9 Replies
Similar Posts:
Aug 27, 2010
I have a grid with 12 movieclip buttons. When a button is pushed a answer is displayed and on the answer frame, there's a button "click for more information".
That button points to information in a frame within the mc button. However, when I test it all the buttons on the root timeline appear on top of this information, covering it up.
Also, when you move the mouse while in this "further info" area, it disappears
View 1 Replies
Jun 29, 2009
I'm very new to Flash, and I'm not a programmer, I have an Input text box named txtNe2 where a user will type an answer to a question. I want to evaluate the answer when the user pushes the Enter key and respond by sending the movie to either the "Ne2C" frame or the "Ne2I" frame (for the response to the correct or incorrect answer).
View 4 Replies
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
Feb 10, 2010
For my project i am creating a quiz on the Romans. There are only three questions that the user must answer with three possible answers in frames 3,4 and 5.I want to know the code that would help me to allow a Jpeg (an evaluation of the answer given on each frame) to be placed on frame 6 ready for the user to receive feedback for each answer they have given. So when the user selects an answer, the corresponding jpeg to that answer is placed ready on frame 6 for their arrival after they have answered the third question.
View 1 Replies
Feb 7, 2009
I am working in a AI project: a Chatterbot and it works fine. I work in webdesign, video, 3D and illustration and this personal project eats my free time You should set the answers and questions in the XML file called "bdenglish.xml", it contains a basic example. The bot will understand the new nodes. Actionscript(FLA) processes the user input text and search for an answer in the XML file. The bot can understand several ways to make a question. Also it can memorise the conversation subject if you use XML propierties (It is unfinished) The user can use ENTER key or the SEND button. The bot can know the genre of the user because it is male like default, but it search in a female names list. The output field answer is HTML text, also it support images, animations or sounds. The bot can chat in several languages. You can synchronize video with the answers (bot expression), I am woking in a basic function with video.
I am workin in a alternative answer motor, it would work with the XML. I want to use lipsync in the future for a talking version. How it works? - The bot converts the XML database to an multidimensional array.- The user writes a question - This input is processed in the AS code - The bot searchs in the multidimensional array - The first word must be found - The bot answer the question or it responds something if the question is not found I am not programmer and the AS3 bot was hard for me, but it works. I was trying get a good code and I am work in a better search function. I hope some criticism and comment from Kirupa masters! It is in my personal site:[URL]
View 2 Replies
Jul 8, 2010
I am trying to get an answer from Input text Field and compare it to the correct answer.here is how my code look like:
//I have a confirm button here
confirm_button.addEventListener(MouseEvent.CLICK, ConfirmFunction);
//I have a correct answer as a String here
var correctans:String = "July";
[code]....
This will check if correct answer contains words in the answer from input text field.But that will result on if I key in "July is great", it will still link to the correct answer frame instead of wrong answer frame.I want the answer to be exact same as the correct answer.
View 4 Replies
Mar 17, 2011
I am creating a game that has a gender selection and name entry box on a screen. When users hit the next button, I want to capture which gender they selected and what they typed for their name. I tried using the code found on the adobe website, but that captures every letter typed in real time.
I just started learning actionscript this week, so I'm a noob at it. Currently, when they click on the button boy1 it erases whatevers in the dynamic text box playeronesex and adds the word "woman". When they click the button girl1, it erases whatevers in playeronesex and adds the text "woman". I also need to know how to capture which they finally chose when they hit the next button.
Heres the actionscript for this frame:
//next button
stop();
onbone.addEventListener(MouseEvent.MOUSE_DOWN, nextone);
function nextone(event:MouseEvent):void {
[Code]....
View 2 Replies
Oct 9, 2009
I am working on a site where you customize a postcard for print. The user adds images, text etc. I have run into a problem because I need to have the MC that contains all the images, text etc, captured and sent to me so I know exactly how to lay out the postcard for print.I can't for the life of me figure out how to go about doing this without the user having to "screengrab" or "printAsBitmap" and upload the resulting file.
View 3 Replies
Feb 26, 2010
This can't be too difficult but its killing me. I want my user to be able to type 3 numbers into 3 different input boxes, capture those numbers, calculate and display their average in a fourth text box.
I am not sure how to capture input from a textbox in AS3 in order to do these calculoatilo.
View 1 Replies
Apr 8, 2012
For example, check out [URL] They enable their users to capture videos of themselves and then create animated gifs from them.
Just so this isn't construed as spam, I do not work for Gifyo. It's just an example.
Can this be done now with HTML5? Should I maybe us Javascript? Flash?
View 1 Replies
Mar 2, 2009
what I'm trying to do is allow the user to pick a section of the stage, click, and have the region defined be copied and show up on the other side of the stage. It may be better explained to think of it like a camera game. The player has cross hairs, can move the square (which tracks the mouse) around the stage, and click to capture that square's pixel information, store it to a new movieclip and display it on another area of the stage.
I've found many resources online about capturing BitmapData, including capturing from embedded FLV videos, but I haven't seem to be able to find anyone who has created something like this which captures from a moving region. However, I have seen it done before in a game that is no longer online from PBSkids.org.
Here is what I have so far. Right now, when I click the movieclip loads all white pixel data and I'm not sure why.
[flash=]import flash.display.BitmapData;
import flash.geom.Rectangle;
import flash.geom.Point;
stop();
[Code].....
View 1 Replies
Feb 25, 2009
I have some text that says go to page with a input textfield box and a go button. This is a flash cs4 file.I want to have the user input the page number and have it go to that frame.I am using actionscript 3.0 and have bought 4 books and researched online and still can't find what I am looking for.I can make the go button go to whatever page I want I just don't know how to get the information the user put in the box.
View 2 Replies
May 5, 2010
I am looking to change the background color of a input textField when the user selects that testfield to start populating it. I have done a bunch of searching and I keep coming up with this type of answer...
Code:
myTextField.onSetFocus = Set(evt:Event){
// Change color
}
Problems...
1) Is onSetFocus/onKillFocus still available? From what I can tell it is not.
2) I have my text objects encapsulasted in a class so I do not believe I am able to do it like I have been suggested.
View 2 Replies
Mar 9, 2012
im working on a maths style jigsaw, and ive come across a problem of sorts, ive set random1_txt.text to 1 and random1_txt.text to 2 for testing, basically i want to randomise two textfields between 1 and 10, and also randomise the sign between either a - or a +
the answer can be computed by flash, now what i need it to do is stop on the frame number of the answer in answer_mc, these frames contain graphics of all numbers 1-20 in alpha format, this is so that the answer is in place, now the user can drag and drop movieclips into the answer box, and receive a correct or incorrect response
im at a loss on how to do this, i havent gotten around to randomising the sign as of yet i need to do more research but the general idea is as above
Code:
var startX:Number; //start of draggable piece
var startY:Number;
random1_txt.text = "1"
[Code].....
View 3 Replies
Jul 6, 2009
I'm using AS3 in timeline. I have a three page movieclip (dynamic_mc). Each page is labeled p1..p3. On p1 I have an input text box named userName and button named next_1. On p2 I have a dynamic text box named greetings_1, an input text field named schoolName and two buttons (back1 and next2).On p3 I have another dynamic text box named greetings_2 and two buttons (back_2 and next_3).
On p1 user enters name, which is captured on p2. Once a click next button on p1, I get this error:
TypeError: Error #1009: Cannot access a property or method of a null object reference. at FlashCS4_Curriculum_fla::lesson9_pg6_dynamic_122/frame10() at flash.display::MovieClip/gotoAndStop() at FlashCS4_Curriculum_fla::lesson9_pg6_dynamic_122/goP2()
Why do I get an error when using buttons? Is there a better way to capture input text?
Here is the code by page.
//page 1 = p1stop();
var hisName:String;
next_1.addEventListener(MouseEvent.CLICK, goP2);function goP2(evt:MouseEvent): void{ hisName =userName.text; gotoAndStop("p2");
} // page 2 =p2 greetings_1.text= "Welcome :" +hisName;var school:String;
//next buttonnext_2.addEventListener(MouseEvent.CLICK, goP3);
[Code] .....
View 5 Replies
Feb 26, 2009
I have created an array, and everything seems to be going okay, although I am unable to capture the array's data properly. The Trace function returns something like this :
[Code]....
I need to put ALL that information into a dynamic text? what I am getting now is only the last entry.( Example myItemList[2], but no myItemList[1] or myItemList[0] ) here is the code:
[Code]....
Another option would be to take all this info and put it into 1 variable or something, but I'm not sure how to do that either.
View 12 Replies
Mar 22, 2012
Is there any way of capturing frame as a bitmap of swf loaded with different security domain than the main app?
View 2 Replies
Mar 12, 2011
I'm implementing an Augmented Reality application for android using Flash. In order to get the application working on my Android Phone (nexus One) the Phone Camera must be activated as well. So I need 2 layers one for the background which is the feed of my phone camera and an other one on top of it which is the view from away3d in this case.So setting up a BitmapData object to hold the information of the most recent webcam still-frame I can make this work.
If I use papervision3D library and FLARToolkit we setting up the BitmapData using the following part of the code found from this video tutorial:
//import libraries
import org.libspark.flartoolkit.core.raster.rgb.FLARRgbRaster_BitmapData;
import org.libspark.flartoolkit.detector.FLARSingleMarkerDetector;
[code]....
View 1 Replies
May 18, 2004
i want to capture a <tab> press on a frame action, not a mouse. how do i...
[Code]...
View 3 Replies
May 18, 2004
i want to capture a <tab> press on a frame action, not a mouse. how do i...
key.TAB = function(){
that's what i have to start..
View 3 Replies
Jun 29, 2010
Attached is basically a recreation of the problem. What I'm basically trying to do is a tooltip window with 4 frames. Each frame has different textfields but also some the same. Like the "Weapon" frame has textfields called namebox, typebox, levelbox, and damagebox, while the "Armor" frame has namebox, typebox, levelbox, and defensebox.
In the attachment there is a Movieclip called awd on the stage. It has 2 keyframes in it called "Weapon" and "Drop" each with their own textfields but they are both called "box". I have a click event listener that makes awd go to its second frame and outputs the second child in awd, which will be the textfield. The problem is when I click the first time, awd goes to the second frame but it outputs null instead of Object TextField. When I click again it outputs Object TextField. If I trace the number of children it gives me 2. So I don't know how it can be null.
View 3 Replies
Dec 31, 2010
i want to user print screen command in AS3 and convert into bitmap as background in fullscreen i.e.
print screen from keyboard - keycode i.e. 44 [URL]
i want to know how can i run printscreen code from flash to capture user screen as i want to have flash presentation in 600x600px with disabled desktop and flash presentation should be in center of screen.
Quote:
import flash.system.fscommand;
stage.showDefaultContextMenu = false;
stage.scaleMode = StageScaleMode.NO_SCALE;
fscommand("fullscreen", "true");
[Code].....
View 3 Replies
Jan 13, 2009
Is it possible to capture the image loading event like when the image is fully loaded and such when it is assigned to the htmlText of the textFiel???
I have a scrollPane that contains a textField which is loading an image via img tag where there is no scrollbars initially because the textField is not large enough in the beginning, but it is larger than the scrollPane after the image is fully loaded.. and I am trying to update the scrollPane once the image is fully loaded..
View 0 Replies
Sep 23, 2009
i have an input textfield, this means the user writes something and the text appears on this textfield. the textfield is also multilined and uses wordwrap. It also has fixed size (or the size may vary, but no according to the text content). i want to know when the user writes text that does not appear anymore on the screen because it has exceeded the size of the text that can appear in the textfield.since it is multilined and there is a property that returns the total number of lines, i can know if the text is bigger than the text field if the number of text lines is higher than the number of lines on the screen, but then how do i retrieve this number? (i know there is a property in textfield or textformat that tells the height of a line, and i know the height of the textfield since i set it, but i guess this is the text height only, no spacing between lines, and i dont see any property for that).
View 3 Replies
Dec 3, 2004
I know this may seem like a really simple and stupid question. I'm a programmer, but new to actionscript and my main problems are related to the way flash works (not inherent problems, just my lack of understanding). I've modified the XML Tutorial to load more than one XML file. It works well, but the only problem is, I have a textfield on another frame, which I want to load in the frame 1 actions. The XML code isn't the problem, just an a little background on why I am using ".text =". When I do this, as a test, from within Frame 1 of Layer Name Action Layer;
[Code]...
View 5 Replies
Feb 14, 2008
So i want a simpel textfield where a user write their name and hit the enter key. After hit of the enterkey, the textfield removes and another one is set, with the word Hi + the name. My code:
[Code]...
I know my if sentece is not in a function, and it will be outputtet incorrect in the output panel. But its just to give a feeling on what i was triyng to do.
View 5 Replies
Jun 23, 2011
I'm trying to create a user input textfield which automatically applies the defined format on it. The only problem is: actionscript 3 seems to ignore the format and stubbornly applies the default text format. How can I apply the desired format on user typed text? Here's my code so far. As you can see, for experimental reasons I tried to apply the size "60" on the text, but if you execute the script, the size of the text remains unchanged:
PHP Code:
import flash.text.Font;
import flash.text.TextFormat;
import flash.text.TextField;
var theTextField:TextField = new TextField();
var txtFmt:TextFormat = new TextFormat();
[Code] .....
View 3 Replies
Mar 16, 2012
I have the following function
ActionScript Code:
IncludeInfoItems = function (bool) {
if (!bool) {
proof_txt._visible = true;
} else {
proof_txt._visible = false;
}};
This dynamically on/off the description. I have one text field where user enter the values, If this value is =>1501 then i want to display it true. I am trying like this and getting error.
ActionScript Code:
IncludeInfoItems = function (bool) {
if (!bool) {
if (check_amount_mc.text ==> 501) {
proof_txt._visible = true;
}} else {
proof_txt._visible = false;
}};
View 2 Replies
Jan 3, 2010
Is there a script similar to the image below that lets the user press a copy button to copy text to their clipboards (instead of right-clicking to copy)? Here's the URL where I got that image: [URL]. Where I can find a script to do implement that functionality?
View 2 Replies