A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: problem loading a variable with spaces

  1. #1
    Senior Member RazoRmedia's Avatar
    Join Date
    Oct 2000
    Location
    UK
    Posts
    3,016

    problem loading a variable with spaces

    Musicman and others,

    I am loading a variable using this code:

    Code:
    loadVariables("http://littlewoods.dev.jackpotjoy.com/jackpot.jsp?gameId=55",_root);
    the problem is that the value returned is:

    Code:
    total=1,142.00
    note the spaces!

    when I import into flash, I get this:



    How on earth do I reference total? I've tried using '||||total' and other alternatives but I just can't do it.

    please help make a frustrated man not frustrated any more. Cheers in advance.
    Living the dream

  2. #2
    I remember my first Flash
    Join Date
    May 2001
    Location
    Slovak Republic
    Posts
    143
    I know this, but the sloution is easy. Just cut off the last two characters and then convert it to number. Or if it is bigger string, the serch it for ord(char)=10 (that is the /n) and the ord(char)=13 (that is the /r) and also cut it off.
    Inks! Minks! The old witch winks, that fat beings to fry! No body home but Jumping Joan, father, mother and I! Sticks! Stocks! Stone Dead! Blind men can't see! Every knave will have a slave, you or I must be he!

    Hostess Judy / Æon Flux.

  3. #3
    Senior Member RazoRmedia's Avatar
    Join Date
    Oct 2000
    Location
    UK
    Posts
    3,016
    thats the easy bit, what variable name so I use, I;ve tried:

    total
    |||total
    total
    %0a%0a%0atotal

    etc
    etc

    cheers anyway
    Living the dream

  4. #4
    Registered User
    Join Date
    Feb 2001
    Posts
    13,039
    Hi,

    any chance to get rid of those spaces in the jsp ?

    Otherwise, try whether this["\r\n\r\ntotal"] works

    Musicman

  5. #5
    Senior Member RazoRmedia's Avatar
    Join Date
    Oct 2000
    Location
    UK
    Posts
    3,016
    Originally posted by Musicman
    Hi,

    any chance to get rid of those spaces in the jsp ?

    Otherwise, try whether this["\r\n\r\ntotal"] works

    Musicman
    its an external company who own the link and they're reluctant to do it.

    thanks anyway musicman, I'll just have to stump up and pay more for them to change it.

    regards

    Bruce
    Living the dream

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center