00:00
00:00
Newgrounds Background Image Theme

Frogsands just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

as3 input text turned into a number

1,179 Views | 6 Replies
New Topic Respond to this Topic

most things i've found on google say to use the following code but i can't get it to work...please help me

placebet.text = "Enter Bet Here";
placebet.restrict = "0-9.";
var bet:Number= Number(placebet)

Response to as3 input text turned into a number 2016-09-05 18:29:05


At 9/5/16 12:02 AM, orion1220 wrote: most things i've found on google say to use the following code but i can't get it to work...please help me

placebet.text = "Enter Bet Here";
placebet.restrict = "0-9.";
var bet:Number= Number(placebet)

Everything about that code suggests you were trying to turn the input text into a number.
What exactly went wrong?


thats exactly what i want to do thanks for replying this is the output from my game i can invite you to a preview if you wish
and yes im typing in a number

[Newgrounds API] :: No API ID entered in the API Connector component.
[Newgrounds API] :: You can create an API ID for this submission at http://newgrounds.com/account/flashapi
[Newgrounds API] :: Enter your API ID into the API Connector using the Component Inspector (Window -> Component Inspector).
[Newgrounds API] :: Ad destroyed.
NaN
NaN
NaN
NaN
NaN

At 9/5/16 06:29 PM, AnteHero wrote: Everything about that code suggests you were trying to turn the input text into a number.
What exactly went wrong?

Response to as3 input text turned into a number 2016-09-06 09:20:35


Are you trying to enter your API ID at runtime?
Also, what's your setup Flash Pro, Flash Builder, FlashDevelop? Not Flash?

Response to as3 input text turned into a number 2016-09-06 23:37:12


The API is fine just not setup

I'm using animate cc the newest flash

At 9/6/16 09:20 AM, AnteHero wrote: Are you trying to enter your API ID at runtime?
Also, what's your setup Flash Pro, Flash Builder, FlashDevelop? Not Flash?

Response to as3 input text turned into a number 2016-09-07 08:31:57


Can't really help without more information about what you're trying to do.
Post the code up n I'll take a look


I got it to work!!!
for anyone having trouble with this watch this video
https://www.youtube.com/watch?v=1SBfm7dhsf4

At 9/7/16 08:31 AM, AnteHero wrote: Can't really help without more information about what you're trying to do.
Post the code up n I'll take a look