PDA

View Full Version : Variables and String Manipulation


slurm!
06-23-2006, 11:29 PM
I've been pulling my hair out at this very simple problem.

I want to load a variable from an external text file and use that variable in a sound class, here's my code:

Text data file:

&toPlay=http://domain.com/Some Song.mp3&

Actionscript:

//load variables from external text file
_root.loadVariables("http://domain.com/temp.txt");

//stick the variable from that text file into the sound class
//what am I doing wrong? it makes complete sense in my head
soundContainer = new Sound(this);
soundContainer.loadSound(toPlay, true);

Cota
06-23-2006, 11:46 PM
the variable, within Flash, should be available at the _root so when you call it in flash _root.toPlay or level0.toPlay