facebook

3D button rotate works but once only: CLOSED

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #330113 Reply

    Hi 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.

    #330264 Reply

    Hi phillda,

    Hope this modified example is helpful for you.

    Attachments:
    You must be logged in to view attached files.
    #330282 Reply

    Hi 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 Integer

    For count = 1 To 9

    Worksheets(“Sheet7”).Shapes.Range(Array(“Rectangle 11”)).Select

    With Selection.ShapeRange
    .ThreeD.IncrementRotationX 10
    End With

    Worksheets(“Sheet7”).Range(“A1”).Select
    Next
    End Sub

    #330288 Reply

    Hi 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’);

    #330320 Reply

    Thanks for the fast reply Octavio. It works great, regards Dave.

    #330324 Reply

    Hi Dave,

    I’m glad that works for you 🙂

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: 3D button rotate works but once only: CLOSED

You must be logged in to post in the forum log in