Travel agency Flash Lite 2.0 application - inside viewThis page reveals the implementation secrets of the Travel agency application in Flash Lite 2.0. This application is inspired by the tutorial from Macromedia. Tutorial was completed with travel agency in mind, custom graphics were created and some flexibility added by moving tour info to external file. Here is the link to tutorial.Textual information about tours is loaded from the text files using LoadVars object.
Here is description of how it works:
myData = new LoadVars();
myData.load("http://www.diamondesign.net/flash/content");
myData.onLoad = function() {
itemtitle = new Array();
itemcomment = new Array();
itemimage = new Array();
for (j=0; j<4; j++) {
itemtitle[j] = this["Title"+j];
itemcomment[j] = this["Comments"+j];
itemimage[j] = this["Image"+j];
}
};
Here is the content of the file that is loaded from the server. All content is formatted in one line. Title0=Miami beach&Comments0=Departs From Miami, Florida visiting Half Moon Cay, Bahamas (Private Island) 450 euros&Image0=1.jpg&Title1=Palm trip&Comments1=The nice trip to palm country. 380 euros&Image1=2.jpg&Title2=City trip&Comments2=You visit more than 5 capital cities. 280 euros&Image2=3.jpg&Title3=Canarian islands&Comments3=The white sand beach for you. 280 euros&Image3=4.jpg&cant=4 |
|