开发者

how to make flash movie as html link?

How to make flash movie as html link? E.g <a>e开发者_如何学Gombed</a>

its not working.

Any ideas?


This will work in Actionscript 3

you need to use the navigateToURL() command which requires a URLRequest. Add a mouseclick event listener to the stage and in the function that is called in the event listener call the navigateToURL() command, passing the URLRequest of the url you want it to link to.

// add the click event listener to the stage
stage.addEventListener(MouseEvent.CLICK, onClickHandler);
//define the onClickHandler function to go to the url
  function onClickHandler(evt:MouseEvent):void{
      navigateToURL(new URLRequest("http://www.google.com"));
    }


if you want to link a piece of flash to a web site simply in the .fla . Insert a new layer , name this layer a (for actionscript/actions) . Inside type the following, say the thing you wanted someone to click on was a button which you named ,as a movie clip * mcbutton * :

mcbutton.onRelease = function:void () {
getURL("http://www.yahoo.com");
};
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜