Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-22-2007, 05:35 AM
Junior Member
 
Join Date: Jun 2005
Posts: 22
Default Questions about forms


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
Reply With Quote
  #2 (permalink)  
Old 09-24-2007, 04:09 AM
Junior Member
 
Join Date: Jun 2005
Posts: 22
Default Questions about forms

I am waiting ???
Reply With Quote
  #3 (permalink)  
Old 09-25-2007, 02:38 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re: Questions about forms

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();
However, the above code is for modeless forms only, as the form.show(true) method for a mode form does not return immediately, so that the code after that will only be called when the form has been closed. To avoid the problem,please add a fscommand call in your form movie and move the code after the "show" method to the ffish script called by the fscommand in the form movie. This is also the solution for your problem 2.
Reply With Quote
  #4 (permalink)  
Old 09-26-2007, 04:49 AM
Junior Member
 
Join Date: Jun 2005
Posts: 22
Default Re: Questions about forms

Thank you for your reply,

the problem is still , so I will send you the project by e-mail.


Thank you
Reply With Quote
  #5 (permalink)  
Old 09-28-2007, 07:57 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re: Questions about forms

We will be waiting for you email. Thank you.
Reply With Quote
Reply

Was this information helpful?    Yes No



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 04:33 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.