|
|||
|
Dears; 1- when i used forms in my project and set showcaption to false, the form height will be larger than my flash movie's height, the space equals the titlebar height, how can I know that space. I mean the titlebar height. 2- I want to detect the form width but it returns undefined : "var width = form.window.clientRect.width;" although when I check the window object it returns true : Dialogs.msgBox(form.window);// return [object Window]. What's the mistake ? Thank you |
|
|||
|
Really sorry for the late reply.
1. It may be a bug of swfkit pro that it cannot make the window fit the movie. However, you can use method as shown in the following code to solve the problem Code:
var form = new Form; var myMovie = "xiazai.swf"; form.movie = getAdditionalFile(myMovie); form.showCaption = false; form.canDrag = true; form.caption = "Test"; form.show(false); var width = form.window.clientRect.width; var height = form.window.clientRect.height; trace(width); trace(height); var mi = FlashPlayer.getMovieInfo(getAdditionalFile(myMovie)); width = mi.frameSize.xMax - mi.frameSize.xMin; height = mi.frameSize.yMax - mi.frameSize.yMin; trace(width); trace(height); form.window.width = width; form.window.height = height; form.window.center(); |
![]() |
Was this information helpful? Yes No
| Thread Tools | |
| Display Modes | |
|
|