ActionScript 3.0 :: Type Only Numbers And The Minus (-) Sign Into An Input Textfield

Apr 11, 2008

I would like the client to be able and type only numbers, and the minus (-) sign into an input textfield. The reason I need them able to type a minus (-) sign is in the case they need the number to be negative. However,


View 8 Replies

Similar Posts:

ActionScript 3.0 :: Input Text - Unable To Type In Minus Sign

Feb 26, 2009

I'm having some problems with input text. I'm using
mytext_txt.restrict = "0-9.-"
my only problem is that that the minus sign isn't working in can type everything from 0 to 9 (0-9) and dots (.) but no minus sign (-)...

View 2 Replies

ActionScript 3.0 :: Dynamic Text With Minus Sign?

Jul 1, 2011

why a minus sign breaks my dynamic text field?For example, if I have a plus sign like this it works fine:mytext.text = "+1000";But if I have a minus sign, it only shows the minus and nothing after it:

View 3 Replies

Flash :: Flex - Click On The TextField First Then Type The Numbers

Oct 26, 2010

I want to design a calculator by Flash cs5 , I use appendText Method to write the data in the textfield by the Keyboard . My problem is when I start the application I have to Click on the TextField first then type the numbers. How i can solve it .

View 2 Replies

ActionScript 3.0 :: TextField (input) Not Possible To Type In Certain Chars

Sep 28, 2009

We got some complaints from users not being able to type in certain chars like '@' and '.' in an input field (textfield). The Textfield is an input field type:
Font embedding seems fine (all needed chars are selected + '@' and '.')
Textfield restrict property is set: "a-zA-Z0-9@.\_\-"

Still some users complain not being able to type a '@' or '.' I've googled and searched the forum and the only thing I've found that could cause this was the wmode = 'opaque' property. We need to set this property to show up Facebook Connect windows. Otherwise these windows would get behind the Flash object in the HTML page. Another reason could be related to the regional settings of the keyboard, which might be faulty interpreted by Flash. Or could it simply be related to a faulty restrict (regex) property?

View 2 Replies

ActionScript 3.0 :: Keeping Focus On Textfield Type Input

Feb 24, 2009

On my stage I have an MC with a textfield of type input. I have another MC on stage with the control for the input like bold, and italic. When my textfield has focus and I click on one of the control MC buttons it loses focus. I know I can reset focus with stage.focus but wanted to know if there is a better way. Like disable the control MC from taking the focus off the input text. I thought this was not the behavior. I thought that only another input type control can steal focus until now.

View 3 Replies

Actionscript 3.0 :: Input TextField Custom Font Type?

Jun 15, 2009

So I have an input TextField and I'm wanting to use a custom font for it. I tried to use setTextFormat() with a TextFormat object, which does not make any difference. When setting embedFonts to true, Nothing at all gets displayed. I know the problem isn't with the TextFormat object, because I can apply the same format to a regular TextField and it works

View 1 Replies

ActionScript 3.0 :: Input TextField Inside MovieClips - Cannot Type Anything

Jul 26, 2010

I have a basic input textfield that's inside a couple of movieclips. I have it set to input, and the cursor obediently appears when it's focused. However, any typing on the keyboard yields absolutely nothing. I'm curious as to what needs to happen to an input textfield to actually allow it to grow to become the input textfield it was meant to be. Now, the whole deal runs just fine when tested from the Flash IDE, but once it is published and embedded online it's hopelessly useless. I have two fields, the first being for an email and the second for a password. I've tried just about every combination of setting I could find, but here is the latest:

PHP Code:
emailField.type = TextFieldType.INPUT;
emailField.defaultTextFormat = formatField;
emailField.textColor = fieldColor;emailField.text = "";
emailField.background = true;
emailField.border = true;

I'm aware that how something is embedded somehow effects how it works (though I'm fairly certain the display engine is made by the same people? ), so here is the embed [Code] ..... Everything else works just fine though... how the buttons interact, ExternalInterface, etc.. How what should be the simplest task fails to function just amazes me though. Do I have to literally make listeners to process all of the keyboard input? That would suck... but why would it work fine when I do "Test Project" and not when it's published and embedded?

View 3 Replies

Actionscript 3 :: Cannot Type In An Input TextField With An Embedded Pixel Font

Sep 24, 2011

In order to use a pixel font in my textfields, I have created a font class in the Flash IDE. Then, I created a TextField instance with the font embedded with the anti aliasing set to bitmap. I export an SWC with all those things.I created a class with a nice API to be able to deal with this stuff easily.In FDT, I use class and this all works properly.

The issue here is that I now want to use one of these textfields as an input. I tried setting the textfield type to TextFieldType.INPUT, however the only thing that this does is allow me to select the text, I cannot type. I also created another asset with the type already set to input, does not work either.I tried with just the asset, not with my class, and then I can type ok.Is there something that prevents a textfield from being editable once it is part of a sprite? Here is the code of my class with the API:

package net.jansensan.as3fflikeui.text
// + ----------------------------------------
// [ IMPORTS ]


View 1 Replies

ActionScript 2.0 :: Made An Input Text Field Which Has In Front Of It A Minus Button

Sep 13, 2009

I have made an input text field which has in front of it a minus button. In another place I have a plus button. When I fill the text field my plus button becomes able and I can press it for another text field, an so on. My problem is when I press the minus button, because the fields have to rearrange and I don't know how to do that.

View 5 Replies

ActionScript 2.0 :: Input Textfield And When Type Something And Then Press "ENTER" On The Keyboard?

Mar 1, 2003

How can I have an input textfield and when you type something and then press "ENTER" on the keyboard something happens? Just need to know how to make an enter listener!

View 14 Replies

ActionScript 2.0 :: Type Numbers With Commas Like "2,5" But Flash Only Allows Me To Type Numbers With Dots, Like "2.5" ?

Mar 19, 2010

I have a problem with my input text fieldsI to type numbers with commas like "2,5" but flash only allows me to type numbers with dots, like "2.5"

In Sweden where I live we only use commas on numbers.

Now I have some input textfields that I must change so they work with commas instead of dots.

View 2 Replies

ActionScript 3.0 :: Percent Sign Not Appearing In TextField?

Feb 9, 2009

I have a dynamic text field that is getting its string from a loaded flashvar in the HTML that loads the movie.

Here is my code

var message1txt:String = LoaderInfo(this.root.loaderInfo).parameters.message1txt;
factbar_mc.factbar_messages_mc.message_anim_mc.message1_txt.htmlText = message1txt;

I have tried embedding code, using device fonts... etc. Nothing is working...

View 2 Replies

ActionScript 2.0 :: @ Sign And Quotation Marks Swapped - Input Text?

Sep 28, 2009

I created a contact form for this Flash site using Actionscipt 2.0 The problem I'm having is that when I try to enter the @ sign (shift+') I get quotation marks and vice versa as if I were using a Mac instead of a PC. This only happens in the contact form and works fine when entered anywhere else such as the address bar or a search engine.

View 1 Replies

Flash :: Get Actionscript3 To Type Cast Numbers And Ints In XML Files As Numbers And Ints?

Aug 28, 2009

Everything seems to be a string right now & that kinda ruins the whole xml as an internal data structure thing, I don't need a big tree of string I need typed data :-/ Are there any changes I can make to either my XML files or my AS3 code that will force it to cast ints as ints and Numbers as Numbers? Or maybe some kind of type schema I can impose? Not really worked with XML til recently so chances are I'm just ignorant of the canonical way to deal with this...

View 4 Replies

Actionscript 3 :: Placing Cursor Into Input Textfield For User Input?

Dec 15, 2009

What easiest way to place cursor (focus?) into an textfield input box for receiving user input after an event?

View 1 Replies

Unable To Type Numbers In Flash?

Jul 7, 2010

I cannot type numbers in flash in the text field. I can type letters, however.

I have flash 8 / windows 7 / firefox 3.6.3 / and i have tried the numberslock button on my keyboard, but i still cannot type numbers in the text field.

View 7 Replies

ActionScript 3.0 :: From A Input Textfield To A Dynamic Textfield?

Nov 25, 2010

Have an Input textfield and write e.g. 123 in it (This is on frame 1).Then later in frame 3 I want that number to be shown in a Dynamic textfield.How do I do that?

View 0 Replies

Dynamic Input Box - Adding Two Numbers

Feb 24, 2011

I using Flash CS5 for the first time, and I'm hitting a snag. I have an input box on Scene 1 for age (variable called old). On scene 3, I have a dynamic test box (variable called display), where I want to display the age (old) + 10.

My Code looks like this:
PHP Code:
var Real_age = Number(old) + 10;
display = Real_age;
It's returning NaN.

A trace of the output of Real_age gives:
PHP Code:
<FONT FACE="Times New Roman" SIZE="12" COLOR="#009900" LETTERSPACING="0" KERNING="0">2</FONT></P></TEXTFORMAT>
<p align="left"></p>
<p align="left"></p>
<p align="left"></p>
<p align="left"></p>

The code works OK in Flash 8, but I figure I must have some some setting that is spitting out the unwanted HTML.

View 5 Replies

Actionscript 3 :: Restrict The Input To Numbers Only?

May 26, 2011

i want to restrict the input to numbers only, but do have a problem for an empty entry:

now accessing like this:

var newValue:Number =[event.dataField]

newValue is now for an empty entry not null, but 0...

View 1 Replies

ActionScript 3.0 :: Input Box Wont Allow Numbers?

Jan 25, 2012

When I try typing in numbers into the input text box, nothing happens.Can anyone explain why and/or how to fix?

View 8 Replies

IDE :: Input TextField Not Allowing Input?

May 27, 2009

I am going nuts here. I've searched exhaustively, and cannot seem to find anyone else experiencing my issue, so it must be something elementary I am not grasping. I'm creating TextFields dynamically, for use as input boxes:

function makeText(whatParent, whatText, whatFormat, input){
var thisTextField:TextField = new TextField();


View 1 Replies

ActionScript 2.0 :: CS3 - Input Text Box Not Reading Numbers?

Dec 16, 2009

I have an input text box and I want the user to be able to enter a number in the text box and hit a button and it will jump to that frame of a movie clip. For some reason I can't get the input text to read the input as a number. I have tried using parseInt or Number, but it gives me this output instead. "<TEXTFORMAT LEADING="2"><P ALIGN="CENTER"><FONT FACE="Myriad Pro Light SemiCond" SIZE="13" COLOR="#000000" LETTERSPACING="0" KERNING="0">2</FONT></P></TEXTFORMAT>" when I just want it to say "2".

Here is the code I have linked to the button:

btn_newPage.onRelease = function (){


On the trace of pageString I get the text i put in above and then pageNum comes back as NaN.btn_newPage is the button they would click after they have input a page number in the input text box. pageString is the name of my input text box variable and I was trying to use pageNum to change it to a number. And doc_content is the movie clip I am trying to control.

View 1 Replies

ActionScript 3.0 :: Take Only Numbers Into The Text Input Field?

Aug 17, 2011

How can i Take only numbers into the text input field...

View 1 Replies

ActionScript 3.0 :: Numbers Only In Input Text Field?

Sep 23, 2009

is there a way to only allow a user to enter numbers in a text feild. setting embed text to numbers only worked for a while, but have to embed all now.

View 1 Replies

ActionScript 2.0 :: Input Numbers To Change GRB On Picture?

Nov 29, 2010

there fellow actionscripters, I am currently studying design and I have a code that was constructed on class:

var mc:MovieClip = this.createEmptyMovieClip("mc", this.getNextHighestDepth() );
var image:String = "hxxp://";
var mcl:MovieClipLoader = new MovieClipLoader();


I have to make it, so that a user can input a value (0-255) so they can edit the GBR on the spot.

Like, putting those numbers in an input box and have the picture change according to those numbers.

View 5 Replies

ActionScript 3.0 :: Adding Numbers From Input Boxes?

Jan 28, 2011

I'm stumped on this problem and can't seem to figure it out. Any suggestions would be welcomed. Basically I'm building a large calculator that adds over 100 input boxes. I've got it working except for the fact that if a user misses inputing a number into one of the input boxes it does not work anymore. I've tired lots of things to no avail. I just want to add the input boxes and skip those where the user did not enter any information (does not apply to them)

Here is my code.

on (press){
ReceptionTotal = Number(LocationFee) + Number(Caterer) + Number(ToastingGlasses) + Number(SecurityFee) + Number(BarPackage) + Number(WeddingCake) + Number(FoodHors) + Number(Baker) + Number(BartentingFee) + Number(CakeKnife) + Number(Servers) + Number(Flatware) + Number(Dinnerwear) + Number(Flatware) + Number(TableLinens) + Number(ChairsCovers) + Number(Glasswear) + Number(Tent) + Number(Napkins) + Number(Childcare) + Number(DanceFloor) + Number(ServingStaff) + Number(Lanterns) + Number(Heaters) + Number(Restrooms);

each input box has a variable name assigned to it as indicated above. I've tired setting the variables to 0, tried if statements don't know how to skip one of the above variables when no number is entered.

View 8 Replies

ActionScript 2.0 :: Numbers And Text Input Component

Jun 9, 2004

I am using actionscript 2.0, and I actually have a simple question: the TextInput.text property returns the text string in quotes. However, I am calculating something and don't want it in quotes. How do I get rid of the quotes so I can calculate stuff?

View 2 Replies

ActionScript 3.0 :: Calculator TextField With Two Numbers

Jul 29, 2009

I am working a calculator with a textfield. It can calculate a if a enter only one number, but when I try to enter two or three doesnt work. I have test several codes but they are not working at all.

var numeroEntrado = "";
var campoUno:int = 125;var campoDos:int = 20;var elResultado1 = 0;var elResultado2 = 0;
proteinas.text = "125 grs.";colesterol.text = "20 mml.";colesterol.backgroundColor = 0x9999FF;textoColesterol.backgroundColor = 0x9999FF;
numeroPorciones.maxChars = 3;numeroPorciones.restrict = "0-9";
btn.addEventListener(MouseEvent.MOUSE_UP, suma);
[Code] .....

View 4 Replies

ActionScript 3.0 :: How To Add Numbers To Dynamic TextField

Oct 4, 2011

How to add numbers to a dynamic text field. I have a dynamic text box on the stage called riglevel. On the same frame I set riglevel.text=1, but when I try to test the movie the text field is blank. I can get it to work with words, like riglevel.text="testing" works fine, but for some reason I can't figure out how to get this to work with numbers.

View 3 Replies

Copyrights 2005-15, All rights reserved