PDA

View Full Version : Creating a HTML page from a Flash Array without Server-side Script


Mathieu_BSL
04-17-2002, 06:31 PM
Hi !

I created a multidimentional array in Flash.
It looks like this :
var arrayName = [ ["string1", 45], ["string2, 77], etc.]
Because Flash is not very good for
printing big array (a big array can't
be included in a single page), I would like
to generate automatically a html page by creating a string containing all the HTML code (with the tags). I can build my "html-array-string" in flash, but is there a way to "render" it directly in an independant html page for printing purpose ? (without server-side script for good perforamnce!!!)

Thank you

Mathiew

Jesse
04-18-2002, 02:36 PM
The only thing I can think of is using code like this:
on (release) {
fscommand ("exec", "command.com\t/c\techo\ttxtInput\t>>writeFile.txt");
} to write the HTML file to the client's drive (assuming it's a local presentation), then load it. I'v enever used that method of writing files but people say it works. Alternatively you might just be able to have template made in JavaScript and pass the values to the HTMl page and have the javascript parse them. If you do get it going be sure to let me know how as I could use this system also for something I'm working on...

Mathieu_BSL
04-18-2002, 07:48 PM
Thanks for your answer,
but what I want to do in fact is to build an HTML page over the net.
( a page that will be opened "automatically" in a new browser)...

In fact, my question is :
Can we create an HTML page from a string in flash ?

If the answer is "yes", that means Flash is a WONDERFUL "brain" that we can use to create more rapidly dynamic HTML from data already downloaded !

I know how to pass variables to a Javascript functions, but I never tried to build an HTML page dynamically. It looks like easy, but I do not have a good knoweldge of Javascript. Can anyone help me for that...

Thank you again !!!

Mathieu

Jesse
04-19-2002, 08:05 AM
Ah, in that case the only way to do it would be to build the page using Javascript as I suggested, but I can't help you with that. You're better off asking on a javascript forum. Let them know what sort of string you'll be passing and how you want it parsed.

Mathieu_BSL
04-19-2002, 03:30 PM
Thank you again !!!
I just asked my question on a javascript forum, and if I get an answer, i will post it here in order to help those of you who are interested by actionScript-JavaScript string relations.

Mathiew