Flash CS3 help

emak

New Member
I've made a simple information site and i have links that open up the vendors page in a new tab, but when the link is clicked it opens two tabs in firefox. The actionscript is very simple:

on (press, release) {
getURL("http://www.marshfurniture.com/collections_MC.htm", "_blank");
}

I'm using Flash CS3 Professional. It's actionscript 2.0 (i know 3.0 is out there)

Any help appreciated. Thanks.
 

bcee

New Member
Sorry, handling not calling.

on (press) {
getURL("http://www.marshfurniture.com/collections_MC.htm", "_blank");
}

That's AS1, you should really try 3.
 

emak

New Member
You are calling two events, press and release, only use one.

THANK YOU!...made the adjustments and works. thanks for your help again...yeah i know i gotta switch up to actionscript 3, most likely will on the next project.
 

LouTheDesigner

New Member
And you should also be using MC's instead of buttons. Movie Clips posses all the properties of buttons and more. So when you convert to as3, your code should be as follows:

myButton.buttonMode = true;

myButton.addEventListener(MouseEvent.CLICK, go_to_site);

function go_to_site(event:MouseEvent)
{
var request:URLRequest = new URLRequest("http://www.marshfurniture.com/collections_MC.htm");

navigateToURL(request, "_blank");
}
 
Top