Problemy z htmlText
: pn paź 20, 2008 8:47 pm
Mam taki problem, otoz po wyswietleniu textu html we flashu, nie dziala mi jego usuniecie (funkcja back2 na dole kodu), a malo tego napisy wyswietlaja sie tylko podczas uruchomienia tego projektu - to jest jeden swf.
Jest on jednak potem wczytywany z poziomu innego swfa i wtedy juz nic na ekranie sie nie pokazuje. Co moze byc nie tak?
Jest on jednak potem wczytywany z poziomu innego swfa i wtedy juz nic na ekranie sie nie pokazuje. Co moze byc nie tak?
Kod: Zaznacz cały
var myStyle:TextField.StyleSheet = new TextField.StyleSheet();
myStyle.setStyle("bialy", {color:'#ffffff', fontFamily:'Arial,Courier, monospace', fontSize:'11'});
myStyle.setStyle("a:link", {color:"#6F7DF7", fontFamily:"Arial,Courier, monospace", fontSize:"10", textDecoration:"underline"});
myStyle.setStyle("a:hover", {color:"#FAFA6B", fontFamily:"Arial,Courier, monospace", fontSize:"10", textDecoration:"underline"});
var poleTxt = drawTextField1(this);
var poleTxt2 = drawTextField(this);
var poleTxt3 = drawTextField2(this);
poleTxt.styleSheet = myStyle;
poleTxt.autoSize = true;
poleTxt.html = true;
poleTxt.htmlText = "<bialy><a href='http://link'>cos tam cos tam</a></bialy>";
poleTxt2.styleSheet = myStyle;
poleTxt2.autoSize = true;
poleTxt2.html = true;
poleTxt2.htmlText = "<bialy> Aby sciagnac plik z fotkami </bialy>";
poleTxt2.htmlText += "<bialy> wybierz jeden z linkow: </bialy>";
poleTxt3.styleSheet = myStyle;
poleTxt3.autoSize = true;
poleTxt3.html = true;
poleTxt3.htmlText = "<bialy><a href='http://link'>cos tam cos tam</a></bialy>";
function drawTextField1(target_mc:MovieClip):TextField
{
var poleTxt:TextField = target_mc.createTextField("poleTxt", target_mc.getNextHighestDepth(), 140, 150, 0, 0);
return poleTxt;
}
function drawTextField(target_mc2:MovieClip):TextField
{
var poleTxt2:TextField = target_mc2.createTextField("poleTxt2", target_mc2.getNextHighestDepth(), 150, 80, 0, 0);
return poleTxt2;
}
function drawTextField2(target_mc3:MovieClip):TextField
{
var poleTxt3:TextField = target_mc3.createTextField("poleTxt3", target_mc3.getNextHighestDepth(), 150, 170, 0, 0);
return poleTxt3;
}
back2.onPress = function()
{
poleTxt.swapDepths(poleTxt.getNextHighestDepth());
poleTxt.removeTextField();
poleTxt2.swapDepths(poleTxt2.getNextHighestDepth());
poleTxt2.removeTextField();
poleTxt3.swapDepths(poleTxt3.getNextHighestDepth());
poleTxt3.removeTextField();
gotoAndPlay(146);
};
stop();