[RESOLVED] URLRequest could not be loaded
Hi,
I am creating a website for my flash class at school. However, I have run into a problem with some of the buttons. Some of them work and others do not.
Here is the code I am using:
Code:
btn.addEventListener(MouseEvent.CLICK,callurl);
function callurl(event:MouseEvent):void
{
var sh2:URLRequest = new URLRequest("../html/sh2.html");
navigateToURL(sh2, "_self");
}
Here is the code from a button that is not working:
Code:
btn.addEventListener(MouseEvent.CLICK,callurl);
function callurl(event:MouseEvent):void
{
var sh0:URLRequest = new URLRequest("../html/sh0.html");
navigateToURL(sh0, "_self");
}
Is there any difference in the two above codes? I can not figure out what the following error refers to and how to solve it.
Quote:
Scene=scene 1, layer=actions, frame=1 Line 3
The class or interface 'MouseEvent' could not be loaded.
Scene=scene 1, layer=actions, frame=1 Line 5
The class or interface 'URLRequest' could not be loaded.
Please help! Thanks,
Nightwalker
Re: URLRequest could not be loaded
Never mind, for some strange reason some of the files that were not working were saved as Action Script 2 instead of Action Script 3. I converted them all to Action Script 3 and now they all work perfectly.