【问题标题】:Dropshadowfilter on textfield disables the html-links inside. Is there a way around this?文本字段上的 Dropshadowfilter 禁用内部的 html 链接。有没有解决的办法?
【发布时间】:2009-08-13 13:12:53
【问题描述】:
当我在带有 html 内容的动态文本字段上放置一个 dropshadowfilter 时,链接 (a href) 停止工作。文本字段在 Flash 3D 空间中旋转,因此它们应用了一个变换矩阵。这可能是原因吗?有人对应用于文本字段的 html-links 和 dropshadowfilter 有问题吗?如果您将过滤器放在文本字段本身或其周围的影片剪辑容器上,则没有区别...
【问题讨论】:
标签:
html
actionscript
textfield
【解决方案1】:
快速修复...只需定位 mc 中的文本字段并设置 rotationX 和 rotationY = 0 !!
【解决方案2】:
我刚刚尝试了两种方法,它们都有效。
1.使用影片剪辑作为容器
我创建了一个动态文本字段
我嵌入了字符,将 html 设置为 true,将 htmlText 设置为带有链接...
然后将所有内容放在我以 3D 旋转的影片剪辑中。
试过了,效果很好。
2.不使用影片剪辑作为容器。
我创建了动态文本字段、嵌入字符和以上所有内容,除了
将其全部放在影片剪辑中。
我刚刚使用您提到的变换矩阵在 3d 中旋转了文本字段。
//my text field is called 'label'
label.htmlText = '<a href="http://stackoverflow.com">stackoverflow</a>';
var m3d:Matrix3D = new Matrix3D();
m3d.appendRotation(30,Vector3D.Y_AXIS);
label.transform.matrix3D = m3d;
这也很有效。
希望对你有帮助