Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ryanthompson
Channel Surfer

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
3 REPLIES 3
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
Channel Surfer

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?

 

nickchavez
Binge Watcher

Re: Trying to create roUrlTransfer object with ComponentLibrary

I wonder if it would work to spawn a Task node from the Component Library's main Component?

0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.