Click to See Complete Forum and Search --> : Flash actionscripts to URL


catfish
01-26-2011, 10:10 AM
building a site with wine bottle flash and trying to add an actionscript so when you click on each bottle it will take you to the info page specifically for that wine. New to flash / actionscript. Just followed a youtube video tutorial but it is not working. The link is here;
http://www.catfishwebcreations.com/flash_URL.swf

My actionscript code is here;
firstbottle.addEventListener(MouseEvent.CLICK,clickabadengo);
secondbottle.addEventListener(MouseEvent.CLICK, clickaldana);
thirdbottle.addEventListener(MouseEvent.CLICK, clickcortes);

function clickabadengo(event:MouseEvent):void {
var myURL:URLRequest = new URLRequest("http://www.google.com");
navigateToURL(myURL);

}

function clickabadengo(event:MouseEvent):void {
var myURL:URLRequest = new URLRequest("http://www.yahoo.com");
navigateToURL(myURL);

}

function clickabadengo(event:MouseEvent):void {
var myURL:URLRequest = new URLRequest("http://www.youtube.com");
navigateToURL(myURL);

}

And the error message says this:
**Error** Scene=Scene 1, layer=actions, frame=1:Line 5: The class or interface 'MouseEvent' could not be loaded.
function clickabadengo(event:MouseEvent):void {

**Error** Scene=Scene 1, layer=actions, frame=1:Line 6: The class or interface 'URLRequest' could not be loaded.
var myURL:URLRequest = new URLRequest("http://www.google.com");

**Error** Scene=Scene 1, layer=actions, frame=1:Line 11: The class or interface 'MouseEvent' could not be loaded.
function clickabadengo(event:MouseEvent):void {

**Error** Scene=Scene 1, layer=actions, frame=1:Line 12: The class or interface 'URLRequest' could not be loaded.
var myURL:URLRequest = new URLRequest("http://www.yahoo.com");

**Error** Scene=Scene 1, layer=actions, frame=1:Line 17: The class or interface 'MouseEvent' could not be loaded.
function clickabadengo(event:MouseEvent):void {

**Error** Scene=Scene 1, layer=actions, frame=1:Line 18: The class or interface 'URLRequest' could not be loaded.
var myURL:URLRequest = new URLRequest("http://www.youtube.com");

Total ActionScript Errors: 6 Reported Errors: 6

I don't understand where it is wrong. In the 'real' one I have about 15 bottles that I will link to my pages on the website. Thanks