<?xml version="1.0" encoding="utf-8" ?>
<component name="IPTagger" extends="Scene">
  <children>
    <Label id="title"
      text="IP Tagger"
      font = "font:LargeBoldSystemFont"
      width="1160"
      height="100"
      horizAlign="right"
      vertAlign="top" />
    <Label id="updates"
      text=""
      width="1160"
      height="450"
      horizAlign="left"
      vertAlign="top"
      wrap="true" />
    <Timer
      id = "textTimer"
      repeat = "true"
      duration = "4" />
  </children>
<script type="text/brightscript" >
<![CDATA[

  function init()
    m.title = m.top.findNode("title")
    m.title.font.size=92
    m.title.color="0x72D7EE20"
    m.title.translation = [60, 40]

    m.updates = m.top.findNode("updates")
    m.updates.font.size=36
    m.updates.color="0x62EE97FF"
    m.updates.translation = [60, 230]

    m.tagTask = CreateObject("roSGNode", "TagTask")
    m.tagTask.ObserveField("updateText", "onUpdateText")
    m.tagTask.control = "RUN"

    texttimer = m.top.findNode("textTimer")
    texttimer.observeField("fire", "timerUpdate")
    texttimer.control = "start"

    m.top.setFocus(true)
  end function

  function onUpdateText() as void
     m.updates.text = m.updates.text + chr(10) + m.tagTask.updateText
  end function

  sub timerUpdate()
    ' Not needed, but nice to have as an example.
    ' print "timerUpdate called."
  end sub

]]>
</script>
</component>
