ActionScript 3.0 :: Input Text And Sprite Dragging?
Apr 7, 2009
I'm trying to create a draggable dialog, which includes an input text field and I want to prevent the dialog from dragging when the input text is selected. If I create a sprite with a hit area at the top everything works as expected, but when I add the input text field below the hit area selecting the text drags the dialog. Here's an example of the problem:
import flash.display.Sprite;
import flash.events.MouseEvent;
import flash.text.TextField;
[Code].....
View 3 Replies
Similar Posts:
Mar 30, 2009
is it possible for a user to enter a frame, be able to type their name into an InputText field, and then drag it around the screen?
View 5 Replies
Nov 11, 2009
I'm working on a project where I add a text field as a child to a sprite on the stage.
Even though I make it selectable and it's text field type "TextFieldType.INPUT", I still can't select it.
View 2 Replies
Nov 11, 2009
I'm working on a project where I add a text field as a child to a sprite on the stage. Even though I make it selectable and it's text field type "TextFieldType.INPUT", I still can't select it. When I tried adding it as a child to the stage, it worked perfectly and I could select it.
View 8 Replies
Aug 27, 2011
I have a simple AS class:
package Bubbles
{
import flash.display.Sprite;
import flash.events.MouseEvent;
[Code]....
Stage only has that green rectangle on it. If I remove it nothing changes. If I change line thickness to 6 trails does not appear, at 7 and higher they appear. You can check SWF here: [URL]. How do I make it work correctly?
Update: If I change that rectangle shape to something star-like with sharp angles, trails appear even on lower thickness values (trails appear when thickness == 3 or more).
View 2 Replies
Feb 3, 2011
I have an issue with font scaling of a dynamic text box.
Currently i have one input box named input_1 with a variable attached to it named "choc_1".
Also, i have a dynamic text box named dynamic_1 with variable "choc_1".
When the user types something on the input box then the dynamic box changes instantly and displays what the user has written.
auto scale-size the fonts to a smaller size if the user types many letters.
The input_1 box has a 13 character limit. My initial font size is 200, i want to scale down so when the user types 10 letters they fit the box and they don't go out of screen. I want to use one line, so wrap or multiline is not possible.
here's a code that i'm trying to fix but i can't get the dynamic box to change:
[Code].....
View 1 Replies
Feb 3, 2011
I have an issue with font scaling of a dynamic text box.
Currently i have one input box named input_1 with a variable attached to it named "choc_1".
Also, i have a dynamic text box named dynamic_1 with variable "choc_1".
When the user types something on the input box then the dynamic box changes instantly and displays what the user has written.
I've googled a lot, but i can't find a solution to auto scale-size the fonts to a smaller size if the user types many letters.
The input_1 box has a 13 character limit. My initial font size is 200, i want to scale down so when the user types 10 letters they fit the box and they don't go out of screen. I want to use one line, so wrap or multiline is not possible.
here's a code that i'm trying to fix but i can't get the dynamic box to change:
[Code]....
View 0 Replies
Mar 24, 2010
I'm trying to extend the text input that comes in flex to support an icon, just like mac os x search text input has a grey circle aligned to the right, the text input has a addChild method, but it didn't work for me.
View 2 Replies
Apr 28, 2011
the last of many problems, is that at the very end of the test, you're shown your score, and you have the option to type your name in a text box and click "save". Doing so will apply you score data (time elapsed, date, correct answers and percentage) along with the name you typed in, and output in a form, that you can save or print off, or whatever. The problem is, the input text box will not let you type in it. If you mouse over it, the mouse stays a pointer, you don't get the text tool. If you click on it, the cursor appears for a split second after you release the mouse button, but you cannot type anything in it.This is the actionscript for the output form:
Code:
//
function saveRecord(record:String, field:String, now:Object, score:Object):Void {
[code]......
View 3 Replies
Jun 2, 2011
I an trying to capture keyboard and mouse events for square area on my UI, represented by Sprite. The mouse capture works, the keyboard capture doesn't work at all:
[code]...
I never see reportKeyDown executed, even though Sprite object has a focus.
View 2 Replies
Sep 14, 2009
I have an array of rectangular Sprites and ann array of Text Fields. On a certain condition, I want to change the fill colour of some of these Sprites and make the TextFields inside these Sprites editable. I tried the following:
var outerBox_Arr:Array = new Array();
for(var j:int=0; j<8;j++)
{
[code]....
View 1 Replies
Jul 12, 2011
I have 2 keyframes on my timeline.The first keyframe has an input text field (instance name: inputTxt) and a button (instance name: btnTester).When the user clicks the button it takes them to the second keyframe where their text should be displayed in a dynamic text box (instance name: txtBox).I get a null value in keyframe 2.
View 3 Replies
Apr 12, 2007
i created an input text box that puts the users input into a global variable, but when i test it it gives me not only what i have typed in but all the html formatting for the font that my input text box has on it.I only want the text that i have typed in to go into the variable but the wackload of html is going in there too. ive tried a few different things, rewriting my code, recreating the text box, changing settings, dont know what im missing.
View 10 Replies
Jul 3, 2009
I'm trying to build a fahrenheit to celsius convertor in AS3. How can I test to see whether what is input into a text input box (flash component) is not a number? This isn't correct but you can get an idea of what i'm trying to do:
if (celsius_txt.text == NaN || fahrenheit_txt.text == NaN)
{
//do something;
}
View 6 Replies
Mar 19, 2012
I have the following Application tag code in my widget:
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:local="*"
width="100%" height="100%" minWidth="200" minHeight="200" layout="absolute"
creationComplete="init()"
defaultButton="{Send_btn}">
[Code]...
View 1 Replies
Jul 26, 2011
i have an one input text box, first i type text into it and press space bar at this it will become empty and ready to accept next input from starting position, i make the text box empty by
textbox.text = "";
but the cursor not set to initial position in text box it consider "" as "space" and cursor will display after one space only, i need that cursor again move to starting position..
View 3 Replies
Jun 8, 2010
Notice full screen Icon at top left. My contact for will not except text when it's in full screen mode.
View 1 Replies
Apr 15, 2011
Using AS3 to create a basic number guessing game but for some reason the input text field won't accept text input. I can't figure out which piece of code is causing the problem and it's driving me nuts considering it's from a tutorial.
Code:
package
{
import flash.display.MovieClip;
[code]....
View 2 Replies
Jun 2, 2011
[Code]...
This code corresponds to a quiz question where the correct answer is either blue or green. I get the #1009 error if I input "blue". The answer "green" seems to work ok. What's wrong with my code? Is there a better way to make is so more than one answer works? Something like "blue" or "green" or "otheranswer", etc..?
View 3 Replies
Aug 4, 2009
When you drag the orange slider across the thumbnails of chips, it will dynamically change the area above the color bar to that color and display the color name in the same area. The problem is that I would also like the name to display in the black info area below the orange slider as it moves along the colors while dragging. But as you can see, the black info box only displays the color name that you pick it up on and then the one that you drop it on. The code to display it above the color bar and in the black info box below the slider is identical, but for some reason, it won't display in the info box while dragging.It's possible that the code I used to get the info box to follow the slider is doing it, but I don't know an effective other way to do it, considering you can't drag two items at once. Here's the work around that I came up with (on the info box movieClip itself). There's more to it, but here's how I made it follow:
ActionScript Code:
onClipEvent (enterFrame) {
if (_root.dragging) {
[code].....
View 1 Replies
Oct 6, 2010
I'm dragging the uiScrollbar into a dynamic text field. When I preview (control+enter) the scroll bar works fine. When I publish and preview in a browser the outline of the scroll bar is there but with out the parts/components up and down arrows the little bar you grab holt of and pull up and down.
View 1 Replies
Jul 28, 2011
I made an AIR app and enabled it so the user can move it around the desktop where they want. One problem is on a page of textfields, if the user tries to select text (click, drag cursor to select the text) the app drags instead.
Any easy solutions other than having to set up listeners for every textfield and "interrupting" dragging?? (AIR 2.7)
View 1 Replies
Nov 23, 2009
I need to put together an editable text area that has a custom caret (cursor) which is different from the default blinking vertical line. Is the caret a "skinnable" property of text input? note that I am not asking about the mouse pointer cursor which can be set using the CursorManager.
View 1 Replies
Oct 21, 2009
Is it possible to change the text property of a text field that is contained within a sprite? I've been trying but can't come up with the right syntax. Here is what I'm doing:
I've created a sprite named "lessonSprite" and added a text field to it in one function. Now, in another function, I'd like to change the text in the field.
I've tried to use this:
lessonSprite.titleField.text = xmlLsnContent.attribute("title");
where "titleField" is the name of the field added to the sprite "lessonSprite" in an earlier function.
View 4 Replies
Feb 4, 2009
Trying to format input text fields using format buttons in Actionscript has been challenging. I've been able to put some pieces together, however I am still missing some things. Here's my code:
Code:
function selectText() {
startSelect = Selection.getBeginIndex();[code].........
I need the ability to click the Bold button and it bolds or unbolds at the cursor so if I hit the bold button what I type from that point on will be bold until I hit the button again and then it goes back to regular. I am able to change it to bold or unbold by selecting the text and clicking the button but I also need to do it without selecting.
View 3 Replies
Jan 27, 2009
I have 4 dynamic text boxes which duplicates the text from a main input text box. How do I write a code to make visible only the dynamic text box I want when clicked it's check box.What is the CODE to make each "DYNAMIC TEXTBOX" visible when clicked on it's checkbox?
View 6 Replies
Jun 7, 2011
I'm playing around with a messaging type of application. Does anyone know how, or of any tutorials on to "appending" html text to text areas in flex and flex mobile projects? And specifically how I could take that and basically "append" a sprite inline to the text when i need to? Something simple like:Username: some text right here!So, Anyone have any experience "appending" sprites or simple text formatting?how to solve these issues!EDIT:Based on an answer below it was sugguested that it's as simple as...textAreaInstance.htmlText += "<b>Username:</b> some text right here!";But its not. you can't do .htmltext with a text area. you can on a text field, so i tried
var TF:TextField = new TextField();
TF.width = 200;
TF.height = 200;
[code].....
View 3 Replies
Jan 7, 2010
I'm writing a project in flex builder 3 and AS3 to make workflow chart diagrams.Everything works but I'd like to add text on the shapes that i add on the display.. for example I add process block rectangles(which are sprites) or decision block diamonds(also sprites)... I'd like to be able to click on these shapes on the display and add text on top at runtime..i tried adding a white textArea display object over the sprite if it recieves two clicks but it doesn't work...
View 0 Replies
Oct 15, 2009
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]...
View 14 Replies
Jan 26, 2009
I've created a form-like input to receive user input in the form of text in a frame. Now, I would like to pass that input into an external text file. I hope to get help to implement this. Let's assume that this app will be only used locally and not over the web.
View 0 Replies