im working on a flash video player interface. trying to make my fullscreen functionality work.
so far: http://clarknewmedia.com/player/player.html
the full screen button is on the far right. it half works. right now it calls a function but this function is making the entire flash swf go full screen, what i would like is for just the section with video to go full screen
my function:
fullscreenButton.onRelease = function(){ if(Stage.displayState == "fullScreen"){ Stage.displayState = "normal"; } else{ Stage.displayState = "fullScreen" } }
i tried to mod the above to change stage to the id of the vid object "theVideo" but no go.
is there a way to constrain my fullscreen to only show the area that i want to specify? if so how? im writing this in as2.0 currently, but will need to know how to 3.0 it (if the code is different)
thanks
the function above would work fantastic if i had JUST a video area on screen in my fla, but i dont, i have several nav menus and such that are going to be on the right of it. i want it to zoom in full screen and just show my targeted area (video player)
stage no worky, need to target other sized area.
essentially im trying to mimic functionality of this:
their player is a wide element swf with a player and a tilelist. but when you click their fullscreen button it only zooms to the player
ack.
looks like im going to hack in some work into this function:
EventListener = new Object; EventListener.onFullScreen = function( bFull:Boolean ){ // change to fullscreen mode has been detected if(bFull){ full.fullTXT = "Full Screen Mode"; } else{ full.fullTXT = ""; } } Stage.addListener( EventListener );
im going to use that function and add in some "if fullscreen, then turn the stuff i dont want to see off, and make my video bigger" functionality.
we'll see if it works. if anyone knows any easier workaround, id love to hear it. would be easier if i could just set a zoom area focus or something similar.
dood....... get your video into its own swf, push the filename to it, load the filename, and all is taken care of!!
If it's too late for you to build that way, let us know how that hack goes. I'm interested to know.
try something like this
function toggleFullscreen ( ):void { switch ( this.stage.displayState ) { case StageDisplayState.FULL_SCREEN : { this.stage.displayState = StageDisplayState.NORMAL; this.stage.fullScreenSourceRect = null; break; }
case StageDisplayState.NORMAL :
{
this.stage.displayState = StageDisplayState.FULL_SCREEN;
/** The coordinates you want to be fullscreenified **/
this.stage.fullScreenSourceRect = new Rectangle ( 0, 0, 100, 100 );
break;
}
}
}
hope it helps,
A.
- edit *
Looks like you're using lame as2. get with the fuckin' times. flash 10 is almost about to be released and you're still targeting 8. LAMESAUCE 