Ask a Question related to Macromedia Flash Actionscript, Design and Development.

  1. #1

    Default how dynamic?

    Hi,

    Many text field names are recorded in an array. And I want to write a function
    to create text fields named as in array.

    However, even after creating a text field I could not acces and change it's
    alpha value.

    fieldname = "aboutus";
    _root.createTextField(fieldname,1,1,1,100,20);
    _root.fieldname.text = "About Us";
    _root.fieldname._alpha = 50;

    I do not want to write "_root.oboutus._alpha = 50;" for each element in the
    array.

    Where's the way out?

    readyToGo Guest

  2. Similar Questions and Discussions

    1. dynamic drop downlists in an editable dynamic datagrid.
      How would we address a situation where we have to put dynamic drop downlists in an editable dynamic datagrid. So the scenario is to populate a...
    2. ANN: Learn to go dynamic with WebAssist Dynamic Site 101
      If you're a Dreamweaver Web designer looking to expand your skill set - and your earning potential - make the leap to dynamic Web sites with WA...
    3. dynamic menu system going to dynamic page
      please can someone help me - im at the end of my tether! ive got an access db. Its got a list of words that is to be a menu system stored in it....
    4. DYNAMIC Dropdown. How to stick on non dynamic choice?
      Environment: DreamweaverMX 2004, ASP, VBScript, mySQL I have a dropdown which is populated dynamically from a mySQL database plus a hand entered...
    5. Dynamic text box within dynamic movie clip
      I'm having a similar problem. On mine I noticed that although the text doesn't show and the border doesn't show, the cursor changes appropriately...
  3. #2

    Default Re: how dynamic?

    readyToGo wrote:
    > Hi,
    >
    > Many text field names are recorded in an array. And I want to write a function
    > to create text fields named as in array.
    >
    > However, even after creating a text field I could not acces and change it's
    > alpha value.
    >
    > fieldname = "aboutus";
    > _root.createTextField(fieldname,1,1,1,100,20);
    > _root.fieldname.text = "About Us";
    > _root.fieldname._alpha = 50;
    >
    > I do not want to write "_root.oboutus._alpha = 50;" for each element in the
    > array.
    that's because in the above code you're attempting to change the alpha
    property of the variable called fieldname. Variables do not have an
    alpha property (or if they do, it's always 0 and you can't modify it! ho-ho)

    What you mean to do is this:
    _root[fieldname]._alpha = 50;

    --
    MOLOKO
    ------------------------------------------------
    ::remove _underwear_ to reply::
    'God saves but Buddha makes incremental backups'
    ------------------------------------------------
    GCM/CS/IT/MC d-- S++:- a- C++ U--- P+ L++ !E W+++$ N++ O? K+ w+++$ !O M+
    VMS? PS+++ PE- Y PGP+ t+ 5-- X-- R* tv++ b++++ DI++++ D+ G e h-- r+ y++
    see [url]www.geekcode.com[/url] to translate the above!
    MOLOKO Guest

  4. #3

    Default Re: how dynamic?

    moloko, he's setting the _alpha of a textfield instance name, not a variable. and his code is ok. he just needs to embed that font.
    kglad Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139