Render HTML Table in Flash. I posted this unfinished code for the actionscript hackers on the Flashcoders mailing list to play with. This code is not documented, and incomplete. I'm posting it because I'm too busy finishing graduate school to spend time on this table renderer, but wanted to contribute my current work to the community. No documentation is provided, use at your own risk. GPL license. Note that it reads rgb values as hex values, not as #ffffff format.
IMPORTANT: My code is loosely based on the HTML specifications for the two-pass autolayout algorithm that renders HTML tables. You can read that RFC online (I think it's RFC 1942).
Posted by samuel at April 10, 2002 12:51 AMGreat site.....
Posted by: Mark Bowen at April 29, 2002 12:01 AMI downloaded it, ran it and nothing happens??
Posted by: at April 30, 2002 09:17 PMHave you tried unzipping all the files into the same directory? It's important to do so, because you need to have the xml file in the same location as the flash file.
-Sam
Posted by: Sam at May 2, 2002 10:30 PMthis is a great component (in the development stages). has anybody else out there changed the code so that it's less buggy and so that you can do simple text formatting, such as bold, italic or colored text?
thanx,
kmeezy
Hey,
Wow - just found this table component. Anyways I started working on my own table component a while ago - I'll probably finish it off soon. It was really cool seeing this one though.
You can view it here:
http://www.flash-db.com/FlashTable/
Here's a sample html file it reads:
http://www.flash-db.com/FlashTable/Welcome.html
(View source to see the code).
The problem I've been having is the Auto Resize part of the text field - Since it's drawing the Text Field, Table, and Cells seperatly on different layers (Plus a Active State bg part - for custom actions) - I can't use myText.autoresize since the back ground cells would not be affected (at least I don't think I can). And it gets annoying to work out the formula to for how many chars per specified font fit in a given area. ahh. I guess if only 1 font was able to be specified in the html tags - it would be ok. But different fonts have different size's so it gets even more annoying. I guess I could just leave extra space in each cell for difference's in Font size's but well you can see where it can get confusing. I can post the code if you've got any idea's.
this has a promising future.
Posted by: code|name at September 26, 2002 09:47 PMAnyone here who wants to work with me on this, I think there are some very exciting possibilities here. Using Sam's work as a baseline, this code can serve the basis for a lightweieght XHTML browser in FlashMX.
I have started work on adding the following functionality to the table rendering class:
(1) Support for percentage widths on tables
(2) Support for nesting
(3) Support for IMAGES in cells(JPEG only. GIF/PNG later with Claus Wahler's projected upgrade to jpg2swf)
(4) Support for Divs, and Spans (later H1-H6).
(5) Change the root node to "<BODY>" to allow complete document rendering. Not just tables.
(6) Support for inline styles
This would be the first ever example of XHTML source rendering in flash. I think that is very exciting! Thanks for getting this started Sam!!!
This could be a great component!
Please could you add the following features
1. Remove whitespace
2. Support for MyTextMore Text]]>
or add support for ,,,, size type and color.
3. Make table scrollable
4. Color conversion to hex colors
Like the idea for images!
Hi guys,
Is there some place where I can download some demo/code sample and play with this?
What stage of development are you guys in?
Regards
Vipin
Hi guys,
Is there some place where I can download some demo/code sample and play with this?
What stage of development are you guys in?
Regards
Vipin
Hi Sam,
I can really use the HTML Table from within flash functionality on my current project.
Please help me out here and direct me as to where I can purchase/download the component
Regards,
Vipin Kanwar
Hi Sam,
We were trying very hard to get a hold of you. But it seems your Email is not available anywhere.
We are hoping very much you will reply to us and help us in dire need of a component you wrote.
We are working on an E-Learning project which needs the Flash XML/HTML table component.
Without such a component, we have to do very troublesome HTML tag parsing and it will delay us exponentially.
Please help me out here and direct me as to where I can purchase/download the component. If you are not selling it, can you point us to a place where there are similar components?
Regards,
Prasenjit
Sorry about the delay, Prasenjit, I just finished reformatting my hard-drive and have slowly begun making my way back to the internet.
Regarding table code, there is a zip file linked at the top of this post, containing the HTML code. However, there is a more powerful project developed by Claus Wahlers called "DENG". YOu might find some information about his project at this link: http://webaccess.mozquito.com/features/index.xml
Hope that helps.
-Sam
Posted by: Samuel Wan at March 7, 2003 09:42 PMHi Sam,
Thanks for the information.
Does anyone know how I could contact Jeff. I think it would be easier to extend his table.
Jeffs current link leads me to http://www.flash-db.com. I would like to contact him via phone, chat or email.
Regards,
Vipin Kanwar
hi vipin,
i'm facing a problem similar to yours...if u come up with a solution, pls. let me know too
thanks,
Amit
sam, nice1
Posted by: allen manning at April 23, 2003 04:50 PMSam,
Why is there a hardcoded '4' in 'while(colID <= 4)' starting the second pass of 'Table.prototype.renderTable', I'm going to hunt around for a better way to set this value unless you got one...
Posted by: allen manning at April 28, 2003 05:18 PMi replaced it with:
while(colID <= coldata.length)
Posted by: allen manning at April 28, 2003 05:43 PMmight also want to consider colspans in your development?
Posted by: jase at June 13, 2003 04:04 AMHi Sam,
I like your flash - html table component. It is perfect for a report (rows/colums) I need to create. I'm new to components - how do I see the clip/ graphic/ actionscript within the component??
Also, Is this possible with Flash 5? - I have another project to use Flash 5 and not Flash MX??
Any help would be appreciated.
Posted by: Patrick Whittingham at July 12, 2003 02:36 AMi tried to add tag for a text inside the . But this is not working. Please let me know is there any to integrate the html tags like bold, italic, bullets etc in this component.
Posted by: Sajith at September 17, 2003 12:44 PMHi, I just wanted so say thank you guys ! i really like your site and i hope you'll continue to improving it.
Posted by: viagra at January 25, 2004 12:01 AM