Advanced Search

Results 1 to 5 of 5

Thread: How do you replace animation with new animation after first has loaded?? anyone.

  1. #1
    Join Date
    Dec 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy How do you replace animation with new animation after first has loaded?? anyone.

    I am in the process of building a complicated web interface and I have a problem.

    If you want to check out the site to better understand it is:
    http://www.shane-paul.co.uk

    It is going to be an art site for a client. It is the clients design.
    I have searched on forums and search engines for months and have not found any help for my problem.

    What I need to do is to load a gif anim. and then when that has loaded I need to replace it with another animation file.
    Is this possible??

    The idea is that the menu will load and automatically spin to reveal arrows that control the window scroll bar.
    The client then needs the interactive buttons to pluse and so I need to replace the original anim file with the new one.

    I just don't know how to approach this.

    The site is bieng constructed with simple technology as it is intended for use with screen readers, voice software and blind touch balls, so I have opted against flash which would solve all my problems.

    The site is a little rough at the moment but eventually I will streamline the code and it will be much slicker.

    Just hope someone can help....

  2. #2
    Join Date
    Dec 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Fading scrollbar linked to window position

    As well as the pulsing animations I am trying to create a new scroll bar device.

    The menu system has a shadow to create a floating over the page illusion.
    What I am trying to do is create a shadow using png files of different opacities that will link to the scrollbar position.

    The window scrollbar will eventually be hidden and the shadow will be used instead.
    The idea is to have darker images linked to the top scrollbar position and as the user scrolls down the page information the shadow will get lighter and lighter.
    Probably use 5 images.

    I just have not been able to find any help in constructing it.

  3. #3
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,878
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Code:
    <img src="loading.gif" onload="this.src='menu.gif';"/>
    I don't know about the scrolling shadows. There is, however, an onscroll event handler. Be warned that it is DOM level 0.
    http://www.lipsum.com/
    Last edited by Twey; 12-17-2005 at 01:44 PM.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,708
    Thanks
    43
    Thanked 3,133 Times in 3,097 Posts
    Blog Entries
    12

    Default

    Rather than rely upon the onscroll event, one could poll:

    Code:
    <script type="text/javascript">
    
    function iecompattest(){
    return (document.compatMode && document.compatMode.indexOf("CSS")!=-1)? document.documentElement : document.body
    }
    
    function pollScroll() {
    topScrollP=window.pageYOffset? window.pageYOffset : iecompattest().scrollTop
    if (topScrollP>300)
    do something
    }
    
    setInterval("pollScroll();", 250)
    
    </script>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,878
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    You just couldn't resist naming a function "pollScroll()," could you.
    You'd also have to poll window.pageXOffset if your page has horizontal scrollbars. Don't rely on this to replace the scrollbars.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

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
  •