Forum Discussion

neoRiley's avatar
neoRiley
Visitor
9 years ago

jumpToRowItem animated?

I'm working with RowList and would like to animate to a row item.  There's animateToItem() which takes you to a new row with a quick animation, but is there an animateToRowItem()?

the other thought was to simulate a "right" remote button push, but that'd be a touch hackish...

Thanks for any help - John
  • No, there is no such pre-built function.
    Assuming jumpToRowItem does not do what you need, you could conceivably customize this functionality on your own by building up the screen using lower level components, although that's much more complicated than using the pre-built components, it gives more flexibility.
    You could also ask RokuCo to add this functionality in an upcoming release, maybe you'll get lucky.
  • Ok thanks for confirming.  I hadn't found any solutions since posting and so this must be the case.
  • I was able to solve this by using a MarkupGrid and setting the numRows=1


    <MarkupGrid
        id="carousel"
        itemComponentName="UIFeaturedItem"
        itemSize="[1280,570]"
        numRows="1"
        horizFocusAnimationStyle="FixedFocusWrap"
        drawFocusFeedback ="false"
    />



    Then I was able to use animateToItem(index) to have it smoothly scroll:

    function onTimerFired()
        index = m.carousel.itemFocused
        if( index = m.featureItemCount-1 )
            index = 0
        else
            index++
        end if
        
        m.carousel.animateToItem = index
    end function


    hth - John