Problem with entering text button
I am an educator and I design an interactive activity for my students. I created two buttons named baby_B and baby_G and an input textfield called in_Text. When a student presses baby_B, the letter 'B' is entered in the text entry field; If a student based on baby_G, the letter 'G' is entered in the text entry field. More than one entry of letter is acceptable as a student response: for exmple the BBB, BGB entry in the entry field is correct. I have no trouble to write AS3 for this task, however:
For the solution of the student in the field of text to be correct, it must contain values such as the BBB, GGG, BGB and GBG in any order. I created an array named solution_S with these values. I also have an entry the solution button named enter_btn. The student can check their solution by pressing the enter_btn button; If the textfield of entry is correct, the quiz going on to the next image my scenario; If it is incorrect, it moves to a different image in my calendar. How would enter this actionscript to achieve? Thank you very much!
I entered the following code, but my animation plays up until this point, he then Trac for a second then slow down; He did this in a continuous loop. Any help! Thank you.
Stop();
baby_B.addEventListener (MouseEvent.CLICK, letterB);
function letterB(event:MouseEvent)
{
in_text.appendText ('B');
}
baby_G.addEventListener (MouseEvent.CLICK, letterG);
function letterG(event:MouseEvent)
{
in_text.appendText ("G");
}
enter_btn.addEventListener (MouseEvent.CLICK, check);
function check(event:MouseEvent):void {}
var solution_S:Array = ["BBB", "BBG", "BGB", "BGG", "GBB", 'GBG', "GGB", "GGG"];
var check: Boolean = false;
for (var i: uint = 0; i < solution_S.length; i ++)
{
if (solution_S [i] m:System.NET.SocketAddress.ToString () == in_text. text)
{
check = true;}
}
}
If (Check)
{
gotoAndStop (61);
}
on the other
{
gotoAndStop (62);
}
These are the following errors I get:
Scene 1, Layer 'action', frame 60, line 21
1119: access of property may be undefined text through a reference with static type fl.controls:TextInput.
Scene 1, Layer 'action', frame 60, line 26
WARNING: 3553: function value used when the Boolean type was expected. Maybe the parentheses () are missing after this function reference.
The first error is using 'Text' where 'text' is required... in_text. text
The second error is not clear, but can be set with the untangle the first. You can simplify the control function by using the indexOf() method...
function check(event:MouseEvent):void {}
var solution_S:Array is ["BBB", "BBG", "BGB", "BGG", "GBB", 'GBG', "GGB", "GGG"];.
If (solution_S.IndexOf (in_text. (Text) > = 0) {}
gotoAndStop (61);
} else {}
gotoAndStop (62);
}
}
Tags: Adobe Animate
Similar Questions
-
I have problems with the text... Help
Hey
I have problems with the text box in indesign cs4...
When I do a text frame and write a short text and want to make a new line and press ENTER, my cursor goes to the next page and the small red cross in the corner of my document apears.
someone knows what to do here?
I realle need your help
Thank you
This has been covered a lot. A BIOS update may be an option to solve the problem of keyboard mapping, you can change your keyboard shortcuts to reassign the digital keypad input to be a paragraph return or you can try simply by changing the State of the numlock - if it is on, turn it off and vice versa. Withthis problem most of the systems that seems to change the function of the two keys back and forth between the enter alpha and entry number.
-
I have a problem with entering my site of creative work on kodakgallery.ca.
Original title: kodak software
I have a problem with enter in my site of creative work on kodakgallery.ca can I enter everything on kodak but creative projects. Kodak contacted, they tried with no. results I have defraged my computer and cleaned but back to the same problem as soon as I touch the creativity he plans tell the parser error or does not not in the entity can help them.
Hello
1. are you referring to a Workflow for creating the InSite to Kodak?
2. are you referring to the web request?
Method 1: Try to perform the clean boot and check if it helps, here is the link:
http://support.Microsoft.com/kb/929135
Note: When you're done to diagnose, follow step 7 in the article to start on normal startup.
Method 2: Download and install Internet Explorer 8, and check if it helps:
Here is the link to download: http://www.microsoft.com/download/en/details.aspx?id=43
If the problem persists, contact Kodak for known problems.
Here is the link: http://kodakgallery.hivelive.com/hives/35bec54339/summary
-
Photoshop: problem with the text tool
Hi there, problems with my text in Photoshop tool. When I try to write, using vertical text is written just a line, a straight line instead of any text. This only started happening in the last hours. I tried to change the texts and closing and start Photoshop again, all without success, please help?
Please reset the text tool
-
Problem with the text is pixelated
Problem with the text is pixelated on iPad retina. You have a solution?
Digital Publishing Suite 101: keep the text accurate in a Raster slideshow
-
problems with the text and rounded rectangles
So I have some rounding of the rectangles in fireworks, then export as fxg, and import it into flash catalyst - but they lose the roundness of rectangles square become. Also have problems with the text as half displaying or doesn't appear do not at all.
feature request
-would be really cool to be able to change the paths in flash catalyst
-Edit the code in code view
see you soon
brand
Hi, the absence of a property of corner radius is a limitation of the FXG export command in Fireworks CS4. We work closely with the Fireworks team to improve interoperability FXG in CS5.
Thank you for your comments and suggestions.
-brian
Team Flash Catalyst
-
Problems with reset toggle buttons that show/hide captions
I have a problem with the buttons toggle that I use to show/hide a number of legends about a single slide of the reset. The rocker works very well on the first button when I click on and off to show or hide a legend. A simple click on and watch legend. One click off the coast and the legend disappears. However, if I leave a legend that is displayed and click on other buttons to show/hide the other legends, they do not show or hide in a single click. They require two clicks. It seems that something continues the read head after that first toggle is used until there is a second click. The same thing happens if I reset to enter action. If I click on a caption and leave it in place and move to another slide, it disappears when I re - get this initial slide. However, it requires two clicks, not one alone, to display the legend. I find it very strange; I learned most of my techniques from the Lilybiri blog, but this problem does not occur on his examples. I think I'm missing something obvious, but may not know what it is. Any help is very appreciated.
Yes, I use Cp6. What I wanted to say about re-use, is that I have different scenarios where a similar script could be used, if your suggestion of a model is a good. My original intention was to write it in a txt for reference. Thank you very much for all your suggestions and links. I'll keep you posted.
-
I have a problem with the dynamic buttons on AC3.
I downloaded a flash with a pre-made navigation model and all the buttons are in English. I am really struggling to do the buttons display Cyrillic text. Whenever I write in Cyrillic text, buttons are empty. Here is the code:
var menu_label:Array = new Array ("Something",
'Something',
'Something',
'Something',
'Something');
var total: Number = menu_label.length;
var i: Number = 0;
var: page number;
var main_menu:MovieClip = new MovieClip();
stage.addChild (main_menu);
for (i = 0; i < total; i ++)
{
btn var = new flashmo_button();
btn.name = "btn" + i;
btn.x = fm_button.x + i * (fm_button.width + 5);
btn.y = fm_button.y;
btn.buttonMode = true;
btn.item_no = i;
btn.flashmo_click_area.addEventListener (Event.ENTER_FRAME, btn_enter);
var each_substring:Array = menu_label [i].split("|");
btn.flashmo_button_label.fm_label.text = each_substring [0];
btn.item_url = each_substring [1];
main_menu.addChild (btn);
}
Any ideas how to solve this problem? Thanks in advance!
PS: I am a complete newbie
Try to join the police in the textfields. If you select the textfield object in the button, theProperties Panel should have a button available called Embed. Click on that and rthen select the characters that you expect, you'll need (the less the better in terms of file size)
-
Weird problem with dynamic text
Hello
I created a dynamic text field - mediaImportName001 (created and it contains the name of a file that I have chosen to import them using a browser (as3 and AIR) button.)
It works very well - I can import the file, and the name appears in the field.
I would now like to pass the content of the text field to another text field. But I'm not content. If I try to find the contents of the textField trace("mediaImportName"+thisNum).text - Flash returns "undefined" (even though I'm him asking to draw once the field has been filled).
I use the following code to check that the material is really there and named correctly (the code returns the children):
for (var i: uint = 0; i < this.numChildren; i ++) {}
trace (this.getChildAt (i) .name + "\t type:" + typeof (this.getChildAt (i)) + "\t" + this.getChildAt (i));
}It returns:
object: type instance370 [object, form]
object: type mediaImportName001 [TextField object]
object: type mediaFiletype001 [TextField object]How can I get Flash to give me the text in mediaImportName001?
It's weird - this.getChildAt (i) .name
from above gives me...
mediaImportName001,
yet
trace (['mediaImportName' + thisNum] .name);
returns undefined (thisNum represents an increment I used to name several clips and text fields and in this case trace (thisNum); return 001)
Any ideas why this happens?
Thank you
Shaun
No logic problem, just a problem with describing the problem (as far as the fix goes) and using the property name (as far as the issue goes). There is a difference between the creation of a dynamic textfield (a type of textfield) and dynamically a textfield (using code to create).
In AS3, the name property is a property and it is not the same as the name of the instance that you can assign to an object on the stage. To target an object using its name property, you must use the getChildByName() method, or alternatively, you can use the variable you used to create it. You may need to cast as a TextField object as well as to operate...
trace (TextField (this.getChildByName ("mediaImportName" + thisNum)). (Text);
which would produce the same result as the use of...
trace (mediaImportName.Text);
I don't know how the numbering disperses on "001", but you might find it easier to work with by storing just the instances of an Array by using the media_file_num to set the index where they get. Then, you would be able to target the textfield to help...
trace (tfArray [thisNum]. (Text);
-
Problem with the text tool.
Hello
I'm having trouble with the text tool in pse 8.
When I type and I get to where I want to start a new line of text and press the Enter key, instead of starting a new line under the rest of the text as it is supposed to and always, before starting the new line of text directly on top of the text line previous. When I continue typing just starts the line of text overlapping. It's really annoying and I have no idea how to fix! It was working fine earlier today.
I hope someone knows how to solve this problem.
-Josh
Try to reset the text tool by clicking on the small facing down
arrow on the far left of the tool options bar and choose
Reset tool.
MTSTUNER
-
Problem with the text to Speech Dictionary Editor
I have a similar problem with Paul. I found that if I use Kate instead of Paul and change Kate dictionary, she did a better job. In fact, I found that the Kate and Paul seem to use dictionary of Kate. So, I do all my editing in the dictionary of Kate.
I submitted a bug on this, plus I had business service Adobe customer on this issue since last September. Still no resolution.
I hope this helps.
Mister C.
-
Problems with the sound button and the wireless button
I have a computer laptop dv6-2155dx, and he has a problem with the sound, the button bar button and the wireless button, all of them continue to work, I do not know if I made a mistake and let them turn off or there is another way to get available.
I need some advice.
Hello
Do a hard reset:
1 disconnect all devices and remove all USB devices and multimedia cards.
2 disconnect the power adapter, remove the battery and then press in and hold the button for at least 1 minute.
3 reconnect the power adapter (do not connect the battery), press the power button
Verification is your problem is resolved or not.
-
I have a problem with Windows 8 buttons.
Original title: problems of Windows 8!
I recently had a problem with most of the buttons. It seems that since I installed a new font, I seem to get white buttons in the application Mail and this http://i.imgur.com/OE6rRxh.jpg?1 around elsewhere.
Thank you to everyone who tries to help him, but if someone can give me the [s] name of the police [s] that are normally used in Windows 8. I think if I re - install the font or fonts for Windows, it will start working again.
I recently had a problem with most of the buttons. It seems that since I installed a new font, I seem to get white buttons in the application Mail and this http://i.imgur.com/OE6rRxh.jpg?1 around elsewhere.
Thank you to everyone who tries to help him, but if someone can give me the [s] name of the police [s] that are normally used in Windows 8. I think if I re - install the font or fonts for Windows, it will start working again.
Hello
Those who are not traditional icons they are symbols that belong to the Segoe UI police.
See the following Web site for an excellent tutorial to solve this problem.
[SOLVED] Unknown character or vertical Rectangles are appearing in place of metro icons in the Windows 8 start screen and login screen - tweaking with Vishal:
Let us know if it works for you.
Concerning
-
Problem with the text block (text cut)
Hello
I have a problem with indesign (last CC version, I have upgradate today in the morning).
I create a document with several pages and each page
is a text box it and the text box are connected (the text content is broadcast through them).
The text box are defined by a paragraph style, where I set the font style, color...
I defined that the box can be 2 colunms and oviously, I also set betwin space columns.
So the apears tex cut in the bottom text box and the rest of the blanks strages.
I enclose a scrrenshot.
Please, help me, I'm stacked in this disorder.
Thnk
I find the solution.
Yhe problem was in the style Panel,
in the tab which, in Italian, is called 'options di separazione.
I am enclosing a copy.
Thank you all
-
Problems with the 'Text Ticker' Widget
Hello, I have a problem with the widget "Ticker text." I tried to put more ticker and then a text on my site, but it does not work, when I look in Muse it looks like this:
and when I look in the preview only the first text ticker works... maybe it is not possible to have more then ticker text on a site?
Thank you.
It seems that you use the same name for all instances of ticker on the page.
You must have a unique name for each ticker you want on a single page. Strips with duplicate names will not work.
See you soon,.
Vikas
Maybe you are looking for
-
How to turn off preview of Web page that is displayed when I move my mouse on a tab?
I don't know why it started today, but it's driving me crazy!I was surfing on the net, when all of a sudden, I noticed that whenever I flew over my mouse one of my tabs, a (lot of rendering) overview of the Web page jump to the top of my mouse. I rea
-
Hi it's very confused, I tried to watch several posts on this topic and have not found a clear answer. I have a Skype Premium Plan that covers Unlimited United States and Canada and a number of Skype online. Now my question is IF I set up on my cell
-
Hello. How can I watch DVD movies on my new iMac?
Hello.. How can I watch DVD movies on my new iMac?
-
Looking for software IPF700.
Hello, everyone, I'm new to this forum. I recently bought an IPF700 used off Craigslist for $175. There is no software or ink. I bought ink and a new maintenance cartridge, installed plain paper and viola, she came back to life. Printer-wise everythi
-
Cannot connect digital video camera
Hello I tried in vain for hours connect a digital video camera to my Vista computer. I tried the camera on other computers and cannot connect to them either. It's a Sony Handycam and I used 4 Pin/4 Pin firewire cable 4 pin/6 pin. I also tried a USB c