dimensions of loaded swf's stage

前端 未结 2 1425
臣服心动
臣服心动 2021-01-05 02:50

Here\'s the situation - I\'ve got a shell that loads an external .swf. Now, that .swf is 800x600, but it\'s an animation piece, and there are elements that extends off the s

2条回答
  •  走了就别回头了
    2021-01-05 03:28

    Mark is very likely right that the content loader info object will contain the correct width and height. I've never checked myself so I can't guarantee it. The docs say 'nominal' and contrast it with 'actual' so it seems reasonable.

    There are a couple of other options. You can mask the external swf. Create a mask that is the size of the stage and put all content underneath it. Another idea is to create a movieclip based on a rectangular shape set it's alpha to 0 place it at x:0, y:0 and match it's width and height to stage. Give it an instance name and then when it is loaded use that value for the size.

提交回复
热议问题