1. bbquincar's Avatar
    using: Cascades qml
    I'm trying to make an image (animated) spin similar to a coin on its axle.

    I'm using the RotateTransition but find that thier is no axle should i be adding TranslateTransition to make this work. see snipit of what I'm trying to do.

    Code:
    RotateTransition {
                toAngleZ: 0.00
                duration: 1000
                fromAngleZ: 0.0
            }
    Code:
    TranslateTransition {
                toX: 100.00
                duration: 1000
                fromX: 10.0
                toY: 0.0
                fromY: 0.0
            }
    thanks in advance
    09-12-12 12:06 AM
  2. big bb's Avatar
    Are you using one image or two for the coin?

    Here is an example from the Developer Site

    Code:
    Button {
        text: "Click me"
        animations: [
            RotateTransition {
                id: rotateAnimation
                toAngleZ: 180
                duration: 3000
            }
        ]
        onClicked: {
            rotateAnimation.play();
        }
    }
    09-20-12 08:33 AM
  3. bbquincar's Avatar
    One image but will rotate left to right on its axel. I'm making more the one app spin or rotate that way. Ill try that out tonight but I believe that is just circle motion on the z axel. A senior developer told me cascades doesn't have yet but it can be done in QT.
    09-20-12 06:19 PM
  4. big bb's Avatar
    I guess i was think something different then what you wanted.
    Is this how you want it to rotate?

    if so this code should work
    Code:
    import bb.cascades 1.0
     
    Page {
        content: Button {
            id: rotatingButton
            text: "My Rotating Button"
            animations: [
                RotateTransition {           
                    id: rotButton
                    toAngleZ: 360
                    duration: 350
                }
            ]
            onClicked: {
                rotButton.play();
            }
        }
    }
    09-21-12 08:48 AM
  5. bbquincar's Avatar
    thank for looking into this for me
    the image atthaced rotaes my image corret - i have figured that out thanks

    but I want it to spin or rotate as show in the attached

    http://i713.photobucket.com/albums/w...-textures1.gif

    <<<--------
    Last edited by bbquincar; 09-22-12 at 01:43 PM.
    09-22-12 01:32 PM
  6. big bb's Avatar
    it would be hard to have it spin in that direction unless you don't want it to look 3D, and you would need two images.

    are you having the user interact with the coin?

    there are two other ways to do it
    1- wait till they release the next beta SDK because there is animated GIF's (more for if you don't have the user interact with the coin, unless there will be a function to stop playing the gif)
    2- use openGL (since you are newer to developing this might take longer to do)
    09-24-12 08:28 AM
  7. bbquincar's Avatar
    Okay your right I'm going to have to wait till after bbjam maybe it will be out then..thanks for the help. Open to will be to much for me to handle.
    09-24-12 01:58 PM
LINK TO POST COPIED TO CLIPBOARD