2 Replies Latest reply on Jun 15, 2007 4:21 PM by ZypheR2007

    Action Script Gets Skipped When Object Not Visible

    ZypheR2007 Level 1
      I've spent days trying to get help for this so I'll be seriously happy if someone has the answer.
      I have a simple drag and drop game,user drops objects into a bag and they vanish getting or losing points as they do so.

      THE PROBLEM!!!
      Is flash does a funny little thing where it does not update the variable 'score' (Doesnt action all of the script) because the object no longer exists! I tried doing it without making the objects vanish when dropped on the bag and the score updates normally.

      Does anyone have a way around this? I considered putting AS in a button which checks all the visible objects and establishes points that way however I'm not sure where to start on that.

      Heres the code that I have put on every object...

      on (press){

      on (release){
      if (_droptarget =="/bag") {
      setProperty(root.rangerssocks,_visible, 0);
      score = score+1