openURL

How can I use a string variable to open a link with openURL()?
I mean something like this:

link = ‘http://twolivesleft.com/Codea

openURL(link)

I want to have an array with links so that when the user touches a certain area of the application they are sent to one of the links in the array. This is what I have, not sure if it works (I can’t test it right now).

http://pastebin.com/xXa4gvgP

I found how to open an URL if a certain are is touched, but I want to use an array to have better control on the urls and that I don’t have to use a lot of if’s:

http://pastebin.com/kb3VFUGS

And I don’t know if the validTouch really returns the bool value I want it to.

Thanks! :slight_smile:

Here you go:


function setup()
    link = "http://apple.com"
    parameter.action("open url", function() openURL(link) end)
end

Good luck!

Thank you!

Anytime.