A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Anyone know of a good solution?

  1. #1
    Junior Member
    Join Date
    Sep 2002
    Posts
    18
    Okay, I am having a strange problem and hopefully there is an easy fix. I posted a message before, but it didn't even make sense to me so I am going to try again.

    I am trying to create a flash movie that will do simple text editing by selecting text and clicking on a button... bold, underline, url, color. I got this to work fine, however when you, for example, select some text and make is bold the HTML tags for bold do not show up.

    please refer to my quick example : http://www.gooweb.net/texteditor2.html

    I have two text boxes, but are the same variable. One is rendering HTML and the other is the raw data. Notice when you type something highlight it and bold it the raw data text box doesn't even show the changes. I need this to update when you change text. Anyone know if this is possible?? Thanks!!


    -- Also notice if you type text and change it by making it bold and decide to type some more, all of a sudden the changes show up. These changes should show up right when you perform the change.. errr ) --

  2. #2
    iguanagirl32 mraspiller's Avatar
    Join Date
    Jul 2002
    Posts
    817
    need to see your code...

  3. #3
    Junior Member
    Join Date
    Sep 2002
    Posts
    18

    Code

    http://www.gooweb.net/textfile2.fla - for the code. Thanks!

  4. #4
    Junior Member
    Join Date
    Sep 2002
    Posts
    18

    FORGET LINK TO CODE

    Here is the code attached to the bold button.

    on (rollOver) {
    tText = eval(Selection.getFocus());
    tField = Selection.getFocus();
    tStart = Selection.getBeginIndex();
    tEnd = Selection.getEndIndex();
    tCur = Selection.getCaretIndex();
    }
    on (release) {
    myTextFormat = new TextFormat();
    myTextFormat.bold = true;
    yo.setTextFormat(TCur, myTextFormat);
    yo.setTextFormat(tStart, TEnd, myTextFormat);
    }

    Same for un-bold....


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