Best PracticesWhich Method to Use When Loading Data


If your images are the same physical size that you want them to be on the stage and they are optimized for small download file size, you can use the MovieClip.loadMovie method. However, if you need to do anything to the external file after it's loaded, you're much better off using the MovieClipLoader approach. This way, you can resize the files or execute other modifications when they're loaded into a target clip.

When you use loadXML versus loadVars depends on the format in which the incoming data will be and how much processing of that data you want to perform. When using loadVars, the external data file is not designed to be easy for you to read, but the variable name/value pairs transfer directly into property name/value pairs of the object instance into which it's loaded. On the other hand, the XML data format has the advantage of being easier to read and edit. However, you must take the extra step of extracting the data from the XML object if you want to use it as the property of an object instance.



Special Edition Using Macromedia Studio 8
Special Edition Using Macromedia Studio 8
ISBN: 0789733854
EAN: 2147483647
Year: 2003
Pages: 337

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net