A Flash Developer Resource Site

Page 4 of 5 FirstFirst 12345 LastLast
Results 61 to 80 of 91

Thread: [Resolved] [Resolved] [Resolved] [Resolved] textFormat example

  1. #61
    Member
    Join Date
    Feb 2001
    Location
    Palestine
    Posts
    81

    GOoooooooooooooooooooooodDDD

    Good work Guys
    is there any chance of using this work as a componant in flash MX ??

  2. #62
    caithness massiv
    Join Date
    May 2000
    Location
    denver
    Posts
    1,672

    Re: thanks..

    Originally posted by jonwiz
    Nice..didn't see that method!


    So how will I populate the combo box labels with the getFontList array?

    ::JONWIZ.com::
    [Edited by jonwiz on 03-25-2002 at 09:57 PM]


    //foo = _global.TextField.getFontList();
    //trace (foo);
    //my_cb.setDataProvider(foo);
    my_cb.setDataProvider(_global.TextField.getFontLis t());
    my_cb.sortItemsBy("label","ASC");
    my_cb.setSelectedIndex(0);

  3. #63
    Arckid - Curving the Web
    Join Date
    Dec 2000
    Location
    India
    Posts
    1,412
    code help'd lot ...

    thanks

  4. #64
    Junior Member
    Join Date
    Mar 2002
    Posts
    7

    Arrow really good stuff

    Hi,
    this is great and very helpfull..........but......do you know why I can't enter @-signs in your form? This only happens with flashplayer-6, not with flashplayer-5!
    thanx

  5. #65
    Junior Member
    Join Date
    Mar 2002
    Posts
    13

    excellent, but one question

    this is great stuff... I am new to flash, and I am just wondering, is there a way to make cut and paste work in a text editor like this?

    Bye
    Sergio

  6. #66
    Arckid - Curving the Web
    Join Date
    Dec 2000
    Location
    India
    Posts
    1,412
    yes you can do it.

    i dont remember exact syntax but,

    you can do it by making one function in javascript which can send variables from javascript to system clipboard.

    and so you have to send your flash variables to javascript and let it send them to clip board.

    this is the logic and hope it helps you.

  7. #67
    Senior Member
    Join Date
    Apr 2001
    Posts
    251
    How about making it a component that you could use to update different text fields throughout your movie. So you'd have this app as it is, then you'd have a spot where you could enter in the name of the text field you want it to apply to. Type in your text, then click the make changes button and it will update the selected text field. It'd be great to give to clients to make changes..

  8. #68
    Arckid - Curving the Web
    Join Date
    Dec 2000
    Location
    India
    Posts
    1,412
    yes,

    you can do it by onChange function ...

    but i dont know its supported by textBoxes ... its working with checkboxes and comboboxes ..

    check it out ..

  9. #69
    Junior Member
    Join Date
    Apr 2002
    Posts
    1

    help implementing Subway's code

    I'm new to AS, so I'm having some difficulty utilizing Subway's great example. It works just fine as is, but I want to use it with multiple input text fields. I'd like to have three text boxes on the same frame and, depending on the focus, have all the formatting buttons apply changes only to the selected text box. Can anyone point me in the right direction?

    Thanks,
    rsam

  10. #70
    Information Architect Subway's Avatar
    Join Date
    Feb 2000
    Location
    Switzerland
    Posts
    4,779

    Re: help implementing Subway's code

    Originally posted by rsam
    I'm new to AS, so I'm having some difficulty utilizing Subway's great example. It works just fine as is, but I want to use it with multiple input text fields. I'd like to have three text boxes on the same frame and, depending on the focus, have all the formatting buttons apply changes only to the selected text box. Can anyone point me in the right direction?

    Thanks,
    rsam
    If you get focus, you have to save the instance name of the focused textfield in a variable.

    Something like:

    Code:
    TextField1.onSetFocus = function(){
        _root.fieldOnFocus = "TextField1";
    };
    TextField2.onSetFocus = function(){
        _root.fieldOnFocus = "TextField2";
    };
    TextField3.onSetFocus = function(){
        _root.fieldOnFocus = "TextField3";
    };
    TextField4.onSetFocus = function(){
        _root.fieldOnFocus = "TextField4";
    };
    /...
    Hope that helps.

    Fredi

  11. #71
    Junior Member
    Join Date
    Jan 2002
    Posts
    20

    Re: ALL HTML-FORMAT TAGS:

    Originally posted by Subway
    But how can we set leading, indent ... ?

    The way to do this is to use the "TEXTFORMAT" tag:

    Code:
    <*TEXTFORMAT LEFTMARGIN=\"1\" RIGHTMARGIN=\"1\" LEADING=\"2\"><*P ALIGN=\"CENTER\"><*FONT FACE=\"_sans\" SIZE=\"12\" COLOR=\"#000000\">Some text<*/FONT><*/P><*/TEXTFORMAT>
    (without all the "*" of course)

    Nice, isn't it?

    Is there any documentation anywhere on this TEXTFORMAT tag? Also, are there any known support issues using it (is it supported cross platform?). Thanks!

  12. #72
    caithness massiv
    Join Date
    May 2000
    Location
    denver
    Posts
    1,672

    Re: Re: help implementing Subway's code

    Fredi --- what about the Selection.getFocus() ?!


    Selection.getFocus

    Availability

    Flash Player 5. Instance names for buttons and text fields work in Flash Player 6.

    Usage

    Selection.getFocus()

    Parameters

    None.

    Returns

    Nothing.

    Description

    Method; returns the variable name of the text field that has focus. If no text field has focus, the method returns null. If the current focus is a button, and the button is an instance of the Button object, getFocus returns the target path as a string. If the current focus is a text field, and the text field is an instance of the TextField object, getFocus returns the target path as a string.

    If a button movie clip is the currently focused button, Selection.getFocus returns the target path of the button movie clip. If a Text Field with an instance name is currently focused, Selection.getFocus returns the target path of the TextField object. Otherwise, it returns the Text Field's variable name.
    it seems to me that you're passing a variable that doesn't need to be passed

  13. #73
    Junior Member
    Join Date
    Apr 2002
    Posts
    1
    Ok guys,
    i'm still a little confused !!

    if i grab the selected text in the textfield using the following code:

    this.onEnterFrame = function() {
    if (textGotFocus){
    textStart = Selection.getBeginIndex();
    textEnd = Selection.getEndIndex();
    cursor = Selection.getCaretIndex()
    }
    }

    how do i then go about figuring out what formatting has already been applied to the selected text.

    ie. if the text is already bold and i select it again, i want the bold button to turn off the bold etc...

    any help greatly appreciated!

    cheers

    Pat

  14. #74
    Junior Member
    Join Date
    Apr 2002
    Posts
    1

    resolved

    Hi guys,
    I wonder y stopped discussing this subject.

    Subway, I am so intersted of all u efforts.I benifit alot from ur code samples.

    jonwiz,u have done nice job.

    Also
    i really got some questions answers.
    but still there are some points that are not clear for me such as:

    how to apply the format for selected text.
    if u can provide a sample i will be so gratefull.

    SQB

  15. #75
    Junior Member
    Join Date
    Mar 2002
    Posts
    7

    Red face Text editor with html converter

    Ok,
    here is the final for me :
    http://www.modilo.fr/index.cfm?fusea...wPage&page=100
    ColdFusion is used to convert the horrible html that flash generates.
    Sorry, this is a commercial product, decission of my employer.

  16. #76
    Junior Member
    Join Date
    Jan 2002
    Posts
    20

    Colored bullets?

    Has anyone figured out a way to color the bullets? For the life of me I can't find a way to make them anything but black, which is useless for dark backgrounds.

  17. #77
    Junior Member
    Join Date
    Mar 2002
    Posts
    16

    Recognizing changes made

    In the version I'm making, changes I make aren't refelected in the html until I type in the field

    Simple example:
    http://www.psychokinetic.com/experiments/fieldEdit.html

    If I make a word bold, then click show, the html doesn't show the bold. Then if I type in the field, then click show, the bold tags appear. Gerome, how did you get yours to reflect in the html?

    M@

  18. #78
    Junior Member
    Join Date
    Mar 2002
    Posts
    7

    Red face Re: Recognizing changes made

    The FlashHtml is rewritten by the coldfusion server which clean and correct everything.That's it

  19. #79
    Junior Member
    Join Date
    Mar 2002
    Posts
    16

    Re: Re: Recognizing changes made

    Originally posted by Gerome
    The FlashHtml is rewritten by the coldfusion server which clean and correct everything.That's it
    I understand that you are using CF to parse the HTML from Flash, but I'm having trouble with Flash not showing changes in the html of the field.

    In my test, if I select a word, then make it bold, then view the html of the text field, the bold tags aren't showing up as part of the variable. They do show up if I move the cursor to the end and type a letter. It seems I'm having a disconnect between the style shown and the html it produces. Any suggestions?

    M@

  20. #80
    Junior Member
    Join Date
    Mar 2002
    Posts
    16

    Got it.....

    I was using

    show=myField;

    where show was non-HTML field and myField was my formated field, what I needed to do was

    show=myField.htmlText;

    I hate it when little things like this hang you up....

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