A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: help me solve (mysterious) problem with textfield

  1. #1
    Flash Beginner
    Join Date
    May 2004
    Location
    Egypt
    Posts
    25

    help me solve (mysterious) problem with textfield

    hi flashkitters,

    the problem is that when i use the event ( textfield.onChanged )
    it doesn't work
    i tried more & more , but in vain
    i made dynamic textfield with instance name --> "ttt"
    ttt.onChanged=function (){
    ..........
    ..........
    ..........
    }
    it doesn't work at all
    i got mad

  2. #2
    Senior Member jbum's Avatar
    Join Date
    Feb 2004
    Location
    Los Angeles
    Posts
    2,920
    1. Stick a

    trace('hello');

    in the onChanged handler to see if it is being called.

    2. If you are sure it is not being called, post a simplified copy of your .fla so we can take a look.

  3. #3
    Flash Beginner
    Join Date
    May 2004
    Location
    Egypt
    Posts
    25

    problem with textfield (here is the fla)

    see this problem & help me if u can

    the problem is that when i use the event ( textfield.onChanged )
    it doesn't work unless i change it manualy (input text)

    as in this example
    there will be no response if u pressed the button to change the text

    anyone have a solution?
    Attached Files Attached Files

  4. #4
    Flash Beginner
    Join Date
    May 2004
    Location
    Egypt
    Posts
    25
    here is the fla file in flash mx format
    Attached Files Attached Files

  5. #5
    Flash Beginner
    Join Date
    May 2004
    Location
    Egypt
    Posts
    25
    what do u mean ?

    i need a solution for this bad thing

    i need it urgently

  6. #6
    Senior Member jbum's Avatar
    Join Date
    Feb 2004
    Location
    Los Angeles
    Posts
    2,920
    The movie you posted appears to be working great.

    When you edit the text on the bottom, the word 'changed' gets added to the dynamic text field on the top.

    Isn't this what you want?

    Perhaps you are using an older version of Flash? Works okay in Flash MX 2004.

    - Jim

  7. #7
    Senior Member jbum's Avatar
    Join Date
    Feb 2004
    Location
    Los Angeles
    Posts
    2,920
    Oh, I get it, you want the onChanged handler to get called when you press the Button, right? At the moment, it is only called when you manually change the text by typing in the field. The purpose of the onChanged event is to tell you that the user has changed the text. In this case, when you are changing it yourself, you are expected to already know that the text is being changed (after all, you changed it).

    However, you can just change your button code as follows if you want to get the event.

    code:

    on (release) {
    ttt.text = "mahmoud"+random(20);
    ttt.onChanged();
    }



    - Jim

  8. #8
    Flash Beginner
    Join Date
    May 2004
    Location
    Egypt
    Posts
    25
    excellent results

    that's exactly what i want

    great thanks, jbum for helping me


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