
February 21st, 2004, 05:47 AM
|
|
Gotta get to the next screen..
|
|
Join Date: Nov 2003
Location: Legion of Dynamic Discord
|
|
Hi, never done anything like that before. There might be a problem with loading data from another domain...just a mild guess there though...ok well found this in the mx docs:
Quote: myMovieClip.loadVariables("url", variables)
Parameters
url The absolute or relative URL for the external file that contains the variables to be loaded. The host for the URL must be in the same subdomain as the movie clip. |
I just tried it out with:
_root.loadVariables("index.html");
It does read in the entire html file. It does it as one long string but you can definately parse that in flash to read anything you might need. It gives it a funny variable name though and I'm not sure how you would use it. In my test it was:
<HEAD>||<HEAD>||<meta http-equiv
I'm not sure if flash would allow you to use that as a value ref...
ok well I just worked out how to get a useable handle.
On the first line of your html file use:
<!-- &htmlContent= -->
Then use the previous loadVariables statement. If you debug test it you will see a variable in your _root object called htmlContent. This will start with "-->" which is the end of the html comment. Anyway if you were parsing this string it wouldn't matter that these 3 chars where there..right?!.
OK so in short the answer is yes, flash can read and parse a html file (in the same domain).
__________________
-Tann
-Vote for your favorite ActionScript editor here.
|