I need to create bullet points in an external text file that is being used with a scrollbar component, I have tried a bunch of things but can not make it work. when I use the html tag <li>word</li> the flash movie just reads the html code as I typed it. I have the html box turned on in flash. So I am stumped. Does any one know how to create bullet points for external text in html or better yet dirrect me to an example of bullet points working externally in flash mx.
Well as for an external .txt file I dont think there is a way. In Flash itself there is a TextFormat() option called “bullet”, that goes something like this [AS]myTF = new TextFormat();
myTF.bullet = true;
myTextBox.text = “asdf”;
myTextBox.setTextFormat(myTF);[/AS] but that doesn’t really help you much since that makes the whole textbox a bulleted list instead of just part of it :-\
Really? Heh… I tried it and it didn’t work… maybe I fuggled up somewhere… lemme retry.
Hahaha, I did mess up… :blushes:
<li></li> works just fine for me.
My bad, first, give your dynamic text boxes’ variable the name list. Then, extend the dynamic text box to however big you want it to be. Go to properties, select Render Text as HTML. Then on the keyframe insert this actionscript:
list = list.htmlText = "<li>First Choice: 2advanced.com</li> <li>Second Choice: Kirupa.com</li>";
That makes a list, everytime you want to add a new bullet, put the tag:<li> and then the words.
- But that doesn’t really help you load the text into bullets does it? Hope that helps you, and lostinbeta, try the new thing I just said, that should work better.
- Me5000, as for you, I’m trying something.
This is what I used…
External .txt file:
myVar=This should be bulleted<li>hello world</li><li>I am me</li>
AS: [AS]myLV = new LoadVars();
myLV.onLoad = function(success) {
if (success) {
myTextBox.html = true;
myTextBox.htmlText = this.myVar;
} else {
trace(“file loading failed”);
}
};
myLV.load(“myText.txt”);[/AS] Worked like a charm. The last time I tried I had a minor error
I got it. Exactly what Me5000 wants (or so I think). Easy steps. This can be done by anyone, and the actionscript is much more easier to understand (no offense Lost):
[list=1]
[]Make a new text document. Just rename it to data.
[]Open up Flash and insert a Dynamic Text Box.
[]Set the text boxes’ properties to Render Text as HTML and give it the variable: list. Make the box as big as you like.
[]Convert this dynamic text box to a movie clip and give it the instance: list.
[*]On the keyframe insert this AS:
loadVariables("data.txt", "list");
[]Save the Flash and export the movie.
[]Open up the data text document, and put in this:** list=<li>2advanced.com</li> <li>Kirupa.com</li> <li>Flashkit.com</li>** and so on…
[*]And then you’re done! Test the .swf file!
[/list=1]
LoadVars() is far more versatile than loadVariables() and loadVariablesNum(), so I tend to stick with that. But whatever works
And then, you can edit the text file by adding the <a href=""> tag, making the list thingys clickable and linkable! Da-mn I’M GOOD!