5 Replies Latest reply on Oct 2, 2009 8:19 AM by Ned Murphy

    if-code together with handling events

    Full of Questions Level 1

      Hi,

       

      Can I write more than one command in a script? I am having trouble making an if-code in Flash CS4.

       

      This code is working as I want:

      stop();

      instans1.onMouseDown = function (){

      play();

      }

       

      but when I add in the same script:

       

      if (instans2.onMouseDown) = function (){

      gotoAndStop("Text2", 1);

      }

       

      something get's wrong. Is it not possible to use if-syntax like this? If not, how do I write this when more than one options?

       

      Thanks!!