6 Replies Latest reply on Nov 7, 2006 5:36 PM by Newsgroup_User

    Professional 8 : Bug found!

    GerryIsHere Level 1
      This is part of a very simple function script:

      if ((myVar[07]>0) && (myVar[07]<101)) {
      _root.mc07Green();
      }

      It means that for some values of myVar[07] between 0 and 101, color of movie clip 07 turns to green (which color has already been defined with the ColorTransform process in frame 1 of the movie).

      Variable names returned by the server are numbers.
      That's the reason why they are between square brackets.

      Test this script in the ActionScript Panel.
      Answer is: "This script has no errors".

      Now change the name of the variable which is between the square brackets for 08 (zero eight) instead of 07 (zero seven) i.e.:

      if ((myVar[08]>0) && (myVar[08]<101)) {
      _root.mc07Green();
      }

      Then test the script in the ActionScript Panel.
      Answer is: "This script contains errors. Errors encountered are listed in the Output Panel".
      And in the Output Panel, it can be read this message:
      "**Error** Scene=Interfaces, layer=Scrap_layer, frame=2:Line 1: ']' expected
      if ((myVar[08]>0) && (myVar[08]<101)) {

      Total ActionScript Errors: 1 Reported Errors: 1"

      Does anybody has an explanation?

      This obviously is a bug.

      Will
      if ((myVar["08"]>0) && (myVar["08"]<101)) {
      _root.mc07Green();
      }
      be a working turnaround?