|
|||
|
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 |
|
|||
|
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");
}
|
|
|||
|
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")
|
|
|||
|
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"); } |
|
|||
|
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);
}
|
|
|||
|
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; |
![]() |
Was this information helpful? Yes No
| Thread Tools | |
| Display Modes | |
|
|