IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Flash Discussion :

[FLASH 8] Passer un clip en plein ecran via un bouton


Sujet :

Flash

  1. #1
    Membre du Club
    Profil pro
    Inscrit en
    Juin 2006
    Messages
    96
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2006
    Messages : 96
    Points : 65
    Points
    65
    Par défaut [FLASH 8] Passer un clip en plein ecran via un bouton
    Bonjour,

    Je suis en train de fiare un diaporama flash/xml.
    Je voudrais faire un bouton plein ecran / ecran de base.
    En cliquant sur ce bouton le clip contenant les photos (ici contph) passerais en plein ecran (prendrait toute la place du navigateur) et en recliquant dessus il reviendrais à sa taille d'origine.

    Est-ce que c'est possible? Merci de votre aide.
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    stop();
    TEh= Stage.height;
    TEw= Stage.width;
    //import des transitions tween
    ...
    photos_xml.onLoad= function(ok){
    	if(ok){...}
    	};
    //charge fichier xml
    photos_xml.load("photosg.xml");
    
    
    function affichePhoto(photo){
    	//loader dans clip cont la photo
    		loadMovie(photo.attributes.fichier,_root.photos.contph);
    	//textes=photo.attributes.num+"/"+nbrPhotos+":"+photo.attributes.desc;
    		}
    
    function transi (nb,cible,enCours){
    		//declaration de tween
    var transition:Tween = new Tween( this.contph, "_alpha", Regular.easeOut, 15, 100, 1, true);
    alpha.onMotionFinished=function(){
    		}
    }
    	
    
    	function diapo(){
    	//imgen cour = image en cours + 1
    	enCours=enCours.nextSibling;
    	transi(1,this.contph,enCours);
    	//afficher img en cours
    	affichePhoto(enCours);
    	}	
    	
    arretlect.onRelease=function(){
    	
    if (_root.photos.arretlect._currentframe==1){
    	intervalID=setInterval(diapo,6000);
    	mySound=new Sound();
    	mySound.attachSound("cd.mp3");
    	mySound.setVolume(100);
    	mySound.start(0,3);
    	
    	_root.photos.arretlect.gotoAndStop(2);
    	}else{
    	clearInterval(intervalID);
    	stopAllSounds();
    	affichePhoto(premierePhoto);
    	_root.photos.arretlect.gotoAndStop(1);
    	};
    }
    
    cliplectpause.onRelease=function(){
    	if (_root.photos.cliplectpause._currentframe==1){
    		temps=mySound.position; //Position est une propriété de l'objet son. 
    	//C'est le temps en millisecondes écoulé depuis le début de la lecture.
    	enCours=enCours;
    	clearInterval(intervalID);
    	stopAllSounds();
    	affichePhoto(enCours);
    	_root.photos.cliplectpause.gotoAndStop(2);
    	}else{
    	intervalID=setInterval(diapo,6000);
    	mySound.start(temps/1000,3);
    	_root.photos.cliplectpause.gotoAndStop(1);
    	}};
    	
    pleinecran.onRelease=function() {
    	if (_root.photos.pleinecran._currentframe==1){
    	_root.photos.contph._width=TEw;
    	_root.photos.contph._height=TEh;
    	_root.photos.pleinecran.gotoAndStop(2);
    	}
    	else{
    		_root.photos.pleinecran.gotoAndStop(1);
    	}
    	};

  2. #2
    Membre éclairé
    Profil pro
    Inscrit en
    Octobre 2006
    Messages
    642
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2006
    Messages : 642
    Points : 656
    Points
    656

  3. #3
    Membre du Club
    Profil pro
    Inscrit en
    Juin 2006
    Messages
    96
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2006
    Messages : 96
    Points : 65
    Points
    65
    Par défaut
    Cette page est interessante mais le problème c'est que mon diaporama est en .exe (un projecteur pour pouvoir aller sur un cd en autorun)
    Donc je ne peux pas utiliser du html!!

  4. #4
    Membre éclairé
    Profil pro
    Inscrit en
    Octobre 2006
    Messages
    642
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2006
    Messages : 642
    Points : 656
    Points
    656
    Par défaut
    Alors c'est encore plus simple, t mets ca sur ta 1ère image:


    full=false;

    function fullscreen(){
    if (full==false){
    fscommand ("fullscreen","true");
    full=true;
    }
    else {
    fscommand ("fullscreen","false");
    full=false;
    }
    sur ton bouton tu mets ce code:

    on (release){
    fullscreen();
    }

  5. #5
    Membre du Club
    Profil pro
    Inscrit en
    Juin 2006
    Messages
    96
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2006
    Messages : 96
    Points : 65
    Points
    65
    Par défaut
    avec fscommand je ne peux pas redimensionner un clip.
    Je voudrais que ce soit le clip contph qui soit redimensionné.

    J'ai deja essayé
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
     
    pleinecran.onRelease=function() {
     
    	if (_root.photos.pleinecran._currentframe==1){
    _root.photos.contph.fscommand("fullscreen","true")

Discussions similaires

  1. Réponses: 2
    Dernier message: 09/09/2013, 16h34
  2. [FLASH MX] Page plein écran
    Par leanita dans le forum Flash
    Réponses: 1
    Dernier message: 23/06/2006, 14h22
  3. [FLASH MX] Anim en plein écran !
    Par SNDP dans le forum Flash
    Réponses: 5
    Dernier message: 06/06/2006, 16h55
  4. passer en plein ecran
    Par firejocker dans le forum MFC
    Réponses: 11
    Dernier message: 09/11/2005, 11h54
  5. [FLASH MX 2004] bouton plein ecran MediaPlayBack
    Par dens63 dans le forum Flash
    Réponses: 8
    Dernier message: 12/05/2004, 14h22

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo