1 Reply Latest reply on Jun 25, 2006 9:47 AM by Newsgroup_User

    Actionscript Help!!!

    Sterockicy
      i Have a problem with the game i am trying to make. I have a MC that contains a stick walking. outside of that there is some actionscript that i made that makes it makes it so that when you click on it it goes to and plays the whole dieing part of the stick there is 1 prob tho. it doesnt go to the frame i want it to on the click. here is the part of the script i am having probs with. BTW i want it to on release gotoandplay frame 4. Frame four is a seperate MC on the main timeline. Does the script need to change so that it plays frame 4s MC??

      on (release) {
      gotoAndPlay(4);
      speedx = 0
      }


      Thanks

      Sterockicy
        • 1. Re: Actionscript Help!!!
          Level 7
          For debugging this type of problem use trace(this); To determine the scope
          as gotoAndPlay(4) is really saying this.gotoAndPlay(4);

          Probably you want
          _root.gotoAndPlay(4);
          and maybe a trace("_root._currentframe:"+_root._currentframe);


          --
          Lon Hosford
          www.lonhosford.com
          Flash, Actionscript and Flash Media Server examples:
          http://flashexamples.hosfordusa.com
          May many happy bits flow your way!
          "Sterockicy" <webforumsuser@macromedia.com> wrote in message
          news:e7ldpg$qts$1@forums.macromedia.com...
          >i Have a problem with the game i am trying to make. I have a MC that
          >contains a
          > stick walking. outside of that there is some actionscript that i made that
          > makes it makes it so that when you click on it it goes to and plays the
          > whole
          > dieing part of the stick there is 1 prob tho. it doesnt go to the frame i
          > want
          > it to on the click. here is the part of the script i am having probs with.
          > BTW
          > i want it to on release gotoandplay frame 4. on the main timeline.
          >
          > on (release) {
          > gotoAndPlay(4);
          > speedx = 0
          > }
          >
          > why does this not go to frame 4 of the main timeline. what needs to be
          > changed.
          >
          > Thanks
          >
          > Sterockicy
          >