On(release){ getURL NOT WORKING

I am trying to create a button in flash CS5 and i anm using Actionscript 2.0

I have made a shape, converted it to a button, go to actions and put this script in:

on(release){
getURL(“http://www.anysite.com”, “_blank”);
}

It does not work at all!

I’ve tried every variation i know and the button is not working what exactly am i doing wrong?

What does mouse events are permitted only for button instances mean?

Please can you assist?

Thanks

Jelly

reason could be, you placed the script at wrong location. this code should be on button not on timeline. to write code on timeline follow these steps

  1. give an instance name to your button like “myButton”
  2. click on timeline keyframe
  3. write this code
    myButton.onRelease = function() {
    getURL(“http://www.anysite.com”, “_blank”);
    }