Here is my code.
<component name="TitleGridItem" extends="Group">
<interface>
<field id="itemContent" type="node" onChange="showcontent" />
<field id="focusPercent" type="float" onChange="showfocus" />
<field id="gridHasFocus" type="boolean" onChange="showfocus"
alwaysNotify="true" />
</interface>
<script type="text/brightscript">
<![CDATA[
function init()
m.top.id = "markupgriditem"
m.itemposter = m.top.findNode("itemPoster")
'm.itemmask = m.top.findNode("itemMask")
m.itemTitle = m.top.findNode("itemTitle")
end function
function showcontent()
itemcontent = m.top.itemContent
'? itemcontent
m.itemposter.uri = itemcontent.HDPOSTERURL
end function
function showfocus()
if m.top.gridHasFocus
if (m.top.focusPercent > .8-) then
m.itemTitle.text = m.top.itemContent.title
else
m.itemTitle.text = ""
end if
scale = 1 + (m.top.focusPercent * 0.1)
m.itemposter.scale = [scale, scale]
'm.itemmask.opacity = 0.75 - (m.top.focusPercent * 0.75)
end if
end function
]]>
</script>
<children>
<LayoutGroup>
<Poster id="itemPoster" width="180" translation="[10,10]"
height="288" scaleRotateCenter="[ 90.0, 144.0 ]" loadDisplayMode="scaleToFit">
</Poster>
<Label id="itemTitle" width="190" height="30" horizAlign="center" />
</LayoutGroup>
</children>
</component>