2 Replies Latest reply on Feb 28, 2007 11:57 AM by tonyhigham

    _parent, _root issue???

    hutch-diggens Level 1
      I'm having a issue:

      I have a mc on the main timeline, inside that mc i
      have multiple mc's, in one of those mc's--we'll call
      it content2_mc--on the actions layer I have:

      label="s" + _root.link;
      gotoAndPlay(label);

      and on the buttons i have:

      on (release) {
      if (_root.link<>1) {
      _parent["item"+_root.link].gotoAndPlay("s1");
      _root.link = 1;
      _root.play();
      }
      }

      Now this doesn't work how it is, and I think it has
      some thing to do with the _root and _parent stuff.
      I copied the movie clip and placed it on the
      main timeline of a new fla. and it worked.

      any idea's.

      thanks,
      hutch
        • 1. Re: _parent, _root issue???
          hutch-diggens Level 1
          I don't know. I tried a bunch of different things, and i feel like I almost have it, and then it's a no go. Uggggg.

          You can download the source file from: http://www.hutchmediadesign.com/test_01.html

          If anyone has an open opportunity and take a look at it, i would forever be in debt to you.

          thank you so much,
          hutch
          • 2. Re: _parent, _root issue???
            tonyhigham Level 1
            Bear with me, cause I'm not sure exactly what effect you're going for...It looks to me like you need to replace your onRelease functions, for instance the onRelease for your photo button, with something more like this:

            on (release) {
            if (_root.link !== 1) { //please note that '<>' is deprecated, so unless you're publishing for an older player, ditch it for '!=='
            _parent.gotoAndPlay("s1");
            _root.link = 1;
            _root.play();
            }
            }

            That seems to work OK, but you've completely lost me with the "item" bit. I can't find anything anywhere named 'Item.' At any rate, you could create a single dynamic function on the _root timeline to handle all the Release events. This has the advantage of letting you edit the actions for all buttons in a single place, and just generally makes things much much cleaner. Please let me know if this is all way off target, or if you need more help. :)