Loading XML Into Flash
When you decide to use XML to load data into Flash, the next step is figuring out how exactly that XML file makes it there and what commands are needed to make it happen. Well, don't worry. It's not hard at all. If you've ever loaded in a variable string with loadVariables then you've pretty much already loaded XML too. It's the exact same process.
Loading XML revolves around 2 functions. One of these functions is a pre-existing function that you simply call yourself. However, the other is a callback function that you have to define which will automatically be called by Flash depending on the occurrence of a certain event. The event we're dealing with here is the event of the XML being fully downloaded and introduced into Flash movie. This is the called the onLoad event.
Each of of these functions are used on an XML instance. XML instances are created using the XML object, or class, and provide a construct in Flash that lets you manage your XML. If you're working at all with XML in Flash, then you're pretty much guaranteed to be using an XML instance.
0 comments:
Post a Comment