dcsimg
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: browser shake.......where was that effect??

  1. #1
    Senior Member
    Join Date
    Aug 2001
    Posts
    117
    You know the one that shakes the entire window...where is that thing??

    Thanks

  2. #2
    Senior Member nepdude's Avatar
    Join Date
    Feb 2001
    Location
    Canada
    Posts
    960
    For your button
    Code:
     getURL ("javascript:shake_xy(10)");
    publish your movie
    add this to your html:

    This goes into the <head> of your html

    Code:
    <SCRIPT LANGUAGE="JavaScript1.2">
    
        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>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center