- This topic has 5 replies, 2 voices, and was last updated 12 years, 1 month ago by support-octavio.
-
AuthorPosts
-
DavidPhillipsMemberHi Octavio, thanks again for your help with the suggestion on how to rotate an image-the only problem is that it only occurs the first time the button is pressed. Is there a way to reset so that rotation occurs whenever it is called upon?, regards Dave.
support-octavioMemberHi phillda,
Hope this modified example is helpful for you.
Attachments:
You must be logged in to view attached files.
DavidPhillipsMemberHi Octavio, Your modification doesn’t seem to respond when clicked-could you please take another look at it. The original code worked OK but only on the first click. I recall reading somewhere that CSS will only apply a style once when the object is selected by ID, and that you need to select by class but not sure how that is done. I do remember having a similar problem with excel VBA and had to select some other object (in my example cell A1) and then reselect the button I wanted to rotate each time. The button had to be referred to as an array-see below-different language I know but maybe some parallels, regards Dave.
Sub Rotate()
Dim count As IntegerFor count = 1 To 9
Worksheets(“Sheet7”).Shapes.Range(Array(“Rectangle 11”)).Select
With Selection.ShapeRange
.ThreeD.IncrementRotationX 10
End WithWorksheets(“Sheet7”).Range(“A1”).Select
Next
End Sub
support-octavioMemberHi phillda,
I suspect that you saved the file in same directory that other example, so you had to rename this file as rotate(1).mobi as example. When mobione generate code the elements will be something like m1-rotation(1)-image1 and the next line won’t work. Please try changing the selector name in this line or the design name.
var $imagebutton = $(‘#m1-rotation-image1’);
DavidPhillipsMemberThanks for the fast reply Octavio. It works great, regards Dave.
support-octavioMemberHi Dave,
I’m glad that works for you 🙂
-
AuthorPosts