Set homepage through flash

Hi,
This is my very first post to this forum, i have a flash menu in which there is a button called “set HomePage”, when clicked should just execute a js function that’s defined in the html file. But it doesn’t work.

The actionscript i call on the button is :


on (press) {
getUrl('javascript:setHome();');
}

and on the HTML file i have


function setHome()
{
   window.alert("Clicked") 
   document.body.style.behavior='url(#default#homepage)';
   document.body.setHomePage(window.location.href);
}

What happens is that, when i issue a command before document.body(in this case the window.alert), this command fires but it gives an error in IE saying “Permission Denied”. I don’t know where to set this.

Can anyone help ?..or is there a better way for this ?..I have posted accross many forums but no luck.