NO!
now on with the quick lesson.
xData = new XML();
xData.onLoad = function(success){
if (success) {
trace(this);
}
}
xData.load("playlist.xml");
xData = a variable we named. The variable contains a NEW XML document XML();
xData.onLoad = function(success){ = this is the start of a new function. (read functions below to understand a bit.) We are setting up a program to check xData when something is loaded into it. This program (function) will only start if something gets loaded. xData.onLoad = function(success) - onLoad is a command and now we set it with an = sign. (success) will be a boolean. either TRUE of FALSE and success will now be a variable in this function. if (success) { = start if statement saying... if success = true then do whats in { }... trace(this) will display what was loaded.
Now that we wrote a function to look for the xData information, we now need to load something in.
xData.load("filename");
this will excute right away. once it loads, if its successful, then it will trace. if the load is not success (wrong file name) then nothing will happen.
.........
No comments:
Post a Comment