Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jun 2002
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question 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
    //evolve@p-richards.demon.co.uk
    //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

    http://www.bottomlee.com
    Attached Files Attached Files
    Last edited by PhotoJoe; 07-05-2002 at 01:42 AM.

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #3
    New Coder
    Join Date
    Jun 2002
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.


  •  

    Posting Permissions

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