A Flash Developer Resource Site

Results 1 to 12 of 12

Thread: Dinamic text field from an Input text field

  1. #1
    Junior Member
    Join Date
    Sep 2010
    Posts
    8

    Dinamic text field from an Input text field

    What I'm trying to do is to write something in an input field and then it should show up in a dinamic field. I can make this happen, but the problem is that the dinamic field shows its new text in the same format as the Input field. For example, the input text is written in TimesNewRoman and the dinamic text is in Arial, but when the dinamic text shows the input, the text is still in TimesNewRoman when I want it to be in Arial. Anyone knows how to make this work?

  2. #2
    :
    Join Date
    Dec 2002
    Posts
    3,518
    Did you embed the font for the dynamic text?

    Can you post the code here that you are currently using?

  3. #3
    Junior Member
    Join Date
    Sep 2010
    Posts
    8
    I'm trying to do it like this:
    http://www.mediafire.com/?s9l2372q79t0k3o

  4. #4
    :
    Join Date
    Dec 2002
    Posts
    3,518
    Sorry, I can't view things that aren't posted here.

  5. #5
    Junior Member
    Join Date
    Sep 2010
    Posts
    8
    ok, then I'll try to explain.
    theres one input text field named "a"
    theres on dinamic text field named "b"
    and a button which has this code: on(press){ b=a; }
    but when i write something in the input and press the button, the dinamic text changes to look the same as the input text with the same format, even when the dinamic text field has a different format.

  6. #6
    :
    Join Date
    Dec 2002
    Posts
    3,518
    Did you embed the font for the dynamic text?

    What version of Flash and Flash Player are you using?

    Can you recreate the problem and post the fla here?
    Last edited by dawsonk; 12-17-2010 at 11:02 AM.

  7. #7
    Junior Member
    Join Date
    Sep 2010
    Posts
    8
    No, I didn't embed. Could you explain me how to do that.
    Im using FlashMX8 with Flash Player10

  8. #8
    :
    Join Date
    Dec 2002
    Posts
    3,518
    I don't have Flash 8, but try this...

    Select the dynamic text field and click the Embed button in the Property inspector. The Character Embedding dialog box opens, in which you can specify a range of characters (or individual characters) to embed.

    Also try using the text in the assignment, not just the instance names.
    Code:
    on (press){
    	b.text = a.text
    }

  9. #9
    Junior Member
    Join Date
    Sep 2010
    Posts
    8
    Nothing happens when I click the button if I add the .text and it stays the same if I embed the font

  10. #10
    :
    Join Date
    Dec 2002
    Posts
    3,518
    Are 'a' and 'b' the instance names of the textfields or are they variables?

  11. #11
    Junior Member
    Join Date
    Sep 2010
    Posts
    8
    variables

    that fixed it!! THANK YOU!!!

    the final code:
    on(press){
    b.text=a.text
    }
    Last edited by Gupu; 12-17-2010 at 03:51 PM.

  12. #12
    :
    Join Date
    Dec 2002
    Posts
    3,518

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