Yey, it worked. I just used
<b><</b>tag> so it wont result in an error. Of course for posting this, I needed to use <b><</b>b><b><</b><b><</b>/b>tag>, and for displaying that, it looks even worse :-))
I am still puzzled why there is no CODE-Tag here on the NG BBS.
Its not hard to implement.
One thing to your Tutorial, you should use http://www. instead of just www., since its more tidy, and if people ever start to make HTML-pages, it might result in errors. Some browsers will not interpretate <a href="www....."> correctly.
But anyway, here it is:
As:Main
if you havnt bookmarked this ill poop on you grave.
Intro;
In this tutorial you will learn about flash HTML text.
basic understanding of flash is needed.
and
understanding of html wont go astray
---
Content
ok well first off how to render a textbox in flash html encoded.
If you have the textbox already on the stage (canvas) then open the properties tab
and right next to the 'make text selectable', button there is a button 'render text as html'.
Click that and it now will accept html tags. simple =D well not realy =(
If you just type into the textbox
<b> hullo this should be bold</b>
nothing will happen =( you have to put in the information in runtime.
(thats pretty obviouse; other whys they woudnt have the bold and italics butons lol).
any way once you have renderd the text as html give it a variable of anything, im using
htmlText
then put this in
htmlText = "<b> this text IS BOLD </b>"
see simple =D
but thats not the only way of doing it, say you want to do it 100% dynamicly
then you can do somthing like this
this.createTextField("textBox", this.getNextHighestDepth(), 10, 10, 160, 22);
textBox.html = true;
textBox.htmlText = "<b>this is bold text </b>";
creating text feilds is coverd here As: Text Feilds
All text feilds have a .html attribute and a .htmlText attribute
the .html attribute is just like the button in the properties tab
.htmlText attribute you need this to send html text to a textBox
those are the main ways of using html Text in flash here are a list of tags that flash supports
TAGS
<b> - makes text <b>bold</b>
<i> - makes text <i>italic</i>
<u> - makes text underlined</u>
<a> - used for hyperlinks <a href="www.google.com">google</a> - you need more information than just <a> it has to be in this format -<a href="www.google.com">google!</a>
<img> - displays a picture in the text feild - used like <img src="www.domain.com/pic.gif"> - you can use movieclips just add the linkage idetifier like so - <img src="pic"> simple
<br> - new line
<li> - list item puts in a bullet point
<font color='0x999999' face='times new roman' size ='12'> - changes font color size and font
thats mostly it there are other things like CSS styling sheets but thats for another time
Example
put this in to flash
this.createTextField("textBox", this.getNextHighestDepth(), 10, 10, 160, 22);
textBox.html = true;
textBox.htmlText = "<b>this is bold text </b><br><i>this is italics text</i><br><u>thi si underlined" textBox.htmlText += "text</u><br><a href='www.google.com'>google.com</a><br><b
r>" textBox.htmlText += "<li>bulletpoint!!</i><br><li>bulletpoint!
!</i><br><li>bulletpoint!!</i>"
textBox.htmlText += "<br><li>bulletpoint!!</i><br>";
simple =D
asFunction
heres somthing i fogot to mention eairlyer =0 you can call functions from a hyperlink made in flash like this
this.createTextField("textBox", this.getNextHighestDepth(), 10, 10, 160, 22);
textBox.html = true;
textBox.htmlText = "<a href=\"asfunction:Dissconnect\">Dissconect
</a>"
//
function Dissconnect() {
trace("Dissconnected");
}
;
thats pretty cool huh =D
and thats pretty much it
i know there is LOADS of spelling mistakes but i know i cant spell for nuts so im sorry about that.
this was made in haste some im sorry if it seems rushed or there are bugs but post em and ill iron them out =D
www.w3schools.com for more info on html