I want to rotate an image continuously on page load. Code works fine for 1 rotation on page load but to achieve the same effect continuously I have included the `.play()` statement in an infinite while loop as shown below. But it causes the page to hang and nothing shows up.

```
while (i == 1)
{
    if (rotEff.isPlaying != true)
    {
        rotEff.play();
    }
}

```

Any pointers on how to achieve this effect would be of great help