22
Hi to all! Long time i don’t post something on the blog. Been busy with a lot of projects.
By the way, I’ve been learning and focusing new skills during these days. I hope I can post the progresses on fuoridalcerchio.net soon.
Today we are focusing on fullscreen mode for flash. If you surf the web, you eventually would have noticed that some flash sites can resize to fullscreen. I don’t mean that the WINDOW resize to the maximum width and height, I mean they enlarge till there’s no more window!
Maybe some of you have asked how can this be done. That’s how.
This whole thing is handled by the Stage class, the class that takes all the task regarding the flash stage. The property we are searching is displaystate.
At this point some of you will be wondering if they can do this even with Flash MX or 5 maybe.
Nope. The first version to support the fullscreen display state is 9,0,28,0.
If you are totally unaware of what flash player version you have installed, you can see it by clicking with the right mouse button on every flash content and then choosing “Info on Flash Player”.
If you are using the latest version of Flash, all you have to do is simply changing the displayState property, in this way:
function goFullScreen(){
Stage["displayState"] = “fullScreen”;
}
function exitFullScreen() {
Stage["displayState"] = “normal”;
}
That is, the property can assume two type of values, fullScreen and normal.
By the way, this won’t work, if you don’t put a parameter reguarding fullscreen in the object and embed tags in the html where the swf content is put. The parameter is allowFullScreen and you have to set it to true.
<param name=”allowFullScreen” value=”true” />
I have to admit that there is a worst case than this. If you are using Flash 8, you’ll have to manually edit the Stage.as file to permit fullscreen mode.
Well, it’s no great trouble, really. You simply have to trace where the Stage.as file is in your Flash configuration directory. Usually the path is Flash 8\en\First Run\Classes\FP8\Stage.as
Open it in your editor, and simply add the line in the middle of the declaration part (in the highest part):
static var displayState:String;
I hope that this can be helpful! I’ve been in a lot of search on how this can be done. Foruming in and out the web I found this, tried and now it’s working. I hope this will work for you too! Let me know!
I only found one issue with sites in fullscreen. Many users on Internet discovered only when their site were almost finished, that at fullscreen size, input textfields are inactive. Adobe developers decided to remove the input functionalities on the swfs for a question of security, don’t ask me how. This is a serious limitation. I will investigate more and add the infos to this post.
Bye to all (for now)
