#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2001
    Posts
    1
    Rep Power
    0
    I am using the loadVariables() function to grab some variables from an ASP file. I would like to sue these variables as a numeric value to set the _x property of an object.

    The variables are not an integer and the _x property can only accept integers. I am trying to convert the string value of the variable into an integer, but I cannot seem to figure out how to do it. I have tried the Number() function and it does not work.

    Does anyone know how to convert a string to an integer in actionscript? This seems like it should be a simple thing to figure out.
  2. #2
  3. No Profile Picture
    Seņor Member
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Aug 2000
    Posts
    1,157
    Rep Power
    38

    Depending on what you want, specifically...


    eval()
    int() [deprecated syntax in Flash 5]
    Number()
    parseInt()
    parseFloat()
    Michael

IMN logo majestic logo threadwatch logo seochat tools logo