In the link you provided http://dev.keypointlearn.com/xcl73_SL2/Sliders/V1/story.html, the 5th example is exactly what I'm looking for (rotating a "Packeteer" network device). I see that each image is probably a "state", but hoping someone has the source file I could look at to see exactly how this was done?
In the link you provided http://dev.keypointlearn.com/xcl73_SL2/Sliders/V1/story.html, the 5th example is exactly what I'm looking for (rotating a "Packeteer" network device). I see that each image is probably a "state", but hoping someone has the source file I could look at to see exactly how this was done?
Correct, the device is an image object with many custom states that each show the device at a slightly different angle. As the slider is moved, a variable changes. Based on that changing variable, the corresponding state of the image object is shown, creating the illusion of rotation
thanks! Due to customer requirement, I had to change the slider to a more complex "left arrow/right arrow" buttons, but used only 45 degree rotate increments, so there's only 8 values between 0 and 360 degrees. This led me to discover what I feel is a minor flaw in SL2's Boolean logic (maybe not). long story(line) short, here was my solution, if anyone needs to use arrows instead of a slider:
Declare %Rotate% = 0
Trigger "Right Arrow": Add 45 to %Rotate% when user clicks; IF %Rotate% < 406
Trigger: Set %Rotate% = 45 when %Rotate% == 405
Trigger "Left Arrow: Subtract 45 from %Rotate% when user clicks; IF %Rotate% > -44
Trigger: Set %Rotate% = 315 when %Rotate% == -45
Thus, you can click left arrow or right arrow and %Rotate% will always show the correct value (which can then translate into the correct state for the image).
Whew! If anyone can simplify my logic to accomplish this, that would be cool. But this works!
Mr. Hinze, THANK YOU for the example!! As for displaying states based on a variable, did you use a separate trigger for each state? Or, is there a way to ensure that the variable's value is the same as the state name, and then simply have one single trigger that says:
Change state of "object" to == %variable% (wouldn't that be cool?)
thanks! Due to customer requirement, I had to change the slider to a more complex "left arrow/right arrow" buttons, but used only 45 degree rotate increments, so there's only 8 values between 0 and 360 degrees. This led me to discover what I feel is a minor flaw in SL2's Boolean logic (maybe not). long story(line) short, here was my solution, if anyone needs to use arrows instead of a slider:
Declare %Rotate% = 0
Trigger "Right Arrow": Add 45 to %Rotate% when user clicks; IF %Rotate% < 406
Trigger: Set %Rotate% = 45 when %Rotate% == 405
Trigger "Left Arrow: Subtract 45 from %Rotate% when user clicks; IF %Rotate% > -44
Trigger: Set %Rotate% = 315 when %Rotate% == -45
Thus, you can click left arrow or right arrow and %Rotate% will always show the correct value (which can then translate into the correct state for the image).
Whew! If anyone can simplify my logic to accomplish this, that would be cool. But this works!
Mr. Hinze, THANK YOU for the example!! As for displaying states based on a variable, did you use a separate trigger for each state? Or, is there a way to ensure that the variable's value is the same as the state name, and then simply have one single trigger that says:
Change state of "object" to == %variable% (wouldn't that be cool?)
Yes, it would be cool to refer to state names based on a variable value, but that's not possible. You need a trigger for each state.
8 Replies
One option is to use a slider to rotate an object. See here: http://dev.keypointlearn.com/xcl73_SL2/Sliders/V1/story.html the 4th and 5th example. I tested these sliders in the Player App and they worked reasonably well.
Hi Michael,
Nice one!
I will have to roll my beginners leaves up and get working!!
I’m loving using Articulate, this is my first time… see what I have done so far: http://www.uuueee.co.uk/saftest/story.html
Thanks again!
David
@David, thanks for sharing the link. Well, if this is only your first project then I'd love to see more! :-)
Hello Michael Hinze, and all,
In the link you provided http://dev.keypointlearn.com/xcl73_SL2/Sliders/V1/story.html, the 5th example is exactly what I'm looking for (rotating a "Packeteer" network device). I see that each image is probably a "state", but hoping someone has the source file I could look at to see exactly how this was done?
Correct, the device is an image object with many custom states that each show the device at a slightly different angle. As the slider is moved, a variable changes. Based on that changing variable, the corresponding state of the image object is shown, creating the illusion of rotation
thanks! Due to customer requirement, I had to change the slider to a more complex "left arrow/right arrow" buttons, but used only 45 degree rotate increments, so there's only 8 values between 0 and 360 degrees. This led me to discover what I feel is a minor flaw in SL2's Boolean logic (maybe not). long story(line) short, here was my solution, if anyone needs to use arrows instead of a slider:
Thus, you can click left arrow or right arrow and %Rotate% will always show the correct value (which can then translate into the correct state for the image).
Whew! If anyone can simplify my logic to accomplish this, that would be cool. But this works!
Mr. Hinze, THANK YOU for the example!! As for displaying states based on a variable, did you use a separate trigger for each state? Or, is there a way to ensure that the variable's value is the same as the state name, and then simply have one single trigger that says:
Change state of "object" to == %variable% (wouldn't that be cool?)
Yes, it would be cool to refer to state names based on a variable value, but that's not possible. You need a trigger for each state.
Not possible now Steven - but always something you could share your thoughts on in a feature request!
This discussion is closed. You can start a new discussion or contact Articulate Support.