[UVar: x, type: Double, value: 80.55] How to use value?

Post here your questions about the Flash / Flex / Air API for SFS2X

Moderators: Lapo, Bax

Post Reply
Fantasticx
Posts: 17
Joined: 14 Aug 2011, 05:02
Contact:

[UVar: x, type: Double, value: 80.55] How to use value?

Post by Fantasticx »

I trace trace(user.getVariable(USERVAR_X));

and I get this

[UVar: x, type: Double, value: 80.55]

I want to use "value: 80.55"


so I put user.getVariable(USERVAR_X).type I get Double but when I put

user.getVariable(USERVAR_X).value I get and error.

anyway to get value: 80.55?
jamalsoueidan
Posts: 153
Joined: 15 Aug 2011, 16:33

Post by jamalsoueidan »

user.getVariable(USERVAR_X)..getDoubleValue()

:D

you first get the variable by key and then tell sfsx2 what type you want to receive...
---------------------------------------------------
Jamal Soueidan
http://linkedin.com/in/jamalsoueidan
Fantasticx
Posts: 17
Joined: 14 Aug 2011, 05:02
Contact:

Post by Fantasticx »

NeverMind I figure out the problem



Problem : getIntValue() only gets a hole number .(10)

getDoubleValue() get hole number and decimal number like(10.4)
Fantasticx
Posts: 17
Joined: 14 Aug 2011, 05:02
Contact:

Post by Fantasticx »

jamalsoueidan wrote:user.getVariable(USERVAR_X)..getDoubleValue()

:D

you first get the variable by key and then tell sfsx2 what type you want to receive...
FAST POST, btw i already figure out the problem before u even post.

Thanks you anyways dude
jamalsoueidan
Posts: 153
Joined: 15 Aug 2011, 16:33

Post by jamalsoueidan »

This is one of the great thing that SFS2X offers... :D

Fast support :D
---------------------------------------------------
Jamal Soueidan
http://linkedin.com/in/jamalsoueidan
Post Reply