The Use Of Parseint(variable) - SWiSHMax Tutorials
 
  Buy Ebooks, Video Games, DVDs, Electronics and more !
Home | Help Forums | Web Design Tutorials | Free Swishmax Downloads Make Money Online Blog . Free Image and Photo Sharing and Hosting

 

 

Company

Home

Nework Details

Tutorials

SWiSH 2

SWiSHMax

Flash MX

PHP & MySQL

HTML / JScript

Adobe Photoshop

Corel Draw

Gimp

Miscellaneous

Downloads

Templates

Plugins

Fonts

Wallpapers

Free Images

Scripts and Codes

Products

E-Books

SWiSH BB

SWiSH Templates

SWiSH-DB Newsletter
Subscribe to our newsletter : GO
  Partners / Affiliates

   Free image hosting
   Web Design Pakistan
   Swish Templates
   SWiSH Climax
   Talkfreelance Community
   Template Desire
   Lite boards
   Script Sector
   GimpTalk
   13dots
   Idea Designs
   PHP Cafe
   Sposatoettore
   Free swishmax templates
   Swishzone

Manage your site with Flax Article Content Management System
The Use Of Parseint(variable)
Category : SWiSHMax | Level : Intermediate | Language : English
Ask Question | Read Comments | Post tutorial | Previous | Next

Web www.swish-db.com

Hi,

This is a very basic tutorial on the use of ParseInt(variable) to convert a variable to integer. (to convert TEXT to number)

make 2 inputboxes called A and B
make 1 dynamic box called C

connect varA and VarB to boxes A and B. So of course varA to box A and varB to box B. (checkmark the target)
user posted image


Now add this as script behind your movie :

user posted image

And this should be your result :

user posted image



But what is doing that parseInt() with my variables ?

Well, if you just use varC=varA+varB and let us say you give for input varA=2 and varB=3 then you will receive varC=23. This because swishmax is seeing those variables as TEXT (string) variables and not as integers !

The parseInt() function is converting those TEXT variables to string variables so the result will be varA=2,varB=3, varC=5

Got it ?

It's easy once you know it tongue.gif


© 2002-2005 Flaxweb Network | Article Manager | Gimp Tutorials Library | RAD C++ Library | Free C/C++ Sourcecode |
Sites of interest : Web Design Blog | Swish Templates | Swishmax Ebook | Photoshop Templates | Gimp Tutorials | Text Forum | Make Money Online