dcsimg
A Flash Developer Resource Site

Page 1 of 2 12 LastLast
Results 1 to 20 of 22

Thread: TextBoxes loading doc files??

  1. #1
    Senior Member
    Join Date
    Feb 2002
    Location
    Geneva, CH, Europe
    Posts
    521

    TextBoxes loading doc files??

    Hi,
    I would like to know whether you can load text from Word documents, or any other good word processors.
    Basically, I want to make the loaded text look good. On most sites, you have these "News" boxes that are made dynamic and charged from DBs (I think).. How do they get to have such wonderful formatting ??

    Thanks,
    Manojo

  2. #2
    FK's Giant Steve_w_V's Avatar
    Join Date
    Mar 2003
    Location
    San Jose, California
    Posts
    2,113
    I've done it before with HTML coding. That's a lot of work though... You can probably do it like:
    Code:
    &text1=All of the document here.  When you come to a line break, have %A0 to make it break.
    I think the %A0 is correct, but look around.
    The other day, I bought a box of animal crackers. On the side, it said "Do Not Eat if Seal is Broken". I opened the box and sure enough...

  3. #3
    Senior Member
    Join Date
    Feb 2002
    Location
    Geneva, CH, Europe
    Posts
    521
    Thanks Steve_v_W !! As a matter of fact I too tried doing with HTML text in the database.. I am looking for a less tiring, long, solutions.. Would you have any other suggestions?? Even if it is saying don't do text thru DB??

    Another thing i thought about is typing the text on FrontPage, convert to HTML and load the txt file.

    The action for loading into a textbox is this right ?? _root.TextBox.load("mytext.txt")

    Thanks,
    Manojo

  4. #4
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    If you're talking about up to MX (not MX2004 which has some CSS capabilities), only some 11 html1.0 tags are officially supported...

    http://www.macromedia.com/support/fl...s/htmltext.htm

    Usually such text files are simply made with Notepad and saved as simple .txt files. Trying lo load .doc files with other tags may fail.

    As for loading some text (not & html formated), you should have a look at this which uses the new LoadVars() object, much less error prone than loadVariables...

    http://www.macromedia.com/support/fl...ng_text_mx.htm

  5. #5
    Senior Member
    Join Date
    Feb 2002
    Location
    Geneva, CH, Europe
    Posts
    521
    Hi,
    actually, as you know I am already loading a php file for my data..
    so the question is can you use
    c.load twice??
    if yes, then in my txt file, do I imperatively have to say &myvar = "...." ???

    Thanks,
    Manojo

  6. #6
    Senior Member
    Join Date
    Feb 2002
    Location
    Geneva, CH, Europe
    Posts
    521
    Hi,
    question. Is it possible in any way to load a html file in your text box?
    thanks,
    Manojo

  7. #7
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    As such, answer = no!

    Some CSS capabilities with MX2004 only...

    http://www.actionscripts.org/tutoria...sh/index.shtml

  8. #8
    Senior Member
    Join Date
    Feb 2002
    Location
    Geneva, CH, Europe
    Posts
    521
    thanks.. bad luck it still don't exist, but I think I foud a solution

    Manojo

  9. #9
    Senior Member
    Join Date
    Feb 2002
    Location
    Geneva, CH, Europe
    Posts
    521
    Hi again,
    small question
    in my txt how do I put html tags in place?

    I type
    &myvar= "<b>" hello world "</b>" (without quotes of course)
    it doesn't work

    thanks,
    Manojo
    Last edited by manojo; 02-05-2004 at 04:01 PM.

  10. #10
    Mod cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,448
    Here is a tutorial.

    http://flashscript.biz/text/htmlinxml/htmlinxml.html

    I use xml as textfiles.
    - The right of the People to create Flash movies shall not be infringed. -
    | www.Flashscript.biz | Flashscript Biz Classes/Components |

  11. #11
    Senior Member
    Join Date
    Feb 2002
    Location
    Geneva, CH, Europe
    Posts
    521
    Hi,
    thanks for the message..
    the tutorial :
    code:
    function parseThisXml(){
    scroller.target = textField;
    scroller.setScrollPosition();
    textField.html=true;
    textField.htmlText=this.firstChild;
    }



    what is scroller ?

    thanks,
    Manojo

  12. #12
    Mod cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,448
    That is the name for a scrollbar.
    - The right of the People to create Flash movies shall not be infringed. -
    | www.Flashscript.biz | Flashscript Biz Classes/Components |

  13. #13
    Senior Member
    Join Date
    Feb 2002
    Location
    Geneva, CH, Europe
    Posts
    521
    hi cancerinform,
    thanks for that it's quite HUGE. please visit this page :
    http://membres.lycos.fr/manojo/vital.html
    can you tell me why I get so much space between the paragraphs?

    my code is quite simple for the xml
    PHP Code:
    <?xml version="1.0"?>
    <text>
    <font size="10" face="Times New Roman">
    long text<p><b>
    quite a long text</b></p>
    <p>
    long text</p>
    <p>
    long text
    </p>
    <p>
    <b>
    less long text
    </b>
    </p>
    <p>
    long text
    </p>
    </font>
    In my Flash code, I have nothing defining text sizes or whatever.
    Thanks,
    Manojo

  14. #14
    Mod cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,448
    use this way:
    PHP Code:
    <?xml version="1.0"?> 
    <text><p> 
    <font size="10" face="Times New Roman"> 
    long text<b>quite a long text</b>
    <br/>
    long text
    <br/> 
    long text
    <br/> 
    <b>less long text</b> 
    <br/> 
    long text 
    </p> 
    </font>
    </text>
    Do you have 2004? then I can send you something how to use css. The Flash version of mysite for the tutorials (tutorial database) is designed in that way with css.
    - The right of the People to create Flash movies shall not be infringed. -
    | www.Flashscript.biz | Flashscript Biz Classes/Components |

  15. #15
    Senior Member
    Join Date
    Feb 2002
    Location
    Geneva, CH, Europe
    Posts
    521
    Hi, thanks once again cancerinform.. more doors open to me ^^
    yes I do have MX 2004, and I would appreciate that little bit of css.
    Thanks a lot,
    Manojo

  16. #16
    Mod cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,448
    I send you the files tonight? I frist have to prepare them. What is your email?
    - The right of the People to create Flash movies shall not be infringed. -
    | www.Flashscript.biz | Flashscript Biz Classes/Components |

  17. #17
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Don't ask for e-mails to be posted in threads. Have him PMed it to you or something...
    SPAM!

  18. #18
    Mod cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,448
    Ok,

    have a nice weekend oldnewbie
    - The right of the People to create Flash movies shall not be infringed. -
    | www.Flashscript.biz | Flashscript Biz Classes/Components |

  19. #19
    Senior Member
    Join Date
    Feb 2002
    Location
    Geneva, CH, Europe
    Posts
    521
    ok sorry
    you can PM it to me then cancerinform ^^

    Manojo

  20. #20
    Senior Member
    Join Date
    Feb 2002
    Location
    Geneva, CH, Europe
    Posts
    521
    Hi,
    I have a question on XML/HTML editing

    when you make lists you do
    PHP Code:
    <li></li
    How do you do to double list ? the visual layout would be something like :
    Some nice text introduces :
    - pancakes
    :eggs
    :cream
    - chocolate cake

    etc etc.. how do you make the : after the - ??

    Thanks,
    Manojo

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