Tuesday, May 8, 2012

[Action Script] Fullscreen functionality is broken. May,2012

I am making a dj mixing board with music and video. At the load of the swf every video is loaded. Here is that code:

ActionScript Code: var pb3:FLVPlayback  = new FLVPlayback();     pb3.source="videoThreeLong.flv";     pb3.x=0;     pb3.y=-75;     pb3.blendMode="difference";     pb3.volume=0;     pb3.scaleX=2.3;     pb3.scaleY=2.3;     pbs.push(pb3);
Each video has it's own corresponding button. When that button is pressed, the function is as follows:

ActionScript Code: function noThree(e:MouseEvent):void {         if (pb3.stage) {             removeChild(pb3);             pb3.volume=0;         } else {             addChild(pb3);             pb3.volume=1;         }     }
I am publishing it to html to be viewed and interacted with. The fullscreen function works as long as none of the videos are visible. Once I make the videos visible, they play at fullscreen while the stage shrinks back to normal size. (I have attached a picture of this happening and one of what the stage should look like) At this point the stage cannot be interacted with until esc. is pressed. I need the stage to stay fullscreen so that the user can interact with the buttons that play the videos and adjust the volume. I have tried many different forms of fullscreen, here is my current code:

ActionScript Code: this.Btn.addEventListener(MouseEvent.CLICK, toggleFullscreen);     var screenCheck:Boolean = false;     var swfStage:Stage = this.stage;     swfStage.scaleMode = StageScaleMode.EXACT_FIT;     swfStage.align = StageAlign.TOP;       function toggleFullscreen(event:MouseEvent):void {          if(screenCheck == false){                 stage.displayState = StageDisplayState.FULL_SCREEN;             pbs.displayState = StageDisplayState.FULL_SCREEN;             screenCheck = true;                     }else{                     stage.displayState = StageDisplayState.NORMAL;             pbs.displayState = StageDisplayState.NORMAL;             screenCheck = false;                     }     }
Ive been trying to figure this out for weeks with no luck on my own. I'm not sure if I need to tell the stage somehow to stay fullscreen when the button is pressed? I tried to add in

stage.displayState = StageDisplayState.FULL_SCREEN;

to the if else statement with no luck. I need it for my BFA show this Friday, if anyone can help I would greatly appreciate it!
Attached Thumbnails Click image for larger versionName:	Picture 1.jpgViews:	N/ASize:	64.6 KBID:	38456 Click image for larger versionName:	Picture 2.pngViews:	N/ASize:	40.7 KBID:	38457 
Fullscreen functionality is broken.

Related Post



0 comments: