Web Hosting Deals Holiday Logo Design Webcam Chat Website Header Templates Register domain Search Engine Optimisation Web Hosting
Go Back   Talk Mania Forum > Programming / Scripting / Coding

Programming / Scripting / Coding Got a question about : PHP / Perl / Java / JavaScript / CGI Scripts / JavaScript coding. Ask here! We'll get you the answers !

 Image
Buy Sell Downloads

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-03-2007, 10:41 PM
Junior Member
 
Join Date: Nov 2007
Posts: 5
matt159 is on a distinguished road
Question Adding numbers in flash

I am just trying to add two numbers togeather which I input in to input textboxes. And then when I click a button the answer appears in a dynamic textbox.

Heres the code am using on my clac_btn button:

Quote:
on(release) {

amount = item1 + item2;
}
When I do it this way it automaticlly treats item1 and item2 input textboxes as string and say if item1 = 2 and item2 = 3 the amount value will be 23

I have also tried this:

Quote:
on(release) {

amount = Number(item1) + Number(item2);
}
That just come back as NaN in all three inputtext boxes.


Can anyone tell me how its done or tell me a tip or a better way of doing what im tring to do.

Reply With Quote
  #2 (permalink)  
Old 09-24-2008, 02:41 PM
Junior Member
 
Join Date: Sep 2008
Posts: 13
rami2000s is on a distinguished road
almost this is only for action script2 right?

Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT +2. The time now is 06:56 PM.


Fake ID

Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC8
Forums Copyright © Talk-Mania.com