1. #1
    Sencha User
    Join Date
    Jan 2011
    Posts
    5
    Vote Rating
    0
    Blalien is on a distinguished road

      0  

    Default Play animation on button press

    Play animation on button press


    Hello

    I have a question regarding the animations.
    Is it possible to play an animation from a scene after a button press?
    I want to build a verification system so that it shows a message when incorrect.

    So the utility starts, it plays a few animations then it stops. You enter something like your name, the system checks it and plays the last animation when incorrect. When correct it will send you to the next scene.

    I know it has to be done in javascript but maybe someone can help me?

    Thanks.

  2. #2
    Sencha User arnebech's Avatar
    Join Date
    Jun 2010
    Posts
    498
    Vote Rating
    10
    arnebech will become famous soon enough

      0  

    Default


    This is not currently supported in animator.

    I don't have time to go in great detail, but here is a possible solution that might work. In animator give one animation object a custom css id (in the object->general properties panel) such as "verification-failed". Then in your exported code you'll find something that looks like this:
    Code:
    .run #verification-failed {
    -webkit-animation-name: AN-ani-2;
    -webkit-animation-duration: 1.6409090909090909s;
    -webkit-animation-delay: 0s;
    -webkit-animation-fill-mode: both;
    }
    you can change ".run" to ".verificationDidFail" then in your js code you can add the "verificationDidFail" class to a parent object of the animation (e.g. body, parent div etc..) which should trigger the animation when you had a failed verification.

    In Ext you could do something like this
    Code:
    function playVerificationDidFailAnimation() {
        var aParent = Ext.get('id-of-some-parent-div');
        aParent.addClass('verificationDidFail');
    }

  3. #3
    Sencha User
    Join Date
    Jan 2011
    Posts
    5
    Vote Rating
    0
    Blalien is on a distinguished road

      0  

    Default


    Sadly I can't get it to work.
    Used CSS with transitions instead.

    Is there a way to stop the animation and remove it from the cache or someting?

  4. #4
    Sencha User arnebech's Avatar
    Join Date
    Jun 2010
    Posts
    498
    Vote Rating
    10
    arnebech will become famous soon enough

      0  

    Default


    The animations are specified in css, so you can simply remove the css class that causes the animations to run, or add a another class with animation that overrides the default one.

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi