开发者

Dynamically size javascript popup based on embedded swf size

开发者 https://www.devze.com 2022-12-16 21:07 出处:网络
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 a

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

精彩评论

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

关注公众号