在我的工作中,我一直将 SWF 文件嵌入到 HTML 文档中。我经常问自己几个问题:
是吗scaleMode="noscale"
或 scale="noscale"
?值是否区分大小写?我看到了一些代码片段,如 scale="noScale"
等等。
ActionScript 中的语法如何?是Camelcase吗noScale
?我不关心 HTML 标准,我只想从 Flash 开发人员的角度了解它的情况。
有人有线索吗?我查了很多次谷歌,但我从来没有找到像一致性描述这样的东西。我刚刚找到了描述参数和值的 Adobe 页面,但没有回答我的任何问题。
非常感谢! :)
最佳答案
在 3 秒内在 Google 中找到答案:
scale - Possible values: showall, noborder, exactfit, noscale. Specifies how Flash Player scales SWF content to fit the pixel area specified by the OBJECT or EMBED tag. default (Show all) makes the entire SWF file visible in the specified area without distortion, while maintaining the original aspect ratio of the movie. Borders can appear on two sides of the movie. noborder scales the SWF file to fill the specified area, while maintaining the original aspect ratio of the file. Flash Player can crop the content, but no distortion occurs. exactfit makes the entire SWF file visible in the specified area without trying to preserve the original aspect ratio. Distortion can occur. noscale prevents the SWF file from scaling to fit the area of the OBJECT or EMBED tag. Cropping can occur.
More info here
编辑:我认为区分大小写取决于浏览器,但遵循 xhtml 标准,您应该始终使用小写字母。
编辑 2:
scaleMode
另一方面是 Stage
的属性对象在 ActionScript
,因此它用于设置 SWF 电影中的缩放模式,即未嵌入。当您嵌入 swf 时,该参数将被您在 HTML 中设置的内容覆盖。
关于object - SWF 对象参数 - scale 或 scaleMode,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8037252/