3 Replies Latest reply on Jun 8, 2006 2:40 AM by Circusmich

    Projector script error

    Circusmich
      I need help on the following script:

      global addedMovie
      global movieList
      global movielistold
      global movieselect
      global movieno
      global previousMovie
      property slideTime
      property moveUnit
      property finalPos
      property timeChange
      property timeTemp
      property timeStart
      global activemovie

      on exitFrame me
      addedMovie=value(movieList.getLast())
      sprite(addedMovie).locH=725+movieno*100
      sprite(addedMovie).locV=225
      movieno=movieno+1
      previousMovie=addedMovie

      timeStart=the milliseconds
      SlideTime=1000
      moveUnit=0
      tempPosOne=sprite(addedMovie).locH
      repeat while moveUnit<100
      timeTemp=the milliseconds
      timeChange=timeTemp-timeStart
      moveUnit= integer (100*timeChange / SlideTime)
      finalPos=-.06*moveunit*moveunit+12*moveUnit
      sprite(addedmovie).locH=TempPosOne-finalPos
      if sprite(addedMovie).locH<800 then
      updateStage
      end if
      end repeat
      activemovie=movieno

      end

      This is a script that takes one of 16 sprites that are positionel off stage and moves them onto the stage. In order to select the corect sprite number I'm using a liniear list called: 'movielist'.

      The weird thing is that when I test drive this script inside director it is working great. But when I export this script to a mac projector file, it suddenly doesn't work anymore! and the computer gives a message: 'script error'

      Can anyone help me on this one? I hope I supplied you with sufficient info to help me solve this problem!

      Michel
        • 1. Re: Projector script error
          Circusmich Level 1
          I have found the bug! It took me a few hours but I'm getting there!
          • 2. Projector script error
            robertwho
            what do you find?

            You are luckily to debug a small script. I'm unlucky to handle a big one inherited from others, always encounter script errors for some of the PCs, seems machine dependent, the same OS/shockwave, some got errors, some no....and trace from the scripts, the point of the error occurs make no sense, ie, the error should not be there at all.

            Luckily, the errors could be resolved in such a manner: refresh from the IE windows, sometimes 1 refresh will do, sometimes it takes 3 refreshes, and the latest shockwave takes as many as 6 refreshes.
            :-)

            • 3. Re: Projector script error
              Circusmich Level 1
              the problem was concealed in the variable movieno. It was actually another script that set this variable incorrectly and this mistake manifested itself inside this script. As to how come it is possible that this problem did not come up within Director, but did in the projector: I have no clue. Maybe the variable was stuck in memory somewhere :-)