开发者

Dynamically size javascript popup based on embedded swf size

I am embedding a swf in a popup window using javascript's window.open function. I am currently passing in static values for the po开发者_开发知识库pup's height and width corresponding to the height and width of the embedded swf, like so:

window.open('http://whatever.swf', 'popup', 'width=400,height=300,resizable=1');

A user can click on a button in the swf, and it changes the size of the swf from 400x300, to 400x600. Is there a way to dynamically resize the javascript popup window to account for this size increase without reloading the embedded swf?

Any help is much appreciated....


There is JavaScript's

window.resizeTo(x,y)

that you could call via the externalInterface from Flash.


How about wrapping that whatever.swf in whatever.htm and put some javascript codes to resize the window, and call that from flash?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜