
July 22nd, 2002, 12:56 AM
|
|
Contributing User
|
|
Join Date: Sep 2001
Location: NJ
Posts: 428
  
Time spent in forums: 11 h 34 m 8 sec
Reputation Power: 15
|
|
I'm not sure if this is your problem but it is something that you should look into. When you are loading variables with flash, the script won't wait for the variables to be loaded if you are loading them form an external source. So when you are trying to use the variable that you loaded from the php script, its not seeing a value becuase it isn't loaded yet. The only solution i found is this. The variable string that you are sending back, add a value at the end of it like "isLoaded=1", so your php file will be something like this:
PHP Code:
echo "sound=http//yoursound.mp3&isLoaded=1"
Then in your flash movie, on the first frame call your load function, then on the second frame do a check for isLoaded == 1. If it is jump to something like frame five, and there is where you can put the rest of the code. Otherwise, make sure that frame four jumps back to frame 2 to check if isLoaded == 1. In effect you'll be looping between frame 2 and four until your variables are loaded. then you will jump to frame five, and all your variables are loaded. I hope i made some sense.
|