dcsimg
A Flash Developer Resource Site

Page 2 of 5 FirstFirst 12345 LastLast
Results 21 to 40 of 91

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

  1. #21
    Arckid - Curving the Web
    Join Date
    Dec 2000
    Location
    India
    Posts
    1,412
    nice try but to buggy ...

  2. #22
    Information Architect Subway's Avatar
    Join Date
    Feb 2000
    Location
    Switzerland
    Posts
    4,779
    Originally posted by aashu.com
    nice try but to buggy ...
    I know.

    The problem is that I changed the hole thing from the textFormat object to html formating.

    Anyway, it is (with all the bugs) proved now that a real WYSIWYG text editor is possible! Basta!

    Fredi

  3. #23
    Information Architect Subway's Avatar
    Join Date
    Feb 2000
    Location
    Switzerland
    Posts
    4,779
    [swf width="550" height="300" background="#FFFFFF"]http://www.zh-webdesign.ch/zoa/autosize2.swf[/swf].

    Btw. the biggest bug in it:

    If you select something with different formats in it - it will make something stupid.

    But if you select just a part of it that has one format, it will works really well.

    So, better version later.

    Fredi
    [Edited by Subway on 03-22-2002 at 07:56 AM]

  4. #24
    caithness massiv
    Join Date
    May 2000
    Location
    denver
    Posts
    1,672
    looking good

    let me know if you want any help figuring out that damn bug!

  5. #25
    Information Architect Subway's Avatar
    Join Date
    Feb 2000
    Location
    Switzerland
    Posts
    4,779
    Originally posted by agent vivid
    looking good

    let me know if you want any help figuring out that damn bug!
    I will send you the file tomorrow. Thx.

    I'm sure it is nothing big, but I can't see it at the moment.

    Fredi

  6. #26
    Junior Member
    Join Date
    Mar 2002
    Posts
    6
    Ahoi,
    So how you tell that textfield Object to handle the currentFocus? I spend the whole day to get this...
    greetz
    Daniel

    [english isnt my first language, so...]

  7. #27
    Senior Member
    Join Date
    Mar 2001
    Posts
    237
    umm.. why can't i see this example? the original post (by Subway) is blank. am I missing something?

  8. #28
    Yeah, probably missing a Flash 6 player

    The whole thing looks good, in the first edition I don't think it would change fonts for me, but did all the rest great, though the second edition di change fonts, but didn't do all the rest

    How about connecting the 2? lol

    I'm sure once you'll fix the bugs it'll work great

  9. #29
    Information Architect Subway's Avatar
    Join Date
    Feb 2000
    Location
    Switzerland
    Posts
    4,779
    Originally posted by speechy
    Ahoi,
    So how you tell that textfield Object to handle the currentFocus? I spend the whole day to get this...
    Code:
    this["mytext" + currentLine].onKillFocus = function () {
    	myFocus = false;
    	Selection.setSelection(selStart-1, selEnd-1);
    };
    this["mytext" + currentLine].onSetFocus = function () {
    	myFocus = true;
    };
    
    // What is selected?
    this.onEnterFrame = function() { 
    	if (myFocus){
    		selStart = Selection.getBeginIndex()+1;
    		selEnd = Selection.getEndIndex()+1;
    		cursor = Selection.getCaretIndex()
    		selected = substring(this["mytext" + currentLine].text, selStart, selEnd - selStart);
    	}
    }
    That's just part of the code, but one part the actually works perfect.

    Originally posted by speechy
    [english isnt my first language, so...]
    Me too!

    Fredi

  10. #30
    Information Architect Subway's Avatar
    Join Date
    Feb 2000
    Location
    Switzerland
    Posts
    4,779
    Ok, I'm sure I found the way to do it. A lot of coding to do, but it will do the job.

    The problem was that there is only the possibility to know which part of the text is selected and not where this part is in the html formated property of the textobject. (Not without a lot of search routins, that involve the HTML tags of the formated text)

    So what I use now is an array that has the formating for every character of the textfield. A lot of work, but it will do the job.

    Will post the file later when I recoded the hole stuff. (Done a little part allready and it works perfectly)

    Cheers, Fredi

  11. #31
    Arckid - Curving the Web
    Join Date
    Dec 2000
    Location
    India
    Posts
    1,412
    cool!!

    how much total code is .. how many lines ?? approx

  12. #32
    Junior Member
    Join Date
    Jan 2001
    Posts
    21
    ok - I get how to make my text italic, etc...
    how do I get my text to go back after I have clicked my button to make it italic????
    thanks!

  13. #33
    Information Architect Subway's Avatar
    Join Date
    Feb 2000
    Location
    Switzerland
    Posts
    4,779
    Originally posted by lysallyn
    ok - I get how to make my text italic, etc...
    how do I get my text to go back after I have clicked my button to make it italic????
    thanks!
    Wait for the version I will publish in about 24 hours. Then everything will work like it should work. Thx to my own format/selection handling.

    Fredi

  14. #34
    Information Architect Subway's Avatar
    Join Date
    Feb 2000
    Location
    Switzerland
    Posts
    4,779
    Originally posted by aashu.com
    cool!!

    how much total code is .. how many lines ?? approx
    Hmmm ... at the moment: 250 lines ... when it's finished: maybe 350, maybe less, maybe more

    Fredi

  15. #35
    Member
    Join Date
    Mar 2001
    Posts
    54

    align on empty textField???

    subway,i saw your above briliant work
    but i got a problem in creating an empty newtextField and align it to *for example "center"
    it doesnt work the align works only for textFields with values.
    and if it is supose to work like that than how should i build my userinterface with fields that should handle prices and should be aligned to right.
    i am creating a textField component and it has a whole set of properties and parameters and the createTextField is the exact object i need but it doesnt work right so what should i do.

  16. #36
    Information Architect Subway's Avatar
    Join Date
    Feb 2000
    Location
    Switzerland
    Posts
    4,779
    Have you tryd it with yourTextField.text = " "; ?

    Anyway, wait for the realease of my tool and you have a new way to do all the formating stuff.

    Fredi

  17. #37

    Smile


    Hey Subway,

    I am damn impressed.

    Great work, keep on rocking,

    grandmasterC

  18. #38
    Information Architect Subway's Avatar
    Join Date
    Feb 2000
    Location
    Switzerland
    Posts
    4,779
    Originally posted by grandmasterC

    Hey Subway,

    I am damn impressed.

    Great work, keep on rocking,

    grandmasterC
    Thx!

    I just updated the above version (site 2 of this thread). Everything should work now (Font, Size, align, color ...). The only thing you cant do is "bold" and "italic" and don't jump to a new line with "return" or "enter", that makes some funny things.

    Hope I can finish it today, if not, then I post the source monday.

    Fredi

  19. #39
    Information Architect Subway's Avatar
    Join Date
    Feb 2000
    Location
    Switzerland
    Posts
    4,779
    Nice! Good work! How much code is it? (lines)



    Fredi

    [Edited by Subway on 03-22-2002 at 09:40 AM]

  20. #40

    Post WOW!

    Now that is great! works perfectly! amazing! wow! lol

    Can you send the .fla so we can see how it's done or even add a couple of things, you can even make it an E-mail sender or maybe a comment app!

    Nice job, really nice

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