I've never tried what you did, but I wouldn't have expected that to
work. If it did, then it *would* be possible to import HTML into Flash! --
but it isn't possible. :-)
You can try, instead of setting the text property of scroller, to set
its htmlText property (see TextField.htmlText in the ActionScript
dictionary) -- and of course, scroller's HTML formatting will have to be set
to true for that to work. But even if you manage that, you'll be
disappointed, and that's because of how loadVars() works. loadVars()
expects at least one name/value pair. For example, if you had three
external variables you wanted to load -- say, fruit="apple", meat="beef",
veggie="corn" -- your text file would have to be formatted like this:
fruit=apple&meat=beef&veggie=corn
.... so in your case, you'd have to set the whole HTML document as a
URLendcoded value for some variable, for example ...
myHTML=%0chtml%0e%0chead%0e%0ctitle%0eMy%20page%20title ...
In short, bro, Flash doesn't presently allow this.
David
stiller (at) quip (dot) net
[quoted text, click to view] "Ben Foster" <ben.foster@zoom.co.uk> wrote in message
news:cha594$7q1$1@forums.macromedia.com...
> Ok thanks for your reply. How about this method then. By using this script
> you can load external text documents into a flash movie:
>
> loadText = new loadVars();
> loadText.load("example.txt");
> //creating the loadVarsText function
> loadText.onLoad = function() {
> scroller.text = this.exampletext;
> };
>
> I tried changing the "example.txt." to a htm file, and after changing the
> script it works apart from one thing, all the html code is also shown. Is
> there anyway i can make a html page, import it into a movie using this
> script but keep the html 'invisible' yet working? I tried using the
'render
> as html' option but it doesn't seem to work, must be using it for the
wrong
> purpose.
>
> Many thanks in advance,
> Ben Foster
>
> "David Stiller" <stiller@quip.net> wrote in message
> news:ch8qa1$htu$1@forums.macromedia.com...
> > You can't load HTML into Flash -- well, not the way you're thinking.
> > You *can* use HTML formatting for your text fields, but it's a limited
> > subset of the full HTML specification (just like you can use some CSS
now
> in
> > Flash, but that's also very limited). You can import XML into Flash.
But
> > you can't call a loadMovie()-like method that actually loads external
HTML
> > into Flash.
> >
> > You may be able to accomplish your button goal, though, with the
> > getURL() method.
> >
> >
> > David
> > stiller (at) quip (dot) net
> >
> > "Ben Foster" <ben.foster@zoom.co.uk> wrote in message
> > news:ch80v1$9fh$1@forums.macromedia.com...
> > > Like the LoadMovie command to load .swf files into a main movie, is
> there
> > > any way you can load html documents into a movie? For example clicking
> on
> > a
> > > button then a html page loading up beside it, which can then change to
> > > another page upon selecting another button?
> > >
> > > Many Thanks in advance,
> > > Ben Foster
> > >
> > >
> >
> >
>
>