0 Replies Latest reply on Aug 24, 2006 6:33 AM by peterotoole

    Browser Window Shake problem

    peterotoole Level 1
      I have this script to shake the browser window. i pasted this at the top of my html and then i tried at the bottom but it still fails to work. in flash i then added a get url for this action script on a certain frame 'javascript:shake_xy(5)'. i can't get it to work. using flash 8 and publishing to flash player 8.


      <SCRIPT LANGUAGE="JavaScript1.2">
      <!-- This script and many more are available free online at -->
      <!-- The JavaScript Source!! http://javascript.internet.com -->
      <!-- Modified by Flash kit http://www.flashkit.com -->
      function shake_xy(n) {
      if (self.moveBy) {
      for (i = 10; i > 0; i--) {
      for (j = n; j > 0; j--) {
      self.moveBy(0,i);
      self.moveBy(i,0);
      self.moveBy(0,-i);
      self.moveBy(-i,0);
      }
      }
      }
      }
      function shake_x(n) {
      if (self.moveBy) {
      for (i = 10; i > 0; i--) {
      for (j = n; j > 0; j--) {
      self.moveBy(i,0);
      self.moveBy(-i,0);
      }
      }
      }
      }
      function shake_y(n) {
      if (self.moveBy) {
      for (i = 10; i > 0; i--) {
      for (j = n; j > 0; j--) {
      self.moveBy(0,i);
      self.moveBy(0,-i);
      }
      }
      }
      }
      //-->
      </SCRIPT>