Is there any workaround to load in complete html pages with LoadVars ?
I have this client that wants to update some pages (just adding and removing text and pictures), but I would love to do it in action scripting and have him update an external file.
Now I could tell him to remove the tags from <html> to <body> and from </body> to </html>, save it as text file and add a variable (like myText=) at the top of his file, but that wouldn’t make things much easier for him.
He’ll probably start to complain that it would have been easier if I’d made it in html instead of flash
Does anyone have any other ideas on how to display an html page inside of flash ? (except for opening browser windows and loading the page in that window ofcourse - that isn’t good enough)
ideea
Let’s say you put a &outsidevar= in the very beggining of your html file, even in front of your <html> tag
Load it with Loadvars object (i don’t know how to work with it :(… but i’ll promise I’ll learn some day ) then you can put this:
Glad you like it… but i realized it doesn’t work as you wanted…
one thing i didn’t noticed first… is that the code above will return a string starting from <body anyproperties> and soo on.
It starts cutting in front of the body.
Solutions.
1- you can add an integger to indexOf("<body");
2- you can put the whole string from <body to the end closing tag of body > including properties or classes.
3- you could add a comment into your html and search for that rather than the <body> tags
Anyway… that “technique” has nothing to do with LoadVars. It’s rather a string technique ;).