Tenho aqui um problema que me está a deixar maluco porque já fiz isto de todas as maneiras e nada
Eu tenho um ficheiro XML e um CSS e quero inseri-los no Flash.
O problema é que não consigo carregar o CSS direito para ele aparecer.
FICHEIRO XML:
CODE
<info>
<bemvindo>
<p>Bem-vindo ao meu projecto</p>
<br></br>
Obrigado</bemvindo>
</info>
<bemvindo>
<p>Bem-vindo ao meu projecto</p>
<br></br>
Obrigado</bemvindo>
</info>
FICHEIRO CSS:
CODE
@charset "utf-8";
/* CSS Document */
body{
font-family:Arial, Helvetica, sans-serif;
font-size:20px;
font-weight:normal;
text-decoration:none;
color:#000000;
}
/* CSS Document */
body{
font-family:Arial, Helvetica, sans-serif;
font-size:20px;
font-weight:normal;
text-decoration:none;
color:#000000;
}
FLASH:
CODE
var xmlInfo = new XML ();
xmlInfo.ignoreWhite = true;
var meuEstilo:TextField.StyleSheet = new TextField.StyleSheet();
meuEstilo.load("css/info.css");
meuEstilo.onLoad = function(sucess:Boolean):Void{
if (sucess == true){
var totalCarregado:Number = this.getBytesLoaded();
var total:Number = this.getBytesTotal();
var percentagem:Number = Math.round((totalCarregado/total)*100);
trace (percentagem);
if (percentagem == 100){
conteudo.StyleSheet = meuEstilo;
xmlInfo.load ("xml/info.xml");
}
}
}
xmlInfo.onLoad = function (sucess:Boolean):Void{
if (sucess == true){
var totalCarregado:Number = this.getBytesLoaded();
var total:Number = this.getBytesTotal();
var percentagem:Number = Math.round((totalCarregado/total)*100);
trace (percentagem);
if (percentagem == 100){
var infoServicos:String = xmlInfo.firstChild.childNodes[0];
conteudo.htmlText = infoServicos;
}
}
};
xmlInfo.ignoreWhite = true;
var meuEstilo:TextField.StyleSheet = new TextField.StyleSheet();
meuEstilo.load("css/info.css");
meuEstilo.onLoad = function(sucess:Boolean):Void{
if (sucess == true){
var totalCarregado:Number = this.getBytesLoaded();
var total:Number = this.getBytesTotal();
var percentagem:Number = Math.round((totalCarregado/total)*100);
trace (percentagem);
if (percentagem == 100){
conteudo.StyleSheet = meuEstilo;
xmlInfo.load ("xml/info.xml");
}
}
}
xmlInfo.onLoad = function (sucess:Boolean):Void{
if (sucess == true){
var totalCarregado:Number = this.getBytesLoaded();
var total:Number = this.getBytesTotal();
var percentagem:Number = Math.round((totalCarregado/total)*100);
trace (percentagem);
if (percentagem == 100){
var infoServicos:String = xmlInfo.firstChild.childNodes[0];
conteudo.htmlText = infoServicos;
}
}
};
Assim, não consigo fazer o load. E quando consigo, o css não fica direito, porque usando a fonte de 20, ela aparece sempre 12.
Alguma ideia do que pode estar a funcionar mal? Obrigado

Help














