Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var myXML:XML = new XML();
- myXML.ignoreWhite=true;
- myXML.load("oman3d.xml");
- myXML.onLoad = function(success)
- {
- if (success)
- {
- var myImage = myXML.firstChild.childNodes;
- for (i=0; i<myImage.length; i++)
- {
- var imageNumber = i+1;
- var imageName = myImage[i].attributes.name;
- var imageURL = myImage[i].firstChild.nodeValue;
- images_container['img' + imageNumber + '_mc'].loadMovie(imageURL);
- makeButton(imageNumber);
- trace ("Image number: "+imageNumber+" is titled "+imageName+" and its URL is "+imageURL+".");
- }//end for
- }//end if
- };// end of function
- function makeButton(name)
- {
- var mc = this['img' + name + "_btn"];
- mc.name = name;
- mc.onRelease = function ()
- {
- trace (mc.name + "_clicked");
- };
- mc.onRollOver = function ()
- {
- trace (mc.name + "_hover");
- };
- } // End of the function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement