如何操作脚本按钮链接到一个HTML页面?
问题描述:
我做的,我已经使用了一些Flash组件按钮,以我想要的链接到另一个HTML页面,但不知道怎么做了一个网页。有人可以帮我吗?
I am making a page in which I have used some flash components as buttons, to which I want to link to another HTML page but don't know how to do it. Can someone help me?
答
您必须将一个事件监听器上的按钮试听点击事件。
You have to place a event listener on your button to listen click events.
yourButton_mc.addEventListener(MouseEvent.CLICK, onClick, false, 0, true);
function onClick(e:MouseEvent):void{
navigateToURL(new URLRequest("page.html"), "_self"); // change "_self" to "_blank" if want to it open in other tab or window. More info in the links I wrote below.
}