1 Reply Latest reply on Feb 28, 2007 10:26 AM by kglad

    Flash Player 6 Action Scripts update help.

    Melissa Sweeney
      I have some code that needs to be updated to work in Flash Player 8. I've received advice, but because I'm still learning Action Script I'm not able to make sense of it.
      Here's the code that needs to be updated:
      on (rollOver) {

      _root.caption("view project", 2);
      on (rollOut, dragOut) {


      on (release) {
      if(_root.xkoord>-538) {

      if(_root.xkoord==-758) {


      The advice given was: "It look like not all the script is shown (as you are calling method called
      'caption' and there is no caption method there)

      It looks like the xkoord variable is not initialized .. it needs to be for
      SWF7 or later.

      It is also dangerous code there with an == instead of a < in the on(release)"

      I'm reading documentation and still not having any luck. If someone could help me make a little more sense to this I would really appreciate it!
      Thank you!
        • 1. Re: Flash Player 6 Action Scripts update help.
          kglad Adobe Community Professional & MVP
          that was good advice.

          on the _root timeline there are functions: remove_caption() and caption() that need to have their code checked.

          _root.xkoord should initially defined somewhere (probably on the _root timeline). if it's not initialized, you should do so: _root.xkoord=0;

          and if _root.xkoord is only assigned integer values, you're probably ok with your test for equality to -758.