Dynamic reference to MC using variable???
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Dynamic reference to MC using variable???

  1. #1
    Junior Member
    Join Date
    Mar 2003
    Location
    Massachuesetts
    Posts
    3

    Dynamic reference to MC using variable???

    Using AS2. I have a variable defined:

    activenav = "services";

    I then want to reference the variable in a MC string. I've tried many variations of this:

    _root.my[activenav]Clip.gotoAndPlay("Out");

    Essentially, I want Flash to see this as:

    _root.myservicesClip.gotoAndPlay("Out");

    Getting syntax error. Need some help!!!

  2. #2
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    _root["my"+activenav+"Clip].gotoAndPlay("Out");

  3. #3
    Junior Member
    Join Date
    Mar 2003
    Location
    Massachuesetts
    Posts
    3
    Quote Originally Posted by a_modified_dog View Post
    _root["my"+activenav+"Clip].gotoAndPlay("Out");
    D'oh!! THANKS!!!!!!!!!

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

Poll by Flashkit.com