Archive for January, 2008
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)
Hi to all!
Around christmas, Santa on his trip from the south pole around the world, left us the public alpha release of the papervision 3d engine for flash. After being on it for days, i found that, with this release, some things were changed. Today i’m going to talk about the renderScene method of the viewport class.
In the old papervision way, for rendering a camera, you only had to use the renderCamera method of the camera object. This has been changed in a fashionable way.
First you have to define a viewport. Then add it as a child to the container you want, that can be a MovieClip, a Sprite or what else.
var viewport:Viewport3D = new Viewport3D(0, 0, true, false);
addChild(viewport);
Then create your rendering engine, that is the object that really do take care of rendering your scene. So from now on, on Great White, you’ll have to render using the Renderer, not the Scene.
var renderer:BasicRenderEngine = new BasicRenderEngine();
Next step is creating the scene, and the camera (you can create both types, camera and freecamera).
var scene:Scene3D = new Scene3D();
var camera:FreeCamera3D = new FreeCamera3D();
Then go on for the real rendering trigger action. It’s up to you deciding how much often you’ll have to render your scene.
renderer.renderScene(scene, camera, viewport);
If you are wondering, as me, the right syntax for the Viewport3D constructor, it is:
public function Viewport3D(viewportWidth:Number = 640, viewportHeight:Number = 480, autoScaleToStage:Boolean = false, interactive:Boolean = false, autoClipping:Boolean = true, autoCulling:Boolean = true);
so remember:
- Create the viewport and attach it to the container
- Define a renderer.
- Define your camera and your scene.
- When you wish, feed the BasicRenderEngine.renderScene method with scene, camera and viewport.
I’ll write some other articles on the release, i hope nobody will hate me for this ;)
Have a nice day!
I had some problems configuring my mail account on the main mailer programs. I discovered that Vista introduced a new feature called “Receive Window Auto-Tuning”. This gave problems to my msn messenger too, causing it to constantly lose its connection, displaying the error code 81000306.
However, this feature simply adjusts the receive windows size in a continuative way, based upon the changing conditions of the network. Some details can be found in this article.
However, to solve the problem reguarding mail, you simply have to access the console with administrator rights and insert this line
netsh interface tcp set global autotuninglevel=disabled
If this can’t solve the problem, return it to normal
netsh interface tcp set global autotuninglevel=normal
With this command, you can view your current status of the TCP global parameters.
netsh interface tcp show global
While for solving the MSN problem, you simply open the console again with admin privileges, and write:
disabling
netsh int tcp set global autotuninglevel=disabled
enabling
netsh int tcp set global autotuninglevel=normal
checking the state
netsh interface tcp show global
That’s all!
Thanks to Giorgio, i would have never sent any mail from Vista if it wasn’t for him and his vast knowledge!
Hi to all! It’s Epiphany today! Cheers to everyone that really understand epiphany meaning!
I hate to spend the Sunday without doing something, so i woke up early and planned to make some new nasty script on Fuoridalcerchio.
It came out i developed a simple content engine. That is a engine that will let you create a Dynamic menu from an array of elements, and simply let you show a content on a button’s release.
Look at the example.
In the code, as you can see by downloading and opening into the flash IDE, i created the menu by a simple function
createMenu(new Array(["pagina 1", "page1"], ["pagina 2", "page2"], ["pagina 3", "page3"], ["pagina 4", "page4"]), container_mc, 0, 0, 0);
Here it is. The syntax is very simple.
createMenu(arrayOfButtons, the_container_movieclip, x_position_of_menu, y_position_of_menu, initial_content_loaded);
BTW, you have to define some variables and change some movieclips, you’re strongly encouraged to do that! :)
Inside the fla, in its library, the clip named button_mc, is the clip loaded for every element of the array. Change that to your wish.
The format of the elements array is simple. Every element in the array, is itself an array.
[label, label of the frame to load]
and so on.
» Download the contentEngine.fla
Have fun!
Next entries »