Best Way for Fullscreen in AS3 CS4 Projector files


#1

Hi all I am working on a presentation that will only be used on the desktop. I am using AS3 and CS4 to make the file. I have a video background that uses the flv component that comes built with flash. When I try and use my old AS2 code

fscommand(“fullscreen”, “true”);
fscommand(“allowscale”, “false”);
stop();

Once I publish the file like this the video in the background jumps huge fullscreen and goes over all the other elements in the demo. I have to hit escape to get it to leave fullscrenn then I can see everything and it works fine.

Any help anyone has time to offer is greatly appreciate. Thanks


#2

Try this:

Your full screen button click listener:


function fullScreenButtonClick(event:MouseEvent):void {

stage.displayState = StageDisplayState.FULL_SCREEN;

}


#3

Hi P&k thanks so much for taking time to help. I needed fullscreen right from the launch of the exe. So I took the line of code you gave me

stage.displayState = StageDisplayState.FULL_SCREEN;

and it made it go fullscreen right off the bat but the video playing in the component in the background still jumped right up to the top layer and stretched acccross the whole screen. I have to hit escape and then it all goes back to normal.

I appreciate the willingness to help and any more advice is greatly appreciated. I look forward to more files from you as wells sir.


#4
Hi P&k thanks so much for taking time to help. I needed fullscreen right from the launch of the exe. So I took the line of code you gave me

stage.displayState = StageDisplayState.FULL_SCREEN;

and it made it go fullscreen right off the bat but the video playing in the component in the background still jumped right up to the top layer and stretched acccross the whole screen. I have to hit escape and then it all goes back to normal.

I appreciate the willingness to help and any more advice is greatly appreciated. I look forward to more files from you as wells sir.

Do you have the scaleMode set to:

stage.scaleMode = StageScaleMode.NO_SCALE; ?

ps

please, don’t call me sir :slight_smile:


#5

Sir yes sir :stuck_out_tongue:


#6

na I did not have that code in there. But I tried pasting it in there and I still had the same thing happening. Then I thought is might be because I am using the 3dTree file by zerofractal from here but I deleated that component and its code and still had the same issue. I am publishing for flash player 10 by the way.

Thanks again for helping out. It is much appreciated. The only other code I have in the file is simple function that jumps to a frame on button clicks.

I promise never to call you sir again homie especially if you know how to solve this. I am on google all day searching around :slight_smile:


#7

Did you add an event listener to your fullscreen button?


#8

wow interesting I found on Kirupa someone had similar issue and said that by default video is set to fullscrean and he used this code

myvid.fullScreenTakeOver = false;

This solved my problem with the video jumping fullscreen above my content but it streched my stage size up to fullscreen as well which I dont want because it makes the design look pixelated a bit in some areas do to the enlargment. I tried adding in the stage scale mode you mentioned and still same effect. It seems I am getting closer to my desired result


#9

thanks lydian for the help, I have no button to launch fullscreen. My project is a desktop presentation that will never be used on the web. The presenter will just click the projector .exe file and present the demo from there. I wanted it to jump to fullscrean right from the start.


#10

Thanks a bunch for helping guys and gals


#11

I am using AS2 in CS4 and saving projector files back to Flash 8 as a work around for fscommand being broken in Flash 9+

I am using fscommand(“fullscreen”, “true”); on the first frame to make the projector go full screen. This will lock that first frame over the entire timeline.

I made a keyframe on every frame and called the fscommand(“fullscreen”, “true”); which works great, bringing the content of each frame up when you navigate around. However it does not show any of the videos placed on that frame through the playback component.

The video on the page will play and you can hear it in the background but all of the static content has moved in front of it.

NOTE: If I run the projector file, and select Fullscreen from the menu everything works great. Is there a way to trigger that “version” of fullscreen when the projector starts up?


#12

not sure if it helps but here is what I use on my projector files in as3 and as2

fscommand(“fullscreen”, “true”);
fscommand(“allowscale”, “false”);
stop();


#13

“For as2”:http://pastie.org/369214

This need the allowFullScreen set to true in the params of the object in the html page :wink: Works only in the browser of course…


#14

unchartedrealms it looks like you were having the same problem as I am with some content taking over in front of everything else, did you solve it?

The code: fscommand(“fullscreen”, “true”; fscommand(“allowscale”, “false”; stop(); does not solve my issue.


#15

you beat me to it uncharted! I read your first post and knew what it was right off the bat. I had the same issue on a project I am working on right now. Might of even been my post at kirupa if it was this one: