A Flash Developer Resource Site

Results 1 to 14 of 14

Thread: Loading HTML Table in dynamic text

  1. #1
    Junior Member
    Join Date
    Aug 2006
    Posts
    6

    Loading HTML Table in dynamic text

    I have an html file, called text.html, it is a simple file with just rows of data defined in a table such as <Table><tr><td> etc....


    All I want to do is load it to a dynamic textbox in Koolmoves and have the textbox display as it would in a browser. I need the file so I can display the data in a readable format where all the data lines up (aligned).

    Other than setting the Has HTML to yes, are there any other things that I need to have or NOT have in the text.html?.... I have noticed that certain attributes like border=1, width=500 in the html file causes nothing to load.

    Thanks in advance!

  2. #2
    undead creature necromanthus's Avatar
    Join Date
    Feb 2002
    Location
    ROM
    Posts
    1,890

  3. #3
    Junior Member
    Join Date
    Aug 2006
    Posts
    6

    Suggestions...

    Ok, thanks... I see that there are some limitations. So when a developer creates an external file that he needs to display back into Koolmoves in a Table/Row/Col type format where everything is aligned, what do they do?

    Thanks again for the help.

  4. #4
    undead creature necromanthus's Avatar
    Join Date
    Feb 2002
    Location
    ROM
    Posts
    1,890
    If you need (badly) to work with "Table/Row/Col type format" you need multiple dynamic text fields (Has html = yes).
    The main problem is that you also need to process the "HTML loader" in order to obtain a HTML "slice" for each dynamic text field.
    For example:
    txt1var = "1)<br>2)<br>3)";
    txt2var = "Red<br>Blue<br>Green";

    Obviously, an active script (PHP,CGI,ASP,etc) is required for that.
    cheers

  5. #5
    Junior Member
    Join Date
    Aug 2006
    Posts
    6

    Excel Solution...

    What if I had the data already in an excel file, is there a way for me to simply import the excel file and show it on a page in Koolmoves?

    So, in essence, forget about using the dynamic textbox, and simply replace the textbox with the imported excel file.

    Thanks for the help.

  6. #6
    undead creature necromanthus's Avatar
    Join Date
    Feb 2002
    Location
    ROM
    Posts
    1,890
    Excel (xls) files are hardcoded files and can't be recognized by FlashPlayer.
    But if you want to develop a "flash XLS parser" ...

  7. #7
    Junior Member
    Join Date
    Aug 2006
    Posts
    6

    Solution...

    I think what I will be forced to do is when creating the the text file I will dynamically create the dynamic text names:

    Fav1var='DAL'
    Spd1var='3.5'
    Und1var='NYG'
    OurPick1var='NYG'

    Fav2var='DEN'
    Spd2var='13.5'
    Und2var='NO'
    OurPick2var='NO'

    Instead of just having one variable name that holds all the data. And then
    layout the dynamic textboxes on the page. Since there will almost always
    be 16 rows of data, I can hardcode the dynamic textboxes from 1 to 16.

    Thanks for all the help today, if you like football my site is http://www.pointspreadpros.com we do NFL football handicapping with FREE picks each week.

  8. #8
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    Wilbert described and provided code to load in a CVS file which you can save an Excell sheet as. Do a search of the forum. It uses the feature onData that you get when using LoadVars to parse the info.

  9. #9
    undead creature necromanthus's Avatar
    Join Date
    Feb 2002
    Location
    ROM
    Posts
    1,890
    Quote Originally Posted by blanius
    Wilbert described and provided code to load in a CVS file which you can save an Excell sheet as. Do a search of the forum. It uses the feature onData that you get when using LoadVars to parse the info.

    Comma Separated Values (CSV) file format is not a solution in this case.
    As I said before, it's impossible to create tables in a single dynamic text field.

  10. #10
    Junior Member
    Join Date
    Sep 2006
    Posts
    6
    as a noob, then, I ask, how do you create tables in KM? different dynamic text fields?

  11. #11
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    CSV is a way to get Excel data into your flash though. I agree tables are not possible in textfield.

  12. #12
    Senior Member
    Join Date
    Dec 2002
    Location
    Netherlands
    Posts
    1,632
    The 'easiest' way might be to create a cell (a movieclip with a dynamic textfield and some actionscript code for text alignment, resizing etc.) inside the symbol library and to attach that multiple times.

  13. #13
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    I thought about that, but I would imagine the overhead would get to be too much pretty quick.

  14. #14
    Junior Member
    Join Date
    Sep 2006
    Posts
    6
    problem is...these tables will need formula....and some of the formulas I need to write are deeper than excel can handle. for example, excel can only handle 7 imbedded conditions, I need something that can handle about 129.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center