Author Topic: Using openZoom method  (Read 1082 times)

andersonef

  • Newbie
  • *
  • Posts: 2
  • Sleeping
    • EstiloFacil.com - Blog
Using openZoom method
« on: April 23, 2010, 02:16:48 pm »
Hiii people..

I'm trying to do the following:
 - there's a page that's a swf, its a slideshow.
In this swf there's a button: 'zoom', wich when the user click it, it open the image in fullscreen, but I'm can't do it. How I need to do to open the picture in fullscreen like the normal gallery when I use xml?

Sorry my bad english.. someone can help me? plz add me my msn: anderson@estilofacil.com

Florian Nücke

  • κρύα πόδια
  • Administrator
  • Hero Member
  • *****
  • Posts: 1985
  • MegaZine3 Developer
    • MegaZine3
Re: Using openZoom method
« Reply #1 on: April 25, 2010, 05:09:18 pm »
To enter full screen mode you have to use ActionScript, XML alone won't help you. Have a look at
http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/Stage.html#displayState

For more information please visit some general purpose ActionScript forum, as this is not really
MegaZine3 specific.
For the Snark was a Boojum, you see.

Before you ask a question
          After you get an answer
  • please document your problem with the answer in the Project Wiki. (e.g. in the FAQs)
  • help others out if you can, by answering their questions on the forum.

andersonef

  • Newbie
  • *
  • Posts: 2
  • Sleeping
    • EstiloFacil.com - Blog
Re: Using openZoom method
« Reply #2 on: May 19, 2010, 02:52:08 am »
Florian, I don't want to open megazine in fullscreen.

I just want to enlarge some image, doing it be the screen size. For example: I have a gallery page, and when someone click in some pic, this pic will open in fullscreen mode, but only this picture.

I only could do this picture open in the same size of the page.

May someone help me?

Florian Nücke

  • κρύα πόδια
  • Administrator
  • Hero Member
  • *****
  • Posts: 1985
  • MegaZine3 Developer
    • MegaZine3
Re: Using openZoom method
« Reply #3 on: May 20, 2010, 04:13:15 pm »
Well, due to the whole Flash going to fullscreen, which is inevitable, MegaZine3 will also go into fullscreen.
So to get your Image on top of it, the easiest way would be to add it to the stage directly while in fullscreen
mode, i.e. something like this
Code: (actionscript3)
  1. function handleFullScreen(e:FullScreenEvent):void {
  2.    var currentImage:DisplayObject = ...; // the image to show in fullscreen
  3.    if (e.fullScreen) {
  4.        // now in fullscreen
  5.        stage.addChild(currentImage);
  6.        // do positioning, sizing, ...
  7.    } else {
  8.        // not in fullscreen restore
  9.        this.addChild(currentImage);
  10.    }
  11. }

This won't work like this directly, of course, but you get the idea. Just add the content to be displayed in fullscreen directly to the stage, and restore it when fullscreen is left again.
For the Snark was a Boojum, you see.

Before you ask a question
          After you get an answer
  • please document your problem with the answer in the Project Wiki. (e.g. in the FAQs)
  • help others out if you can, by answering their questions on the forum.