hi<br>my first post to this forum<br><br>can anyone tell me if it's possible to rotate images using javascript (ie by 45 degrees not swapping images)<br><br>I know you can do this in VBScript but I want to find a way in javascript<br><br>tia<br><br>krone
Sets initial variables and letter starting positions<br><br>Sub Window_OnLoad()<br> call SG1.Scale(0.50, 0.50, 0.50)<br> call SG1.Rotate(0, 0, 0)<br><br> RotateAll<br>end sub<br><br>' sets rotation speed and behavior as well as creating loop<br>'The three numbers below control the rotation in the three axis<br>'the first # is the rotation around a horizontal axis<br>'the second # is around a vertical axis<br>'the third # is rotation clockwise<br>Sub RotateAll<br> Call SG1.Rotate(0,0,-10)<br> FILK = Window.SetTimeOut("Call RotateAll", 10, "VBSCript"<br>End Sub<br>--><br> <p> <br><a href=mailto: > </a><br><a href= > </a><br>Purveyor of quality HTML, CSS, Javascript, TCL, SQL, ASP, VB, and am developing a palate for Java.<br>
Dear Krone,<br><br>I have no idea from your post what 'SG1' is but this would be the javascript syntax equiv to your VBScript:<br><br><script language=javascript><br><!--<br>//Sets initial variables and letter starting positions<br><br>function window_onload(){<br><br>SG1.Scale(0.50, 0.50, 0.50);<br>SG1.Rotate(0, 0, 0);<br><br>RotateAll();<br>} // window_onload()<br><br>function RotateAll(){<br> SG1.Rotate(0,0,-10);<br> FILK = window.setTimeout("RotateAll", 10);<br>} // RotateAll()<br>--><br></script><br><br><body onload="window_onload()"><br>....<br><br></body><br><br>Hope this helps<br>-pete
SG1 is the id of the object to be rotated - sorry!<br><br>but the problem is, AFAIK there is no rotate option in javascript - if I'm wrong please let me know!!<br><br>also there is no scale option as far as i know...<br><br>thanks for your help <br><br>andy <br><br> <p> <br><a href=mailto: > </a><br><a href= > </a><br>Purveyor of quality HTML, CSS, Javascript, TCL, SQL, ASP, VB, and am developing a palate for Java.<br>
Dear krone,<br><br>I just looked in the VBScript language reference and there is no 'Rotate' Method or function there either. <br><br>Do you know what object type you are refering to as SG1? Or do you know what entity you are using that supports the 'Rotate' method?<br><br>-pete<br>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.