Figured out the issue. Documentation is incorrect. It should be:
CECStatus.IsActiveSource() to get the current CEC Status, not "ifCECStatus.IsActiveSource()"
screen = CreateObject("roSGScreen")
port = CreateObject("roMessagePort")
cecstatus = CreateObject("roCECStatus")
scene = screen.CreateScene("MainScene")
screen.setMessagePort(port)
cecstatus.SetMessagePort(port)
screen.show()
while(true)
msg = wait(0, port)
msgType = type(msg)
if msgType = "roCECStatusEvent"
print "RECEIVED roCECStatusEvent event"
print "MSG STATUS: "; CECStatus.IsActiveSource()
end if
if msgType = "roSGScreenEvent"
if msg.isScreenClosed() then return
end if
end while