Rotating an Image in App Lab

I have a student who wants to rotate an image. At what point in the Units in CSP would that be covered?
Thanks.
Sandy

I don’t think this topic is covered in CSP. The easiest way maybe to rotate the image outside of AppLab using an image editing software and then import it in AppLab.

Let me be a little more thorough - he wants the image to rotate on the screen while the app is being used. Could that happen with some kind of a loop?

There has been some suggestions in this thread. I have not tried them.

This isn’t covered in CSP but if the student is really interested in making something like that happen, he could look into animations in Unit 3 of CS Discoveries, the course written for middle schoolers. Game Lab is similar to app lab but may have something that this student would like to use to code their project.

I’d encourage you to review it & have him check it out!
–Michael K.

Maybe this will work:

var degree = 0;
var interval = setInterval(function(){
    setStyle('(image id)', 'rotate('+degree+'deg)');
    degree++;
    if(degree == 360)clearInterval(interval); //Remove this line if you want it to spin forever
},50);

Let me know if you have more questions!