00:00
00:00
Newgrounds Background Image Theme

bugblast just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

As: Html Text

4,013 Views | 19 Replies
New Topic Respond to this Topic

As: Html Text 2005-11-24 07:04:40


As: Main

html Text

im sorry not having the tutorial here but since NG dosnt alow many html tags or <
i had to make my own webpage which did which is here html Text

any way just treat this like any 'normal' As: post.

Response to As: Html Text 2005-11-24 08:27:39


Yeah not bad, nice job

Response to As: Html Text 2005-11-24 08:30:58


Well, isnt it possible to "fool" the HTML-Parsing here?
example_>
< a href="http://test.com">
<a href="http://test.com">

Response to As: Html Text 2005-11-24 08:46:39


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

Response to As: Html Text 2005-11-24 10:19:06


Nice tutorial.
And thanks for including my tutorial in it :D


BBS Signature

Response to As: Html Text 2005-11-24 15:07:01


At 11/24/05 08:30 AM, schorhr wrote: Well, isnt it possible to "fool" the HTML-Parsing here?

how did you do that

Response to As: Html Text 2005-11-24 15:09:03


At 11/24/05 10:19 AM, GuyWithHisComp wrote: Nice tutorial.
And thanks for including my tutorial in it :D

no problem =D

Response to As: Html Text 2005-11-24 15:12:59


he fooled it by using Bold things, etc. < > those


========|| WWWWWWWW>[-[Blog] - [Audio] - [Userpage] - [Flash] - [Last.fm]-]<WWWWWWWW ||========

BBS Signature

Response to As: Html Text 2005-11-24 15:24:38


firstly schorhr thank you for converting that for me =D greatly appeciated

and secondly Flash_kid thanks i see that now =D

Response to As: Html Text 2005-11-24 16:14:52


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 :))

Response to As: Html Text 2005-11-24 16:15:58


im not sure how far this fits into an AS thread but sure


- Matt, Rustyarcade.com

Response to As: Html Text 2005-11-24 16:21:14


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..

Response to As: Html Text 2005-11-24 16:30:53


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 sure
what 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


- Matt, Rustyarcade.com

Response to As: Html Text 2005-11-24 17:37:14


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.

Response to As: Html Text 2005-11-24 19:34:43


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

Response to As: Html Text 2006-08-05 16:37:25


It would be good.. if the link worked :P

Response to As: Html Text 2006-08-05 16:53:46



Not Found

The requested URL /htmlText.htm was not found on this server.
Apache Server at woogletown.box43.net Port 80

wow!

Response to As: Html Text 2006-08-05 17:03:35


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.


BBS Signature

Response to As: Html Text 2006-08-05 17:35:30


Eep... your link 404'ed me...


...

BBS Signature