PDA

View Full Version : AS. Arrg.



ask
March 10th, 2003, 11:25 PM
Been a while since I've done flash so pardon this retarted question:

I have nimage=32 in a text file. I'm loading the file using LoadVariables() function. How do I convert that to a useable format? Like say I want to do nimage--; or something.

The data is getting loaded sucessfully, because it gets displayed in a textbox but how do it make it a number or what not?

Jubba
March 10th, 2003, 11:32 PM
you want to convert it to a number?

http://64.207.155.38/forums/showthread.php?s=&threadid=13612&highlight=convert+AND+string+AND+number

check out that thread... that should get you started...

ask
March 10th, 2003, 11:37 PM
Hey, thanks. But no work. I've already tried using Number() but it didn't work for some reason? Perhaps I am implementing it wrong?

I'm doing

loadVariables("n_image.txt","");
num = Number(nimage);

But it dosen't work?

Jubba
March 10th, 2003, 11:40 PM
Unfortunately I don't have Flash open (or even on this comptuer)so I can't test anything out... That SHOULD work, but perhaps I am missing something.... gonna have to wait for Senocular or Pom...

Sorry i can't help more... :(

senocular
March 21st, 2003, 07:34 PM
loadVariables("n_image.txt","");
num = Number(nimage);

^ You have to wait for the variables to load before you can use them. If you're using MX use a loadVars object and do it all in the onLoad call. Otherwise, I suggest using a movieclip and handling it an onClipEvent(data)

lostinbeta
March 21st, 2003, 07:54 PM
Hey Sen, I believe I solved this issue with him over AIM a while ago.

senocular
March 21st, 2003, 07:55 PM
lol sorry... I did a search of posts with my name in it and this was one of the ones that came up... I just wanted to try to attend to any requests I missed ;)

lostinbeta
March 21st, 2003, 07:56 PM
Ah, ok. Sorry, I should posted in here that th problem was solved. "My bad".

senocular
March 21st, 2003, 07:58 PM
this also helps anyone finding this in a search having an answer (of some sort) posted in the thread ;)


... hear that people? SEARCH! :beam:

lostinbeta
March 21st, 2003, 07:59 PM
LOL, Sen, do you really think people actually know what search means, let alone know what the search button is and how to use it?

We could only dream, but it will never happen.

senocular
March 21st, 2003, 08:01 PM
true ;)

lostinbeta
March 21st, 2003, 08:04 PM
I know :)