1. #1
    Sencha Premium Member
    Join Date
    Apr 2012
    Posts
    25
    Vote Rating
    0
    Answers
    3
    echobloom is on a distinguished road

      0  

    Question Unanswered: Integrating Sencha Animator with Sencha Touch (Events)

    Unanswered: Integrating Sencha Animator with Sencha Touch (Events)


    I've got a (very) basic animation in Sencha Animator, and I wanted to efficiently implement it in Sencha Touch as a snazzy button. I was able to get the animation into my project by dropping it into a component as an iFrame:

    HTML Code:
    {	html: '<iframe src="resources/html/index.html"></iframe>',	width: 115,},
    This works! But I want to use this animation as a button, listening to events on it (really only a touch event) and triggering behavior from it. What's the most effective way of doing this?

    Thanks!
    Kyle

  2. #2
    Sencha Premium Member
    Join Date
    Apr 2012
    Posts
    25
    Vote Rating
    0
    Answers
    3
    echobloom is on a distinguished road

      0  

    Default


    Might have figured it out. In my iFrame, I added:

    window.addEventListener('click', function() { window.parent.handleButtonPress();})
    If you set up a global function at the higher level, you can access that. So you can probably drill into the Ext component framework in a more responsible way then having a global function. I'm going to play around with that.

  3. #3
    Sencha Premium Member
    Join Date
    Apr 2012
    Posts
    25
    Vote Rating
    0
    Answers
    3
    echobloom is on a distinguished road

      0  

    Default


    Eh, scratch that. Events work as expected in the browser, but (like so many things) the behavior is different on the device. Any other tips?

Tags for this Thread