Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ryanthompson
Level 8

Trying to create roUrlTransfer object with ComponentLibrary

I need some help because I'm stuck.  I've been writing using ComponentLibrary. See:

https://developer.roku.com/docs/references/scenegraph/control-nodes/componentlibrary.md

I cannot create an roUrlTransfer object.  As a proof of concept, I edited the ComponentLibrary.zip sample code here:

https://github.com/rokudev/samples/tree/master/utilities

I added these two lines

    transfer = CreateObject("roUrlTransfer")
    print "transfer "; transfer

The output was:

transfer invalid

Does this mean that you cannot create this of type roUrlTransfer in component libraries?

0 Kudos
2 REPLIES 2\
renojim
Community Streaming Expert

Re: Trying to create roUrlTransfer object with ComponentLibrary

You can only create roUrlTransfer in the main loop or a task node.

Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
ryanthompson
Level 8

Re: Trying to create roUrlTransfer object with ComponentLibrary

Thanks for the quick response.

In my component library I was trying to send a tracking pixel.  Essentially send some data via a url.

Since roUrlTransfer is not available, is there a recommended way to send a tracking event or ping a dynamic URL?