I have a flash movie using ActionScript 3 with some buttons that open links to new pages. Here is the code to redirect to a new page:
myButton.addEventListener(MouseEvent.CLICK, function(e:MounseEvent) {
var request:URLRequest = new URLRequest('http://www.example.com/page2.html');
navigateToURL(request, "_top");
});
It works fine on my production server with the full URL, including the domain, but when I change it:
var request:URLRequest = new URLRequest('page2.html');
he no longer works in production. What am I missing here? I would not want to encode the entire URL into a movie.
source
share