4 Replies Latest reply on Nov 19, 2006 4:46 AM by dzeici

    Possible Bug involving TimeOut objects

    dzeici
      Hi everyone. I'm sorry if this is in the wrong place. I've been googling this for a long time and can't find an answer.
      I've made a movie which is supposed to move a picture across the stage using a timeout object. So first, I load the picture and create the timer:

      on startmovie
      imgMember = new (#bitmap)
      imgMember.importFileInto(the moviepath & "a.gif")
      sprite(1).member = imgMember
      timeOutObj = timeOut().new("name", 10, #callback)
      end

      And here is my callback function:

      on callback
      sprite(1).loch = sprite(1).loch + 1
      sprite(1).locv = sprite(1).locv + 1
      end

      Now, this works as expected, until the playback head hits a 'go to frame' or similar branching command. At this point, the sprite disappears, even though the callback function is still being called (and via lingo i can still access the properties of the sprite).
      I think this may be a bug in Director however my knowledge is limited. Can anyone help me? You can try this yourself, create a blank movie, put the above code in a movie script, put a 'go to the frame' behaviour on some frame (say frame 100), then start the movie making sure that 'a.gif' exists in your movie path.

      Thank you all very much for your time