dynamisk text med HTML|Programmering / Grafisk formgivning|Forum|Nordichardware

Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
The forums are currently locked and only available for read only access
sp_Feed sp_TopicIcon
dynamisk text med HTML
LightX01
Kommer du hit ofta?
Medlem
Forum Posts: 472
Member Since:
October 10, 2002
sp_UserOfflineSmall Offline
1
March 11, 2004 - 1:49 pm
sp_Permalink sp_Print

Hej har ett problem, jag läser in en XML fil i flash med information till en textruta, allt fungerade som det skulle och renderade allt enligt HTML taggarna. Men helt plötsligt så slutar den rendera taggar.
taggen fungerar. Vad har jag gjort för fel?Texten som står inom tagen försvinner medans resten av texten syns. ÅÄÖ slutar också att fungera. Har XML filen sparad i UTF-8.

Hjälp

ManicBlue
Member
Medlem
Forum Posts: 2005
Member Since:
December 15, 2002
sp_UserOfflineSmall Offline
567180
March 11, 2004 - 7:07 pm
sp_Permalink sp_Print

Någon kod att visa upp? Kanske egentligen borde ligga under programmering/grafisk formgivning, men de finns säkert någon mod. som kan flytta tråden.

Iceman
Member
Medlem
Forum Posts: 4735
Member Since:
April 1, 2001
sp_UserOfflineSmall Offline
567535
March 12, 2004 - 8:50 am
sp_Permalink sp_Print

*Tråd flyttad*

LightX01
Kommer du hit ofta?
Medlem
Forum Posts: 472
Member Since:
October 10, 2002
sp_UserOfflineSmall Offline
567576
March 12, 2004 - 10:01 am
sp_Permalink sp_Print
//XML --------- XML --------- START --------- XML --------- XML
var m_isXmlLoaded = false;
var m_DEBUG = false;
//Load m_xml
var m_xml = new XML();
m_xml.ignoreWhite = true;
m_xml.onLoad = function(success) {
m_isXmlLoaded = success;
if (m_isXmlLoaded && m_DEBUG) {
var objXml = new GetXmlData('sverige');
trace(objXml.ID);
trace(objXml.Name);
trace(objXml.Text);
}
};
m_xml.load("text.xml");
function GetXmlData(id) {
this.ID = null;
this.Name = null;
this.Text = null;
this.Link = null;
var node = m_xml.firstChild.childNodes;
for (var i = 0; i<node.length; i++) {
if (node[i].attributes.id == id) {
//node found
this.ID = node[i].attributes.id;
//get subnode values
for (var u = 0; u<node[i].childNodes.length; u++) {
/*
trace('nodename: '+ node[i].childNodes[u].nodeName.toLowerCase());
trace('nodevalue: '+ node[i].childNodes[u].firstChild.nodeValue);
*/
switch (node[i].childNodes[u].nodeName.toLowerCase()) {
case 'text' :
this.Text = node[i].childNodes[u].firstChild.nodeValue;
break;
case 'name' :
this.Name = node[i].childNodes[u].firstChild.nodeValue;
break;
case 'link' :
this.Link = node[i].childNodes[u].firstChild.nodeValue;
break;
}
}
break;
} else {
this.ID = null;
this.Name = null;
this.Text = null;
this.Link = null;
}
}
}

//XML --------- XML --------- SLUT --------- XML --------- XML
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1030
Currently Online:
Guest(s) 508
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Andreas Galistel: 16287
Jonas Klar: 15897
ilg@dd: 10810
Nyhet: 10607
Mind: 10550
Ctrl: 10355
Gueno: 9881
Guest: 9344
Snorch: 8881
Callister: 8468
Newest Members:
PetrbonFU PetrbonFU
Karine Bembry
Dolores Mcdaniels
Anibal McLeish
Francisca Alt
Alfie Everhart
Lester Huitt
Orlando Jorgensen
Mikki Lundgren
Dakota Kozlowski
Forum Stats:
Groups: 11
Forums: 59
Topics: 146630
Posts: 1300967

 

Member Stats:
Guest Posters: 2
Members: 79425
Moderators: 0
Admins: 11
Administrators: nordicadmin, Henrik Berntsson, Anton Karmehed, Carl Holmberg, Joel Oscarsson, Mikael Linnér, Mikael Schwartz, Andreas Paulsson, Nickebjrk, Mattias Pettersson, EmxL