A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Method reference

  1. #1
    Junior Member
    Join Date
    Apr 2007
    Location
    Singapore
    Posts
    7

    Method reference

    Hi,

    I have multiple Comboxes that I need to set the fonts etc due to Masks. Currently I repeat the following for each of them:

    soutfit_cb.textField.setStyle("embedFonts", true);
    soutfit_cb.textField.setStyle("textFormat", tf_tlabel);

    Is it possible to do something like this:

    Loop through the six combo box names (soutfit, sback, sduration, spax, stype) and reuse the code? i.e.

    SOME_VARIABLE.textField.setStyle("embedFonts", true);

    Thanks,
    Johann

  2. #2
    Junior Member
    Join Date
    Apr 2007
    Location
    Singapore
    Posts
    7
    Solved the problem:

    Just use:

    var comboName:String = "pduration";

    this[comboName].textField.setStyle("embedFonts", true);

    Thanks.

Tags for this Thread

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