Using the onFilterChange Event Handler : Animation : GUI Components : JavaScript DHTML examples (example source code) Organized by topic

JavaScript DHTML
C++
PHP
JavaScript DHTML Home »  GUI Components   » [  Animation  ]   
 



Using the onFilterChange Event Handler

Please note that some example is only working under IE or Firefox.



/*
JavaScript Bible, Fourth Edition
by Danny Goodman 

John Wiley & Sons CopyRight 2001
*/

<HTML>
<HEAD>
<TITLE>onFilterChange Event Handler</TITLE>
<SCRIPT LANGUAGE=JavaScript>
function init() {
    image1.filters[0].apply()
    image2.filters[0].apply()
    start()
}
function start() {
    image1.style.visibility = "hidden"
    image1.filters[0].play()
}
function finish() {
    // verify that first transition is done (optional)
    if (image1.filters[0].status == 0) {
        image2.style.visibility = "visible"
        image2.filters[0].play()
    }
}
</SCRIPT>
</HEAD>
<BODY onLoad="init()">
<H1>onFilterChange Event Handler</H1>
<HR>
<P>The completion of the first transition ("circle-in"
triggers the second ("circle-out").
<BUTTON onClick="location.reload()">Play It Again</BUTTON></P>
<DIV ID="image1" STYLE="visibility:visible; 
    position:absolute; top:150px; left:150px;
    filter:progID:DXImageTransform.Microsoft.Iris(irisstyle='CIRCLE', 
    motion='in')"
    onFilterChange="finish()"><IMG SRC="http://www.java2s.com/style/logo.png" HEIGHT=90
    WIDTH=120></DIV>
<DIV ID="image2" STYLE="visibility:hidden; 
    position:absolute; top:150px; left:150px;
    filter:progID:DXImageTransform.Microsoft.Iris(irisstyle='CIRCLE',
    motion='out')">
    <IMG SRC="http://www.java2s.com/style/logoRed.png" HEIGHT=90 WIDTH=120></DIV>
</BODY>
</HTML>

           
       
Related examples in the same category
1.  Circle Animation
2.  Right to left animation
3.  Flash animation in Javascript
4.  Flash animation in JavaScript: Changing style Properties
5.  Animation along Straight Line
6.  Animation along a Circle
7.  Dancing Text (IE)
8.  Type Writer effect (IE)
9.  Type Writer Effect 1.1 (IE)
10.  JavaScript Ticker 1.2 (IE)
11.  Animation: Lottery Number Picker and Statistics
12.  Animation: wriggly
13.  Animation: welcome message
14.  Animation: trio
15.  Auto lotto dip
16.  Animation: snow
17.  Animation: star
18.  Animation: mouse doodle
19.  Animation: fireworks
20.  Animation: pretty
21.  Animation: Random Movement
22.  Lotto number draw
23.  Following eyesHas Download File
24.  Animation: three eyesHas Download File
25.  Animation: eyesHas Download File
26.  Spot lightHas Download File
27.  Big static eyesHas Download File
28.  Animation based on DIV with color flash
29.  Framework for creating CSS-based animations
30.  Animate dynamic element h1 tag
31.  Popup window animation (fly across screen)
32.  Animation on several images
33.  JavaScript Animation
34.  Periodically Updating the Text Displayed by an HTML Element
35.  Moving an Airplane Across a Web Page
36.  Link Hint Scroller 2.0 (IE)
























Home| Contact Us
Copyright 2003 - 04 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.