Hey guys and girls i want to know how to add an image tag on XML which is shown on the Contact id="_1" tag which is image=“image/myimage.jpg”> but i dont know how to do everything else in flash XML is added and i will also add Actionscript…
<content>
<page id="_1" name="Contact" title="Contact Us" image="image/myimage.jpg">
<text>Welcome to our online catalogue, If you would like to contact us please use one of the following options:
E-Mail: [EMAIL="me@me.com"]me@me.com[/EMAIL]
Phone (Landline) (01706) 111234
Mobile: 07979862193</text>
</page>
<page id="_2" name="Children" title="Children">
<text>Lorem Ipsum Dolor Sit Amet.</text>
</page>
<page id="_3" name="Elderly" title="Product Set 3">
<text>Lorem Ipsum Dolor Sit Amet.</text>
</page>
<page id="_4" name="Home" title="Product Set 4">
<text>Lorem Ipsum Dolor Sit Amet.</text>
</page>
<page id="_5" name="Hobbies" title="Product Set 5">
<text>Lorem Ipsum Dolor Sit Amet.</text>
</page>
<page id="_6" name="Clothes" title="Product Set 6">
<text>Lorem Ipsum Dolor Sit Amet.</text>
</page>
<page id="_7" name="Cars" title="Product Set 7">
<text>Lorem Ipsum Dolor Sit Amet.</text>
</page>
<page id="_8" name="Computers" title="Product Set 8">
<text>Lorem Ipsum Dolor Sit Amet.</text>
</page>
<page id="_9" name="Business" title="Product Set 9">
<text>Lorem Ipsum Dolor Sit Amet.</text>
</page>
<page id="_10" name="Lesiure" title="Product Set 10">
<text>Lorem Ipsum Dolor Sit Amet.</text>
</page>
<page id="_11" name="Gifts" title="Product Set 11">
<text>Lorem Ipsum Dolor Sit Amet.</text>
</page>
<page id="_12" name="Adult" title="Product Set 12">
<text>Lorem Ipsum Dolor Sit Amet.</text>
</page>
</content>
this.positions = new Array();
this.titles = new Array();
this.text = new Array();
this.page_content = new Array();
this.myXML = new XML();
this.myXML.ignoreWhite = true;
this.onEnterFrame = function() {
starty = GetProperty(_root.pages,_y);
verticalno = pagesy-starty;
setProperty (_root.pages, _y, starty+(verticalno/6));
}
this.pageMove = function(location) {
trace("location: " + location);
_global.pagesy = location;
}
this.menuMove = function(x) {
var mousePos = x;
if (mousePos<=20) {
// Tell menu to show itself
_root.menu.showMenu();
} else if (mousePos>=275) {
// Tell menu to hide itself
_root.menu.hideMenu();
}
}
this.myXML.onLoad = function(success) {
if (success) {
trace("XML Loaded!");
_global.allNodes = this.firstChild.childNodes;
_global.hidden = true;
trace("Total Pages: " + allNodes.length);
j = 0;
while (j<allNodes.length) {
duplicateMovieClip(_root.pages["page"], "page"+j, j);
setProperty(_root.pages["page"+j], _y, j*239);
_root.pages["page"+j].location = -j*239;
titles.push(allNodes[j].attributes.title);
positions.push(_root.pages["page"+j].location);
if (allNodes[j].nodeName == "page") {
_root.pages["page"+j].pageTitle = allNodes[j].attributes.title;
var linkText = allNodes[j].attributes.name;
_root.menu.menu_txt.html = true;
_root.menu.menu_txt += "<a href=\"asfunction:_root.pageMove,"+positions[j]+"\">"+linkText+"</a><br>";
}
j++;
}
for (k=0; k<titles.length; k++) {
_root.pages["page"+k].title = titles[k];
}
for (i=0; i<allNodes.length; i++) {
page_content* = allNodes*.childNodes;
}
for (k=0; k<page_content.length; k++) {
for (l=0; l<page_content[k].length; l++) {
_root.pages[l].page.contentBox.html = true;
if (page_content[k][l].nodeName == "text") {
_root.pages["page"+[k]].contentBox.html = true;
_root.pages["page"+[k]].contentBox = page_content[k][l];
}
}
}
} else {
trace("XML didn't load.");
}
}
this.myXML.load("content.xml");