PDA

View Full Version : basic actionscript doubts


ssjogus
12-04-2002, 09:05 AM
hi!

i am a designer and learning script for the first time. i have gone through basic tutorials for actionscript and find it very helpful. But i have some doubts:

i 've read the tutorial for variables(beginnres level)

My doubts are:

We have 3 types of variables like string, boolean, expression.
expression is a type of variable from which we can take out mathematical values & do additions or something like that.

Then why do we need to write code like Number(var1). If we have set var1 as expression type of variable, then why again things like Number(var1) or parseInter(var1).

ssjogus

Billy T
12-04-2002, 09:34 AM
parseInt can be used to extract a number from a variable that contains multiple datatypes

eg

var1="23hithere";
trace(parseInt(var1));

will return 23

most of the time you will not need to use Number or parseInt...if you do then check out the actionscript reference, it has a pretty comprehensive explanation

cheers

ssjogus
12-05-2002, 07:17 AM
this is making sense to me.

thanks.

ssjogus.:)

ssjogus
12-05-2002, 09:53 AM
yeah ok. now i am getting it.

ssjogus.