Loading external html file into swf with scrollbar within a text box?

Hi all

I am completely tearing my hair out over this one, and I really really would appreciate any help

I’m trying to load an order form into a swf I have made using an external txt file containing all the html coding for the form. I need to load it within a specific section of the swf, so have created a text box using the text tool. Also, as the form is larger than the space on the swf, I have made it dynamic text and used the scrollbar component.

I have followed the tutorials provided here:

http://www.kirupa.com/developer/mx/dynamic_scroller.htm

and here:

http://www.macromedia.com/support/flash/ts/documents/scrolling_text_mx.htm

… but with no luck. In fact, even when I follow the Kirupa tutorial _word_for_word it STILL doesn’t work!

Is there any easy way to do this? Can I just load an ordinary html document into a swf or must it be a plain text file? If so, how do I do it???

Current actionscript is:

loadVarsText = new loadVars();
loadVarsText.load(“external.txt”);
loadVarsText.onLoad = function(success) {
if (success) {
trace (“done loading”);
scroller.html = true;
scroller.htmlText = this.var1;
}else{
trace (“not loaded”);
}
};

The external.txt file is just the html copied and pasted from my html form but with the words “var1=” at the top of the page.

Really would appreciate any thoughts!!

Kristen.

I don’t know what has changed since MX2004, but this tags work for MX:)
http://www.macromedia.com/support/flash/ts/documents/htmltext.htm

scotty(-:

Thanks Scotty, but if I understand that correctly, Flash only understands limited HTML commands so I would not be able to write an entire HTML based web form to flash unless it was attached as an external text file… but I just CANNOT get it to show up…

Any ideas??

Probably some tags disturbing it…
But why not make that form in flash?
http://www.kirupa.com/developer/mx/components.htm
http://www.kirupa.com/developer/actionscript/flash_php_email.htm

scotty(-:

You can’t import a HTML web-page into flash… That doesn’t work, so a HTML form won’t work in Flash. You need to create the form in Flash :slight_smile:

Thanks for clarifying that for me…

I might have to just remake the form :frowning:

You can do it;)

scotty(-:

If you look in the FlashMX2004 application folder, samples/Text Enhancements has an example of placing an html page inside a Flash dynamic text box.

Thank you Jimhere for pointing at that=)

scotty(-:

Thanks so much guys for pointing me to that one…

I can now get the HTML to load within the swf, but I can’t get the scrollbar component to work with it. I’ve set my text box as dynamic and everything is the same, but the HTML document won’t scroll like it would do if it were a normal text box…

Do you know how to fix this??

Actually, strike that…

I’ve just trying loading my own HTML document in the same way as the example, but it still won’t work… plain text is okay, but as soon as I try loading an HTML form, it just won’t show up…

Back to square 1 again… :frowning:

flash won’t show a thing if it can’t parse the entire HTML page… any unknown tags will kill the loading… make sure you’ve enabled “display as HTML” in the dynamic textbox properties and that the HTML is really simple… the short answer? Flash can’t do forms, maybe next version will support the full range of HTML tags but right now… only about a dozen or so are supported