Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-22-2006, 07:31 AM
Member
 
Join Date: Sep 2005
Posts: 31
Default detecting screen resolution

i want to load my presentation cd in full screen mode.

and i want that my application detect the screen resolution and adjust according to that resolution.

For example, i have a main movie which detect the screen resolution and adjust according to that resolution then play a command "loadmovie"..... like

if resolution is 800 x 600
then loadmovie

HELP NEEDED

thanx in advance
Reply With Quote
  #2 (permalink)  
Old 08-22-2006, 02:01 PM
Senior Member
 
Join Date: Feb 2003
Posts: 212
Default Re:detecting screen resolution

try this in swfkit

Code:
//get the current display setting
var ds = SysInfo.displaySetting;
trace(ds. pelsWidth);
trace(ds. pelsHeight);
trace(ds. bitsPerPel);
trace(ds. displayFrequency);

if(ds.pelsWidth==800){
    FlashPlayer.loadMovie(1, "c:\\test.swf");
}
Reply With Quote
  #3 (permalink)  
Old 08-23-2006, 10:29 AM
Member
 
Join Date: Sep 2005
Posts: 31
Default Re:detecting screen resolution

i write this code in swfkit script window OR in flash ??????????
Reply With Quote
  #4 (permalink)  
Old 08-23-2006, 11:59 AM
Senior Member
 
Join Date: Feb 2003
Posts: 212
Default Re:detecting screen resolution

This is the code for in SWFkit
In flash you have to call this code.

Let's say you create a script called "DetectScreen" in swfkit with the code above.

In flash you then have to put the following script to call on your swfkit script:
Code:
fscommand("ffish_run","DetectScreen")
Reply With Quote
  #5 (permalink)  
Old 08-23-2006, 12:10 PM
Member
 
Join Date: Sep 2005
Posts: 31
Default Re:detecting screen resolution

thanx a lot ..........

now tell me one thing that
CAN I USE THIS CODE IN FLASH ALSO TO DETECT SYSTEM RESOLUTION ?????

thanx in advance
Reply With Quote
  #6 (permalink)  
Old 08-23-2006, 12:32 PM
Senior Member
 
Join Date: Feb 2003
Posts: 212
Default Re:detecting screen resolution

resolution = ds. pelsWidth x ds. pelsHeight
Reply With Quote
  #7 (permalink)  
Old 08-23-2006, 01:45 PM
Member
 
Join Date: Sep 2005
Posts: 31
Default Re:detecting screen resolution

I mean that CAN I USE THIS CODE IN FLASH ALSO and i think the code in flash should be like this

//get the current display setting
var ds = SysInfo.displaySetting;
trace(ds. pelsWidth);
trace(ds. pelsHeight);
trace(ds. bitsPerPel);
trace(ds. displayFrequency);

if(ds.pelsWidth==800 && ds.pelsHeight==600){
FlashPlayer.loadMovie(1, "c:\\test.swf");
}


Reply With Quote
  #8 (permalink)  
Old 08-23-2006, 02:39 PM
Senior Member
 
Join Date: Feb 2003
Posts: 212
Default Re:detecting screen resolution

You must have set everything up to work with FFish script objects synchronously in Adobe Flash 8 like in this tutorial:
http://www.swfkit.com/swfkit/doc/manual/node5.html

then in Flash

Code:
//import the swfkit classes
import SWFKit.*;


//get the current display setting
var ds = SysInfo.displaySetting;
trace(ds.pelsWidth);
trace(ds.pelsHeight);
trace(ds.bitsPerPel);
trace(ds.displayFrequency);

// load the movie
if(ds.pelsWidth==800 && ds.pelsHeight==600){
    FlashPlayer.loadMovie("c:\\test.swf",1);
}
Reply With Quote
  #9 (permalink)  
Old 08-23-2006, 02:53 PM
Member
 
Join Date: Sep 2005
Posts: 31
Default Re:detecting screen resolution

is this possible that it CAN RESIZE THE STAGE TOO???

is yes then whats the code ....

sorry for this but i'm new thats y i am asking lots of questions

thanx in advance
Reply With Quote
  #10 (permalink)  
Old 08-23-2006, 05:11 PM
Senior Member
 
Join Date: Feb 2003
Posts: 212
Default Re:detecting screen resolution

Code:
//get the current display setting
var ds = SysInfo.displaySetting;
trace(ds. pelsWidth);
trace(ds. pelsHeight);
trace(ds. bitsPerPel);
trace(ds. displayFrequency);

//change the current display setting;
ds.pelsWidth = 800;
ds.pelsHeight = 600;
ds.test = true;
SysInfo.displaySetting = ds;
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 03:52 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.