PhotoJoe

07-05-2002, 12:38 AM

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

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