vefblogging.blogg.se

Random spinner
Random spinner










random spinner

Why 2160? I wanted the arrow to rotate 6 times before stopping. When the script is executed, the variable eRot is assigned a random number between 2160 – 2520 and evaluated in a switch statement. There are two main principles used in this script – the animation and the random number. ], Explanation of Javascript (for those interested ) On press Execute the following javascript:

  • Create a textbox with the id ‘txt’ and hide it from view.
  • Add a variable called ‘prize’ with the value of 0.
  • Add the text to each section (I used numbers, but you could substitute for words as well.
  • I added a little Captivate shape circle in the center as well.
  • Align horizontally and vertically as well.
  • Import an image of an arrow pointing at 90 degrees (i.e.
  • Note that the arrow should align with the 90 degree section on the wheel. I aligned the image horizontally and vertically on the slide.

    random spinner

    Import an image of a wheel with 6 sections.This can all be modified, but the numbers would need to be altered. *Note that for the purposes of this tutorial, I will be using a 6 section wheel, with the arrow’s starting point at 90 degrees. Please feel free to download the example. I will attempt to explain a little bit of the javascript at the end.

    random spinner

    As a warning this tutorial uses a lot of javascript and some basic geometry. There are lots of ways to modify this method, and of course change the design to look much nicer.

    #Random spinner how to

    This blog tutorial covers how to create your own animated spinner. You could also have a scenario where you offer series of challenges or obstacles that are randomly selected. Each board square would offer different challenges, information or rewards. Or you may have designed your learning as a board game that requires learners to ‘randomly’ travel across a board. For example, your design might include a point system, and every correct response the learner gets a change to spin a wheel to earn a random amount of points. There are lots of fun ways to include randomness into your learning interactions.












    Random spinner