A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Please Help Me

Hybrid View

  1. #1
    Junior Member
    Join Date
    May 2003
    Location
    uk
    Posts
    7

    Please Help Me

    hi i know the basics of flahs and mainly use tutorials to lear but i wana shake the browser windo but i cant do it can some 1 please please help

    wqhat i want is something to drop from the top of the screena nd then as it lands shake the screen i have followed the tutorial but tis not very good and i cant see where i am going wrong some 1 help me

  2. #2
    Hi, I think this is what your looking for.
    add this code to your <head> tag.
    -----------------<head>-------------------------------
    <script>
    function drop(n) {
    if(self.moveBy){
    self.moveBy (0,-900);
    for(i = n; i > 0; i--){
    self.moveBy(0,3);
    }
    for(j = 8; j > 0; j--){
    self.moveBy(0,j);
    self.moveBy(j,0);
    self.moveBy(0,-j);
    self.moveBy(-j,0);
    }
    }

    }
    </script>
    <SCRIPT language="JavaScript">

    <!--

    var TrackRed= 0x00; //(RED) Replace the values after '0x' with the
    var TrackGreen= 0x00; //(GREEN) two-letter/number hexadecimal color codes
    var TrackBlue= 0x00; //(BLUE) in the BODY tag (after bgcolor=).

    function FadeTo(steps,red,green,blue)
    {
    for (var i = 0; i <= steps; i++)
    {
    var endpart = i/steps;
    var startpart = 1 - endpart;
    document.bgColor =
    Math.floor(TrackRed * startpart + red * endpart)*256*256 +
    Math.floor(TrackGreen * startpart + green * endpart)*256 +
    Math.floor(TrackBlue * startpart + blue * endpart);
    }
    TrackRed=red; TrackGreen=green; TrackBlue=blue;

    }

    //-->

    </SCRIPT>

    <STYLE TYPE="text/css">
    <!--
    A {text-decoration:none;}
    A:hover {color:silver;}
    //-->
    </STYLE>
    -------------------------------------------------------------
    then add this to your <body> tag.
    -------------------------------------------------------------
    <body bgcolor="black" text="silver" link="silver"
    vlink="silver" alink="silver" onload="drop(300); FadeTo(50,0xFF,0xFF,0xFF);">
    -------------------------------------------------------------
    hope it helps, Ed.

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