SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Addict
    Join Date
    Sep 2006
    Posts
    334
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Using JavaScript With Flash

    Hi all,

    I have the following JavaScript

    Code:
    <script language="JavaScript">
    <!--
    //The function is quite simple, it takes one argument, "newBgColor" 
    //and passes it as the value of the "bgColor" property of the "document" object
    function changeBgColor(newBgColor) {
     if (window.document && window.document.bgColor) {
      document.bgColor = newBgColor;
     }
    }
    -->
    </script>
    I then have this in Flash, which controls the bg colour...

    Code:
    on (press) {
            getURL ("JavaScript:changeBgColor('#336600')");
    }
    I want to instead fade an image into the background not change the colour... Anyone seen a script like this?

  2. #2
    SitePoint Guru
    Join Date
    Apr 2007
    Posts
    813
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you might need an animation class. Mootools or scriptaculous are those library of choices. You can easily fade an image by animating over the alpha tranparency of the image element.


Bookmarks

Posting Permissions

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