我在may site:
中使用.swf文件<div>
<object width="100%" height="100%">
<embed src="@Url.Content( "~/Content/TopRight.swf" )" type="application/x-shockwave-flash" width="310" height="95"></embed>
</object>
</div>
我想在点击此横幅时打开任何链接(任何页面)。我将<object>
放入<a>
标记,但未更改。我怎么能这样做?
答案 0 :(得分:1)
将其放在代码的末尾:
import flash.display.MovieClip;
var hit = new MovieClip();
hit.graphics.beginFill(0xFFFFFF);
hit.graphics.drawRect(0,0,stage.stageWidth,stage.stageHeight);
var clicky = new SimpleButton(null,null,null,hit);
this.addChild(clicky);
clicky.addEventListener(MouseEvent.CLICK, function(){
navigateToURL(new URLRequest("http://google.com"));
});
应该工作:)