Html text hell

I am in html text hell.

I want to use ASFUNCTIONS - to call a function on a “link” in a text box.

Back in the days of 5- all you had to do was make sure the HTML <> was selected. Now - I can’t get anything work - not mytext.html=1;

Does someone have an example of how it is done with AS functions and MX - its driving me batty - that or if someone has a tutorial .

I can post code if need be!
thanks everyone!

For the text to be registered as HTML it has to be entered through AS or dynamically loaded.

If you are dynamically loading text it is something like…

myText.html = true
myText.htmlText = “asdfasdf”

If you are entering it using actionscript you have to check the <> button and through AS type this…

myText = “help”;

I can’t use tags on the board or they will convert, but you get the point.

If you still can’t get it to work, post your code and I will see what I can do.

First off - thanks lostinbeta…!:slight_smile:

here is the code that relates to the html *****y part…

//---- this function basically flips through an array and finds the name- i really wanted to use the ASFUNCTION in place of the bold tags- but when it didn’t work - I went back to basics to try and solve the problem…:slight_smile: --------------------------------------------------

makeAString = function() {
var t = “”;
for (var i = 0 ; i < music_arr.length; i++) {

	t += "

" + “<b>”+music_arr*.name+"</b>";
return t;

// ------this function basically puts the stuff from makeAString function into a textbox instance located in MC song0.

function makeList(){


Currently- the textbox does get populated - however, you can see the html tags so its not rendering it correctly. It all comes down to the html - and I am hoping its something slightly simple.

Any insight would be appreciated. Or a better way to do it?
Thanks again for your quick response!

Actually for me, nothing gets populated at all. I will need all the rest of the code to be able to fix and test if it works. Do you have a .fla file you can post? (you will need to put it in a .zip file)

problem is - I am using the whole thing in conjunction with a third party XTra software - so I am getting some of my vars from outside of the fla itself.

I think i need to revisit a basic html tutorial again…:frowning:

Well if
song0.display.html= true;


isn’t working for you then try selecting the <> button in the properties of the text box and just having your string as…


I testing this out on a regular textbox where I named it “myText” and selected the <> button then had my script like myText = “my text” I included bold tags in there and it worked.

i’m slightly challenged cos none of its working.
I am going to make a scratch fla and try it there…
maybe its the way I am adding the text and the html bit…

thanks again for your suggestions ! I really appreciate it.

I wish I could help more, but it is difficult without the full code. I hope you find something that can help you out, it would be great.

If you can’t find out about the HTML, it looks like you want all your text to be bold. In that case you set format your textbox to be bold. Something like this…

myformat = new TextFormat();
myformat.font = “Verdana”;
myformat.size = 10;
myformat.color = 0x000000;
myformat.bold = true;

I am going to try that first thing tomorrow - its late here!

Thanks again— big big thank you - just for spending the time to problem solve with me -

I will let ya know what happens !


good luck and goodnight:)