Help needed-js problem

Discussion in 'JavaScript' started by progfrog, Jan 7, 2008.

  1. #1
    hi everybody!
    i have some problem, with a specific function that concern with the method filter:wave(),blur(),flip()
    This is the code:
     <html>
    <center>
    <img id="reflect" src="image.jpg">
    <br>
    <script language="JavaScript1.2"> 
    function f1()
    
    {setInterval("mdiv.filters.wave.phase+=10",100);
    
    }
    
    
    if (document.all){
    document.write('<img id=mdiv src="'+document.all.reflect.src+'" style="filter:wave(strength=3,freq=8,phase=100) blur(lightstrength=40) flipv()">')
    window.onload=f1;
    }
    
    </script>
    </center>
    
    </html>
    Code (markup):
    function setInterval- how does it help the function f1 to repeat itself- it seems that the value "10" is an increament for phase() but what does it do exactly? and does 100 is used as a stop condition?

    need your help guys quickly !!!

    thanx
    progfrog
     
    progfrog, Jan 7, 2008 IP
  2. locdev

    locdev Active Member

    Messages:
    171
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    58
    #2
     <html>
    <center>
    <img id="reflect" src="http://images.google.ru/intl/en_ALL/images/images_hp.gif">
    <br>
    <script language="JavaScript1.2"> 
    function f1()
    {
    var ourInterval = setInterval("mdiv.filters.wave.phase+=10", 10);
    }
    
    
    if (document.all){
    document.write('<img id=mdiv src="'+document.all.reflect.src+'" style="filter:wave(strength=3,freq=8,phase=100) blur(lightstrength=40) flipv()">')
    window.onload=f1;
    }
    
    </script>
    </center>
    
    </html>
    Code (markup):
    100 is time in milliseconds. the first arg -->"mdiv.filters.wave.phase+=10" will be executed every 1/10 sec (100ms)
     
    locdev, Jan 7, 2008 IP
  3. progfrog

    progfrog Peon

    Messages:
    73
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thanx locdev!
     
    progfrog, Jan 8, 2008 IP