Js|window Flash+js to create full screen imitation windows
First, demand analysis :
1: Full Screen page resolution should be 1024*768 if less than this resolution, the effect of fine screen is not reflected. Therefore, the operating system below this resolution should be restricted from accessing this interface.
2: Open Full-screen window should have the upper right corner to minimize, turn off the button.
3: Each loaded window should be removable, closed, and minimized.
4: The icon on the desktop can be dragged, double-click.
5: The bottom of the screen has a taskbar, when the mouse moved to the bottom of the screen, the taskbar pop-up from the bottom. You can return it to the bottom of the screen with a push button.
second, technical points :
Java Script:
Screen Object (object):
The object has the following attributes (properties):
availheight [Effective height], (Effective height = height-taskbar height)
availwidth [Effective width],
bufferdepth [buffer size],
colordepth[color depth],
Height [height],
width [breadth],
updateinterval [Update interval],
Window objects (object):
The object has the following attributes (properties):
clientinformation[Client Information], closed [closed],
defaultstatus[default state],
dialogarguments [The Session box returns an array],
Dialogheight [Session frame height], dialogleft [Session box from left screen],
dialogtop[session box from top of screen], dialogwidth[session width]
(The above 5 properties apply only to the Form dialog box created by the person ShowModalDialog ())
Document Document],
event[Event],
history[history],
length*[length],
location[position],
name[name],
Navigator[Browser],
offscreenbuffering [Turn off screen buffering y/n],
Opener [Script Open window has opener point to open this window you open your own browser is empty
Window.close According to this judgment whether the prompt]
parent*,[parent Window]
returnvalue[return value],
screen[Screen],
Self[itself],
status[State],
top* [Top window]
*an asterisk indicates properties not applicable to modal dialogs.
The attribute with the * number is not available for modal dialogs (the form session box created by ShowModalDialog ()).
Collections (Collection)
frames* [Framework]
Method (Methods):
alert[warning],
blur[minimized],
clearinterval [Cancel interval],
cleartimeout[purge Timeout setting],
Close[closed],
Confirm [OK] (object.confirm ([message]) are you sure? This function will return a logical value),
execscript[Execute code],
focus[Focus],
moveby[relative movement],
Moveto[moved to],
navigate[navigation =window.location.href Local URL],
open* [Open],
prompt [hint],
Resizeby [Relative scaling],
Resizeto [Zoom to],
scroll[scrolling],
scrollby[relative scrolling],
scrollto[scrolling to],
setinterval[set interval],
settimeout[setting timeout],
showhelp[Show help],
showmodaldialog* [Display form conversation box]
*an asterisk indicates properties not applicable to modal dialogs.
The attribute with the * number is not available for modal dialogs (the form session box created by ShowModalDialog ()).
Event (Events):
onbeforeunload[before closing],
onblur[minimized],
onerror[ERROR],
onfocus[get focus],
onhelp[help],
onload[loading],
onresize[Zoom],
onscroll[scrolling],
onunload [Close]
Flash Action Script:
On (press [presses], release [released], Releaseoutside [externally released],
rollover [sliding], rollOut [sliding away], dragOver [dragged], dragout [towed],
KeyPress "" [Key])
GETURL [Go to Connection] ("Javascript:self.close ()");
Stratdrag ("MovieClip"); [Start dragging]
Stopdrag ("MovieClip"); [Stop dragging]
Loadmovie ("*.swf", "MovieClip"); [Load movie to MovieClip]
Loadmovienum ("*.swf", N); [Load movie to Nth level]
Unloadmovie ("*.swf"); [Uninstall movie]
Play () [playback]; Stop () [stop];
Pc_today=new Date (); [New Date Object]
Pc_today.gethours (); When
Pc_today.getminutes (); Part
Pc_today.gettime (); Seconds
. getbytesloaded (); [number of bytes loaded]
. Getbytestotal (); [Total number of bytes to load]
_root.getbytestotal represents the number of bytes in the current SWF file.
On (release) {
GetURL ("Javascript:self.close ()"); [Go to connection]
}
Execute the JS code, close the current window, the same
GetURL ("Javascript:self.blur ()");
You can minimize the current window.
Third, the program code
1, control at 1024*768 resolution above can open Full-screen JS code. Put this code into the zone.
2,flash test mp3 load percent as:
Description: There is a MovieClip in the main scene for the Loadmp3. The SWF file that is used to load MP3, can also be loaded directly into MP3.
Make a 100-frame loading MovieClip named LOADING_MV.
Do a two-frame image-free movieclip named Loading_mv_test.
The first frame code is as follows:
mp3loaded = _root.loadmp3.getbytesloaded ();
Mp3total = _root.loadmp3.getbytestotal ();
mp3percent = 0;
if (mp3total>1000 && mp3loaded>10) {
When the Loadmp3 in the main scene does not load the movie mp3loaded the value is 1, not 0;
Because there is a byte to represent this MovieClip
mp3percent = Int (mp3loaded/mp3total*100);
_parent.gotoandstop (mp3percent);
} else {
_parent.gotoandstop (1);
}
Pctoday = new Date ();
Pctime = pctoday.gethours () Add ":" Add Pctoday.getminutes () Add: "Add pctoday.getseconds ();
Create a dynamic text object in the scene, the variable name is Pctime, you can display the system time in real time.
The second frame code is as follows:
gotoAndPlay (1);
3, the main code of the desktop icon:
On (Press) {
StartDrag ("");
}
On (release) {
Stopdrag ();
frame = Time._currentframe;
if (settime = = 0) {
SetTime ==0 said it had not started timing. SetTime ==1 says the timer has started.
Time.gotoandplay (1);
SetTime = 1;
}
When opening the settime, set the time position of the record.
if (settime = = 1 && frame<=6) {
Start the timer within 6 frames, (0.5S) release the mouse again.
Loadmovie ("000.jpg", "_root.picback.bak");
You can also change to another action.
} else {
settime = 0; Timing reset.
}
}
Time is a 20-frame MovieClip,
At 20 frames as the Stop ();