Well, isnt it possible to "fool" the HTML-Parsing here?
example_>
< a href="http://test.com">
<a href="http://test.com">
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
Nice tutorial.
And thanks for including my tutorial in it :D
At 11/24/05 08:30 AM, schorhr wrote: Well, isnt it possible to "fool" the HTML-Parsing here?
how did you do that
At 11/24/05 10:19 AM, GuyWithHisComp wrote: Nice tutorial.
And thanks for including my tutorial in it :D
no problem =D
firstly schorhr thank you for converting that for me =D greatly appeciated
and secondly Flash_kid thanks i see that now =D
No problem :) Maybee you can re-post this one or ask a mod to modefy/delete it?
Then just re-do it, so people dont get confused :))
im not sure how far this fits into an AS thread but sure
At 11/24/05 04:15 PM, Ninja-Chicken wrote: im not sure how far this fits into an AS thread but sure
what do you mean? its flash html text..
At 11/24/05 04:21 PM, shazwoogle wrote:At 11/24/05 04:15 PM, Ninja-Chicken wrote: im not sure how far this fits into an AS thread but surewhat do you mean? its flash html text..
which evidentally is html :P
Its just HTML put into a text box. That like me doing
AS: Poetry... in a text box
I think it fits, since the HTML Parsing is a neat feature, that helps making dynamic text, since you can even make links to call functions. When I made my multiplayer game, I used HTML a lot for this purpouse, and to format the text.
At 11/24/05 05:37 PM, schorhr wrote: I think it fits, since the HTML Parsing is a neat feature.
yeah when i made my chat client i used it HEAPS
and a few other games which i havnt released
Not Found
The requested URL /htmlText.htm was not found on this server.
Apache Server at woogletown.box43.net Port 80
wow!
At 8/5/06 04:58 PM, -Chaz- wrote: bad link in post 1.
No need to bring that up since scrohahbhcxag wrote it here at the BBS.
...