Bonjour, j'ai un player video dans un clip, mon souci est que l'ecran video se décale en plein écran et ne revient pas à sa position initiale apres le plein ecran (il se place au centre du moniteur).
En revanche tout marche bien si je place mon clip player aux coordonnées 0,0 sur la scène.
Le code concernant le plein ecran dans mon clip player est le suivant :
je débute en AS3, et je là je suis vraiment bloqué. J'espère avoir su exposer mon problème clairement, merci d'avance !
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 function fullscreenOnClicked(e:MouseEvent):void { // go to fullscreen mode stage.displayState = StageDisplayState.FULL_SCREEN; } function fullscreenOffClicked(e:MouseEvent):void { // go to back to normal mode stage.displayState = StageDisplayState.NORMAL; } function onFullscreen(e:FullScreenEvent):void { // check if we're entering or leaving fullscreen mode if (e.fullScreen) { // switch fullscreen buttons mcVideoControls.btnFullscreenOn.visible = false; mcVideoControls.btnFullscreenOff.visible = true; // bottom center align controls mcVideoControls.x = (Capabilities.screenResolutionX - 440) / 2; mcVideoControls.y = (Capabilities.screenResolutionY - 33); //on recupere la position de viddisplay avt full screen //var d_x:Number=500; //var d_y:Number=400; // size up video display vidDisplay.height = (Capabilities.screenResolutionY - 33); vidDisplay.width = vidDisplay.height * 4 / 3; vidDisplay.x = (Capabilities.screenResolutionX - vidDisplay.width) / 2; } else { // switch fullscreen buttons mcVideoControls.btnFullscreenOn.visible = true; mcVideoControls.btnFullscreenOff.visible = false; // reset controls position mcVideoControls.x = 0; mcVideoControls.y = 330; // reset video display //retour à la position avant full screen vidDisplay.y = 0; vidDisplay.x = 0; vidDisplay.width = 440; vidDisplay.height = 330; } }






Répondre avec citation
Partager