|
||||||||||||||
. . . . . |
Loading external HTML in Flash 8
This Flash 8 tutorial will show you how to load in external html using the LoadVars command. You will load the html from an external text file so that you can change the html whenever you want.
Flash Tutorials in Video Format -
Watch them now at LearnFlash.com
You will put the html content into the text file something like this:
Once you have created your text file, create a flash file, and drag a TextField to the stage.
Create a new layer, call it actions and put this code on frame 1.
// declare the LoadVars object that
// loads in the external text
myData = new LoadVars();
// load event
myData.onLoad = function() {
// allow text to use html
stage_txt.html = true;
stage_txt.htmlText = this.myVariable;
};
// load text file
myData.load("mytext.txt");
And that is it. You will need to test which HTML tags work, and how it does the formatting. But it does allow the HTML to be external and that is a good thing for maintainability. Flash 8 Resources. . |
|
||||||||||||
|
. | Home | Flash MX | Actionscript 2.0 | Flash 3D | Flash 8 | Flash Database | Flash Mobile | Flash CS3 | Java For Kids | Video Course | General Video | Photoshop | Web Design | Digital Photography | Games | free backgrounds | Resume | Streaming Video | Students Work | Links | Contact me | sitemap | reviews | . . |
||||||||||||||