hai all,
i am doing one xml application with flash. its a id card of the school or organization.
first its display all the records in row wise. like
name age address
name1 age1 address1
name2 age2 address2
and when i mouseover the row wise records in anothere movieclip its show all details about the data with photo id card.
i did some code but i can’t continue…
i am not much coder so i need simple self explaning cods.
here is my code…
var user_xml:XML= new XML();
var m:Number;
var n:MovieClip;
var d:MovieClip;
var j:Number=0;
var i:Number;
user_xml.ignoreWhite=true;
user_xml.load(“data.xml”);
user_xml.onLoad=function(success:Boolean)
{
if(success)
{
m=user_xml.childNodes.length;
for(i=0;i<m;i++)
{
n=attachMovie(“record”,“record”+i,i);
n._y=i30;
n.txt_name.text=user_xml.childNodes.childNodes[0].childNodes;
n.txt_age.text=user_xml.childNodes*.childNodes[1].childNodes;
n.txt_add.text=user_xml.childNodes*.childNodes[2].childNodes;
n.onRollOver=function()
{
d=attachMovie(“display”,“display”+j,100);
d._x=500;
d.txt_name.text=user_xml.childNodes[j].childNodes[0].firstChild.nodeValue;
d.txt_age.text=user_xml.childNodes[j].childNodes[1].firstChild.nodeValue;
d.txt_add.text=user_xml.childNodes[j].childNodes[2].firstChild.nodeValue;
j++;
}
}
}
else
{
trace(“xml not found”);
};
}
and the xml file
<data id=“0”>
<name>Name</name>
<age>Age</age>
<add>Address</add>
</data>
<data id=“1”>
<name>Mani1</name>
<age>28</age>
<add>aaaa</add>
</data>
<data id=“2”>
<name>Mani2</name>
<age>29</age>
<add>bbbb</add>
</data>
<data id=“3”>
<name>Mani3</name>
<age>30</age>
<add>ccc</add>
</data>
and i used two movieclips “display” and “record” with linkage.
any body can help with simple codes. i need in as2.0 only…
Please
Flashmani