Accueil > > > GESTIONNAIRES DE PROFONDEURS DE FENÊTRES
GESTIONNAIRES DE PROFONDEURS DE FENÊTRES
Information sur la source
Description
newWindow();
killWindow();
swapWindow(MovieClip) ;
showCadre(MovieClip); (drag n drop);
Source
- windows = new Array();
- newWindow = function () {
- windowDepth = windows.length+1000;
- window = _root.attachMovie("window", "window"+windows.length, windowDepth);
- window._x = windows.length*20+20;
- window._x = windows.length*10+10;
- windows.push({clip:window});
- _root.windowsListe.createListe();
- };
- swapWindows = function (p_clip) {
- for (i=0; i<windows.length; i++) {
- if (windows[i].clip == p_clip) {
- if (i != windows.length-1) {
- windows[i].clip.swapDepths(windows[i+1].clip);
- windows.splice(i+2, 0, windows[i]);
- windows.splice(i, 1);
- }
- }
- }
- };
-
- killWindow = function (p_clip) {
- for (i=0; i<windows.length; i++) {
- if (windows[i].clip == p_clip) {
- if (i != windows.length-1) {
- windows[i].clip.swapDepths(windows[i+1].clip);
- windows.splice(i+2, 0, windows[i]);
- windows.splice(i, 1);
- } else {
- unloadMovie(windows[i].clip);
- windows.splice(i, 1);
- }
- }
- }
- _root.windowsListe.createListe();
- };
-
- /////////////////////////////////
-
- showCadre = function(p_cible){
- cadre = _root.createEmptyMovieClip("cadre",9998);
- cadre.lineStyle(1,"0xFFFFFF");
- cadre.beginFill("0xFFFFFF",10);
- cadre.moveTo(0,0);
- cadre.lineTo(0,p_cible._height);
- cadre.lineTo(p_cible._width,p_cible._height);
- cadre.lineTo(p_cible._width,0);
- cadre.lineTo(0,0);
- cadre._x = p_cible._x;
- cadre._y = p_cible._y;
- cadre.startDrag();
- p_cible.fond.onRelease = function(){
- cadre.stopDrag();
- if(cadre._x+cadre._width>Stage.width){
- cadre._x = Stage.width-cadre._width;
- }
- if(cadre._x < 0){
- cadre._x = 0;
- }
- if(cadre._y+cadre._height>Stage.height){
- cadre._y = Stage.height-cadre._height;
- }
- if(cadre._y < 0){
- cadre._y = 0;
- }
- goTo(p_cible,cadre._x,cadre._y);
- cadre.unloadMovie();
- }
- p_cible.fond.onReleaseOutside = function(){
- cadre.stopDrag();
- if(cadre._x+cadre._width>Stage.width){
- cadre._x = Stage.width-cadre._width;
- }
- if(cadre._x < 0){
- cadre._x = 0;
- }
- if(cadre._y+cadre._height>Stage.height){
- cadre._y = Stage.height-cadre._height;
- }
- if(cadre._y < 0){
- cadre._y = 0;
- }
- goTo(p_cible,cadre._x,cadre._y);
- cadre.unloadMovie();
- }
- }
- goTo = function (cible, cible_x, cible_y) {
- cible.cible_x = cible_x;
- cible.cible_y = cible_y;
- flex = 0.3;
- cible.pgCoin._x = cible._width-10;
- cible.pgCoin._y = cible._height-10;
- cible.onEnterFrame = function() {
- cible._x += (cible.cible_x-cible._x)*flex;
- cible._y += (cible.cible_y-cible._y)*flex;
- if (Math.round((cible.cible_x-cible._x)*flex) == 0 && Math.round((cible.cible_y-cible._y)*flex) == 0) {
- cible._x = cible.cible_x;
- cible._y = cible.cible_y;
- cible.onEnterFrame = function() {
- };
- }
- };
- };
windows = new Array();
newWindow = function () {
windowDepth = windows.length+1000;
window = _root.attachMovie("window", "window"+windows.length, windowDepth);
window._x = windows.length*20+20;
window._x = windows.length*10+10;
windows.push({clip:window});
_root.windowsListe.createListe();
};
swapWindows = function (p_clip) {
for (i=0; i<windows.length; i++) {
if (windows[i].clip == p_clip) {
if (i != windows.length-1) {
windows[i].clip.swapDepths(windows[i+1].clip);
windows.splice(i+2, 0, windows[i]);
windows.splice(i, 1);
}
}
}
};
killWindow = function (p_clip) {
for (i=0; i<windows.length; i++) {
if (windows[i].clip == p_clip) {
if (i != windows.length-1) {
windows[i].clip.swapDepths(windows[i+1].clip);
windows.splice(i+2, 0, windows[i]);
windows.splice(i, 1);
} else {
unloadMovie(windows[i].clip);
windows.splice(i, 1);
}
}
}
_root.windowsListe.createListe();
};
/////////////////////////////////
showCadre = function(p_cible){
cadre = _root.createEmptyMovieClip("cadre",9998);
cadre.lineStyle(1,"0xFFFFFF");
cadre.beginFill("0xFFFFFF",10);
cadre.moveTo(0,0);
cadre.lineTo(0,p_cible._height);
cadre.lineTo(p_cible._width,p_cible._height);
cadre.lineTo(p_cible._width,0);
cadre.lineTo(0,0);
cadre._x = p_cible._x;
cadre._y = p_cible._y;
cadre.startDrag();
p_cible.fond.onRelease = function(){
cadre.stopDrag();
if(cadre._x+cadre._width>Stage.width){
cadre._x = Stage.width-cadre._width;
}
if(cadre._x < 0){
cadre._x = 0;
}
if(cadre._y+cadre._height>Stage.height){
cadre._y = Stage.height-cadre._height;
}
if(cadre._y < 0){
cadre._y = 0;
}
goTo(p_cible,cadre._x,cadre._y);
cadre.unloadMovie();
}
p_cible.fond.onReleaseOutside = function(){
cadre.stopDrag();
if(cadre._x+cadre._width>Stage.width){
cadre._x = Stage.width-cadre._width;
}
if(cadre._x < 0){
cadre._x = 0;
}
if(cadre._y+cadre._height>Stage.height){
cadre._y = Stage.height-cadre._height;
}
if(cadre._y < 0){
cadre._y = 0;
}
goTo(p_cible,cadre._x,cadre._y);
cadre.unloadMovie();
}
}
goTo = function (cible, cible_x, cible_y) {
cible.cible_x = cible_x;
cible.cible_y = cible_y;
flex = 0.3;
cible.pgCoin._x = cible._width-10;
cible.pgCoin._y = cible._height-10;
cible.onEnterFrame = function() {
cible._x += (cible.cible_x-cible._x)*flex;
cible._y += (cible.cible_y-cible._y)*flex;
if (Math.round((cible.cible_x-cible._x)*flex) == 0 && Math.round((cible.cible_y-cible._y)*flex) == 0) {
cible._x = cible.cible_x;
cible._y = cible.cible_y;
cible.onEnterFrame = function() {
};
}
};
};
Conclusion
J'ai fait ça pour un besoin personel à la base, si vous avez des suggestions...
Sources de la même categorie
Commentaires et avis
Discussions en rapport avec ce code source dans le forum
quitter une anim Flash [ par oper002 ]
Bonsoir,j'aimerais connaitre la fonction qui permet de quitter et de fermer la fenetre d'une animation Flash.Exemple : un bouton "quitter" qui fermera
prob popup [ par aannick ]
Bonjour j'ai également un problème j'arrive pas à créer un pop up d'après les explications des gens, car ils ne disent pas exactement ce qu'il faut éc
Ouverture fenetre en plein ecran [ par must ]
Salut,comment ouvrir une page en mode plein ecran enutilisant window,et non fullscreenDoit s'ouvrir en mode plein ecran selon le navigateur ou platefo
Gestionnaire de liens [ par lymfatx ]
Voila c'est encore moi, je suis en train de faire un gestionnaire de liens comme ceci : si aucune catégorie n'est sélectionnée, le swf affiche les cat
Soucis de close.window apres un fullscreen... [ par C0ke ]
Bonjour a tous.Voila ca fait 2 jours que je me prend la tete sur la fermeture de mon animation flash en fullscreen.Le fullscreen fonctionne a merveill
Fenetre qui s'adapte en fonction de l'image [ par xav11 ]
Bonjour, j'aimerais savoir si quelqu'un connait une ressource pour adapter un cadre en fonction de son image, un peu à l'image de ce site : http://www
window.close [ par troutku ]
J'ai jamais réussi a redimenssioner une page HTML dans laquelle s'ouvre mon flash, à sa taille précise.Le seul moyen à ma connaissance est de faire un
Probleme de centre de fenetre [ par nvtitan ]
Salut a tous .J'ai une petite question :Est il possible de changer le centre du repere de la fenetre principal ? Je veus dire le centre sur flash mx e
fermer une fenetre [ par imedia30 ]
Bonjour à tous !Merci d'avance pour votre aide !Je cherche le code pour fermer une fenetre !c'est trés urgent !je compte sur votre aide !A charge de r
pop up avec taille de fenetre definis [ par erck ]
erck74:Bonjour je suis à la d'un code pour pouvoir faire ouvrir une fentre html (popup) mais avec une taille definis .Help me et merci e,corePS: Bonn
|
Derniers Blogs
IMAGINE CUP 2012, MAKE A SIGN EN FINALEIMAGINE CUP 2012, MAKE A SIGN EN FINALE par junarnoalg
Voilà qui est fait, la nouvelle est officielle ! L'équipe belge "Make a Sign" va au pays des kangourous défendre son projet dans la catégorie Software Design. http://www.imaginecup.com/CompetitionsContent/Competition/WorldwideFinalists.aspx V...
Cliquez pour lire la suite de l'article par junarnoalg KINECT 1.5 IS OUT !KINECT 1.5 IS OUT ! par Vko
La version 1.5 du Kinect For Microsoft vient tout juste de sortir ! Plein de nouveautés: Tracking de squelette en Near Mode Détection en position assise Détection faciale avec un SDK dédié Documentation et des guideline (enfin) Un out...
Cliquez pour lire la suite de l'article par Vko LES ACTUALITéS DE LA SEMAINE SUR C2I.FR (14 MAI - 20 MAI) LES ACTUALITéS DE LA SEMAINE SUR C2I.FR (14 MAI - 20 MAI) par richardc
Mise à jour des Web API du 14 Mai
Réservez dès maintenant votre journée du 20 juin pour le Windows Azure Dev Camp 2012 à Paris
Mise à jour de Team Foundation Service
MechCommander 2 sur Windows 8
Entity Framework 5 Release Candidate e...
Cliquez pour lire la suite de l'article par richardc REACTIVE EXTENSIONS : CONSOMMER DES SERVICES AVEC RX PARTIE 3, LES PIèGES à éVITERREACTIVE EXTENSIONS : CONSOMMER DES SERVICES AVEC RX PARTIE 3, LES PIèGES à éVITER par Groc
Une mauvaise utilisation de rx lors de l'écriture d'une couche d'accès à des services peut conduire à des cas embarassants avec des erreurs mal gérées, des appels qui ne partent lorsqu'ils le devraient, et même des résultats incorrects . le tout nuis...
Cliquez pour lire la suite de l'article par Groc SHAREPOINT BLOG SITE, PROBLèME D'ARCHIVESSHAREPOINT BLOG SITE, PROBLèME D'ARCHIVES par junarnoalg
Dernièrement, nous avons migré le site
myTIC
vers un nouveau serveur SharePoint 2010. Dans les contenus que nous vouloins récupérer, nous avions un certain nombre de blogs.
Nous avons utilisé les commandes Power...
Cliquez pour lire la suite de l'article par junarnoalg
Logiciels
sDEVIS-FACTURES vlPRO (8.1.0.3)SDEVIS-FACTURES VLPRO (8.1.0.3)sDEVIS-FACTURES vlPRO a été mis au point pour les particuliers, créateurs, entrepreneurs, artisa... Cliquez pour télécharger sDEVIS-FACTURES vlPRO 974 Application Server (12.2.4.6)974 APPLICATION SERVER (12.2.4.6)Développez de puissantes applications dans un environnement de 'cloud computing', clusterisé, séc... Cliquez pour télécharger 974 Application Server vPicture (1.4.2.1)VPICTURE (1.4.2.1)Avec vPicture, hébergez vos images facilement et rapidement.
vPicture est un utilitaire simple, ... Cliquez pour télécharger vPicture Easy-Planning (2.2.1.6)EASY-PLANNING (2.2.1.6)Easy-Planning permet de créer des plannings sous la représentation de diagrammes et est adapté au... Cliquez pour télécharger Easy-Planning COM-BACKUP (2.0)COM-BACKUP (2.0)
COM-BACKUP est un logiciel de sauvegarde qui permet de planifier les sauvegardes de vos dossiers ...
Cliquez pour télécharger COM-BACKUP
|