1. #1
    Sencha User
    Join Date
    Nov 2011
    Posts
    3
    Vote Rating
    0
    mikko@mikkohopia.net is on a distinguished road

      0  

    Question Playing a sound in the middle of the scene

    Playing a sound in the middle of the scene


    Is it possible to play a sound in the middle of the scene without any user activity? I played around with jQuery delay() without any success.

    In Flash you can just add a keyframe and some keyframe based actions to do this. Is this possible in Sencha Animator?

    If I add an invisible object, say transparent png image, so is there a load event where I could add js to play a sound?

    Cheers!

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

      0  

    Default


    Currently there is no way to tie JS to a keyframe in Animator.

    One advanced way of accomplishing it, would be to add an hidden animation, with two keyframes, and listen for the 'animationEnd' event fired by the object when the animation is done and use that to fire your event.

    A simpler approach would be to add a timeout to your Start Action of the scene. For example:

    Code:
    //get stage of first scene
    var stageElement = document.querySelector('.AN-sObj-stage')
    
    
    //create timeout at 1000ms (1 second)
    setTimeout(function(){
        //change the background color of the stage to red
        stageElement.style.backgroundColor = "red";
    },1000)
    Attached Files

  3. #3
    Sencha User
    Join Date
    Nov 2011
    Posts
    3
    Vote Rating
    0
    mikko@mikkohopia.net is on a distinguished road

      0  

    Default


    Ok, thank you very much for the help. I think I'll use setTimeout for this.

Thread Participants: 1

Tags for this Thread

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