Hello,
I am writing a flash application to go into a Ruby on Rails site. I'm only learning both languages, so I'm just messing around with things.
I was getting Ruby to create an xml file with images and a url in it. I've written a script (by following a few tutorials) to show the images. When someone clicks on an image, I want it to go to a url.
This is my code:
Code:
//when clicked on screen go to URL
listen = new Object();
Key.addListener(listen);
btn.onRelease = function() {
gotoUrl();
};
function gotoUrl() {
getURL(url[i]);
}
i is a counter so it knows which url the image is related to. A url is passed to getURL ok, but it doesn't go anywhere. Does it need a full path? The path I am sending to the file is relative, and if I type it into a browser then it takes me right to the page I want to go to.
I guess a simple solution would be to add the base part of the url to the (url[i]) bit automatically - how would I do this? I'm not sure of the exact syntax.
Thanks!
Nicky