-
1. Re: 2 movieClips and 1 xml
kglad Apr 2, 2011 10:19 AM (in response to melas076)are you loading and parsing your xml?
-
2. Re: 2 movieClips and 1 xml
melas076 Apr 2, 2011 11:05 AM (in response to kglad)yes in 2 movieClips
-
3. Re: 2 movieClips and 1 xml
kglad Apr 2, 2011 11:15 AM (in response to melas076)show that (only) code.
-
4. Re: 2 movieClips and 1 xml
melas076 Apr 2, 2011 12:00 PM (in response to kglad)what? i don't understand ?
-
5. Re: 2 movieClips and 1 xml
melas076 Apr 2, 2011 12:47 PM (in response to kglad)the 2 movieclips are animated and to frame 50 and then a textfield appears.....
so how can i do it in only one code....????
regards,
MELAS
-
6. Re: 2 movieClips and 1 xml
melas076 Apr 2, 2011 1:46 PM (in response to kglad)this is my code in sublink MC:
stop();
var newsXML:XML = new XML();
newsXML.ignoreWhite = true;
var output:String = "";newsXML.onLoad = function(success) {
if (success) {
var links2:Array = newsXML.childNodes[1].attributes.Name;
var links:Array = newsXML.childNodes[1].childNodes;
//var hlink = news[i].attributes.links;
//trace(links2);
linktitle.text = links2;
for (i=0;i<links.length;i++){
output += "";
output += links[i].attributes.name;
output += "";
output += "\n";
}
subTXT.htmlText = output;
trace(output);
}else{
subTXT.htmlText = "Data file did not load.";
}
}newsXML.load("XML/profile.xml");
-
7. Re: 2 movieClips and 1 xml
kglad Apr 2, 2011 2:15 PM (in response to melas076)1 person found this helpfulin your onLoad() method:
if tf is the textfield where you want the linked text to appear:
for(var i:Number=0;i<this.childNodes[0].childNodes.length;i++){
var linkS:String = this.childNodes[0].childNodes[i].attributes.name;var textS:String = this.childNodes[0].childNodes[i].firstChild.nodeValue;
subText.htmlText += "<a href='asfunction:linkF,"+textS+"'>"+linkS+"</a><br />";
}function linkF(s:String):Void{
tf.text = s;
} -
8. Re: 2 movieClips and 1 xml
melas076 Apr 2, 2011 3:01 PM (in response to kglad)I did it all things are loaded but not "_root.all.TXT_MC.TXT.text" and i did a trace it works very well but not in the MC:
var newsXML:XML = new XML();
newsXML.ignoreWhite = true;
var output:String = "";newsXML.onLoad = function(success) {
if (success) {
for(var i:Number=0;i<newsXML.childNodes[1].childNodes.length;i++){
var linkS:String = newsXML.childNodes[1].childNodes[i].attributes.name;
var textS:String = newsXML.childNodes[1].childNodes[i].firstChild.nodeValue;
trace(textS);
_root.all.sublink.subTXT.htmlText += "<a href='asfunction:linkF,"+textS+"'>"+linkS+"</a><br />";
}function linkF(s:String):Void{
_root.all.TXT_MC.TXT.text = s;
}
}}
-
9. Re: 2 movieClips and 1 xml
kglad Apr 2, 2011 3:18 PM (in response to melas076)1 person found this helpfulput linkF() on your textfield's timeline.
-
10. Re: 2 movieClips and 1 xml
melas076 Apr 2, 2011 3:30 PM (in response to kglad)you mean this one :
function linkF(s:String):Void{
_root.all.TXT_MC.TXT.text = s;
}to put in_root.all.TXT_MC.TXT timelines ??????
-
11. Re: 2 movieClips and 1 xml
kglad Apr 2, 2011 3:35 PM (in response to melas076)that function should be on _root.all.sublink.subTXT's timeline.
-
12. Re: 2 movieClips and 1 xml
melas076 Apr 2, 2011 3:43 PM (in response to kglad)thanks you very much
-
-
14. Re: 2 movieClips and 1 xml
melas076 Apr 4, 2011 12:40 PM (in response to kglad)i would like to know if you could tell me why we can't use button instead htmlText?
because i want to make links on mouseon to be RED....
regards,
MELAS
-
15. Re: 2 movieClips and 1 xml
kglad Apr 4, 2011 1:01 PM (in response to melas076)you can use whatever you like.