Actionscript Q+A
- Started
- Last post
- 11 Responses
- newtasty
I was wandering if anyone new a way to fake a real basic CSS using
Flash MX i am pulling a html file into a text box and i just want to be ablo to get any tags to format underlined.Does anyone have any ideas?
Thank You!
- newtasty0
I was wandering if anyone new a way to fake a real basic CSS using
Flash MX i am pulling a html file into a text box and i just want to be ablo to get any *HREF* tags to format underlined.Does anyone have any ideas?
Thank You!
- sinisnap0
couldn't you put style tags in the head of the html doc that contains the flash file?
if that doesnt work, maybe you could put the style tag inside the actual href's in the html you are pulling into your swf.
- newtasty0
Yeah, the problem is that Flash only supports limited html tags and it doesn't support CSS at all as far as i know I will have another look at that.
Basically I want the actionscript to format the A tags or URLs so that i don't have to write U tags in every time I update the file.
Thanks for the input.
- nothingcrat0
I think you would have to hard code the tags.
If you check the "HTML" box in text preferences you can use <i> for italics, <u> for underline, <b> for bold, and a couple of others (links, breaks, paragraphs, etc.), beyond that it's pretty limited .
- nothingcrat0
It would be a pain in the ass, but you could write a script that would parse your text and dynamically style any links.
I bet there's its already out there if you look around.
- unfittoprint0
For that is better to use a PHP with regular expressions to format the text file and "href" it, and then output the result to Flash.
i know i have some examples of that somewhere... but you can see how it works here:
- unfittoprint0
i know i did it once for a site, and in PHP i add the . . . tags around the link for it to be underlined.
- newtasty0
=) Yeah!, that is pretty much what I have been looking for! I will continue my search, anyone else have any ideas?
- newtasty0
Answers coming too fast, PHP sounds like a good idea. I will have a look at that
- newtasty0
Right, I get the concept unfortunately my PHP skills suck a fat one. =0 I'm off to see me php genius friend.
- Mick0
I havn't tried or looked into this but perhaps you could change the text values in flash when you load the HTML file ie. set a variable to replace any instance of (a href to (u)(a href and replace the closing tags of (/a) to (/u)(/a).
replace the () with greatherthan/lesthan - just put those in so they appear in this post.