Actionscript:阶段宽度小于提供的嵌入大小和StageVideo.videoWidth
这怎么可能呢。在html嵌入构造函数中,stage如何小于提供的嵌入宽度和高度Actionscript:阶段宽度小于提供的嵌入大小和StageVideo.videoWidth,actionscript,Actionscript,这怎么可能呢。在html嵌入构造函数中,stage如何小于提供的嵌入宽度和高度 <script type="text/javascript"> // For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. var swfVersionStr = "${version_major}.${version_min
<script type="text/javascript">
// For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection.
var swfVersionStr = "${version_major}.${version_minor}.${version_revision}";
// To use express install, set to playerProductInstall.swf, otherwise the empty string.
var xiSwfUrlStr = "${expressInstallSwf}";
var attributes = {};
attributes.id = "${application}";
attributes.name = "${application}";
attributes.align = "middle";
swfobject.embedSWF(
"${swf}.swf", "flashContent"
,"640", "360"
,swfVersionStr
,xiSwfUrlStr
// flashvars
,{}
// Params
,{
wmode:'direct'
,quality:'high'
,bgcolor:'#ffffff'
,allowscriptaccess:'always'
,allowfullscreen:'true'
,allownetworking:'all'
}
,attributes
);
</script>
输出:
stage width,height 320 276 720 404
如何制作舞台全屏
我遗漏了什么?如果您的问题是使您的闪光灯全屏,那么只需添加以下代码:
stage.displayState=StageDisplayState.FULL_SCREEN;
对于嵌入中设置的大小,您需要和stage.stageHeight 对于所有显示对象,.width和.height表示内容的大小。因此,无论嵌入代码中给出了Flash播放器的大小,空舞台的宽度和高度都为零
换句话说,
stage.stageWidth
是Flash播放器的宽度,而stage.width
是添加到舞台上的东西的宽度。最后!我想听的。谢谢!:)昨天发生的事情现在有了意义。最后一个问题。为什么stage.stageWidth在_构造函数中是570,而不是640。在那里我可以安全地开始选择实际的stage.stageWidth,并确保它与我在嵌入容器中提供的相同?可能是您的swf是570宽。通常,swf的大小最好与其显示的大小相同(如本例中的嵌入中所指定),但如果这不是一个选项,则可以在构造函数中设置stage.scaleMode=StageScaleMode.NO_SCALE,然后stage.stageWidth应为640。您可能还需要设置stage.align=StageAlign.TOP_LEFT,以便正确对齐。是的,我想我已经放置了stage.scaleMode=StageScaleMode.NO_SCALE after stage.stageWidth计算,这就是为什么它是570而不是640的原因。我会查的。是的,这就是原因。再次感谢你!:)
stage.displayState=StageDisplayState.FULL_SCREEN;