Web Analytics Made Easy -
StatCounter Help make JS work in both IE & NS - CodingForum

Announcement

Collapse
No announcement yet.

Help make JS work in both IE & NS

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help make JS work in both IE & NS

    I have this javascript that works great in IE 5.5 & 6.0 but does not work in NS Navagitor 4.08

    I have attached the code for the complete page and I have pasted just the JS code below. If you want to see how the page works in IE go here http://www.bottomlee.com

    <SCRIPT>
    <!--
    //Mucking about with procedural textures
    //Phil Richards Jan 2000
    //[email protected]
    //Stationery & Additions By Wizzard Jon
    //October 2000
    m = DAControl.MeterLibrary
    starpts=new Array()
    n=6
    r1=1
    r2=0.8
    pa=2*Math.PI/n;
    ss1=Math.PI/2;
    ss2=ss1+pa/2;
    for (i=0;i<=n;i++){
    s1=ss1+i*pa;
    s2=ss2+i*pa;
    starpts[2*i]=m.Point2PolarAnim(m.DANumber(s1),m.DANumber(r1))
    starpts[2*i+1]=m.Point2PolarAnim(m.DANumber(s2),m.Mul(m.DANumber(r2),m.Sin(m.Mul(m.DANumber(5),m.LocalTime))))
    }
    path=m.Polyline(starpts)


    path = path.Transform(m.Rotate2Anim(m.Div(m.LocalTime,m.DANumber(2.094))))

    //Import the background image.
    head = m.ImportImage(pic.src)

    maxx = head.BoundingBox.Max.X
    maxy = head.BoundingBox.Max.Y

    //Scale the background image.
    xf = m.Scale2Anim(m.Div(m.DANumber(1),maxx),m.Div(m.DANumber(1),maxy))
    head = head.Transform(xf)

    ls = m.DefaultLineStyle.Width(0.05).Color(m.black)

    lineImg = path.Fill(ls,head)
    lineImg = lineImg.Transform(xf.Inverse())

    //Change the opacity of the final image by abs(sin(time*0.333)).
    // model = lineImg.OpacityAnim(m.Abs(m.Sin(m.Mul(m.LocalTime,m.DANumber(0.333)))))
    model = lineImg
    //Display the image.
    DAControl.Image = model


    //Start the animation
    DAControl.Start()
    -->
    </SCRIPT>


    I'm sure I will need to using some <Layer> tags but I don't know where I will need to put them.


    __________________
    Photo Joe

    Attached Files
    Last edited by PhotoJoe; Jul 4, 2002, 07:42 PM.
    Photo Joe

    http://www.bottomlee.com

  • #2
    Your script uses the Direct Animation control (an ActiveX control) which is only supported by IE. There's no way you'll ever get that script to work with Netscape 4.
    Check out the Forum Search. It's the short path to getting great results from this forum.

    Comment


    • #3
      Thank you Roy,

      I guess I'm quit beating my head over this one and try something else.

      I have converted a couple of VBscripts to JavaScripts, but it's shame that I won't be able to do all of them.
      Photo Joe

      http://www.bottomlee.com

      Comment

      Working...
      X