现在的位置: 首页 > 综合 > 正文

flash如何获得自身在页面中的长宽

2013年09月19日 ⁄ 综合 ⁄ 共 687字 ⁄ 字号 评论关闭

http://www.top000.com/mp3.html
这个页面中,里面那个播放器swf本身的长宽是:360x50.
这里是这个页面的源代码:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh_cn" lang="zh_cn">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>Mp3</title>
  <embed src="http://www.top000.com/mp3.swf?songs=1|55|555&color=0xff0000" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="447" height="50"></embed>
</body>
</html>

看到那个width="447" height="50"
宽度由360被拉到447了,看到2边出现flash的背景色绿色,flash里面有没办法可以获取自身现在的宽度?也就是447这个宽度?因为我想根据flash在页面中的宽度来设置那个播放器的宽度和高度。有人懂的话请告诉我吧~~谢谢~~

 

 

 

 

答案:禁止缩放  然后stageWidth stageHeight  就是

       stage.scaleMode=StageScaleMode.NO_SCALE;

 

 

抱歉!评论已关闭.