锚点定位

今天一个美术同事问我,页面上的flash按钮点击跳转到页面锚点怎么实现,要求用as2写,虽然我多年不写as2了,但是照顾美术同事,找了相关资料,捣腾出代码如下:

flash里代码:

import flash.external.*;
var urlPath = ExternalInterface.call('eval', 'window.location.href');
btn.onRelease = function(){
	getURL(urlPath+"#firstAnchor");
	}

页面上添加锚点firstAnchor看效果罗

发表评论?

0 条评论。

发表评论


注意 - 你可以用以下 HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>