A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: _level0. "variable name" as an argument

  1. #1
    Member
    Join Date
    Feb 2004
    Posts
    32

    _level0. "variable name" as an argument

    How do you type out a variable name in an argument?

    Like...

    instead of:
    function("_level0.MCname", argument2); MCname is the name of a movie clip

    you want:
    function("_level0."+MC2Edit, argument2); where MC2Edit is a variable name

    I can't get it to work with the above syntax.

  2. #2
    Senior Member
    Join Date
    Oct 2003
    Posts
    388

    Re: _level0. "variable name" as an argument

    _root[MC2Edit]

  3. #3
    Member
    Join Date
    Feb 2004
    Posts
    32

    thanks

    Thanks a bunch. That didn't work, but you got me to try
    _root[_root.MC2Edit] Which worked! (can't expect you to know exactly how I have things set up if I don't specify)

    I didn't know about the bracket thing. I'm not sure if it's in the Flash MX guide/help manual, but I haven't read it all, so maybe it is.


    Thanks again.

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