Please guys.
It's driving me crazy.
I have a movieclip, that inside it's timeline I have a function that after loading an image into stage, call a function to fullscreen the stage.
When I open my swf file alone , it just do fine but when I open it in html file , it doesn't go fullscreen.
(It doesn't relate to allowFullscreen or something like that, cause if move my fullscreen command before loader complete , it goes perfect, but if i use in onComplete event , it doesn't do anything when viewing in html.
Inside my movieclip i have this that doesn't work :
Code:
import flash.events.MouseEvent;
import flash.display.Loader;
import flash.events.Event;
import flash.net.URLRequest;
function func1(evt:MouseEvent)
{
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE,doFull);
loader.load(new URLRequest("Gallery/1989/RaanaFarnoudHigh (1).jpg"));
function doFull(et:Event)
{
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
stage.displayState = StageDisplayState.FULL_SCREEN;
}
}
this.addEventListener(MouseEvent.CLICK,func1);
But when I move it before load starts , it works perfect :
Code:
import flash.events.MouseEvent;
import flash.display.Loader;
import flash.events.Event;
import flash.net.URLRequest;
function func1(evt:MouseEvent)
{
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE,doFull);
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
stage.displayState = StageDisplayState.FULL_SCREEN;
loader.load(new URLRequest("1.jpg"));
function doFull(et:Event)
{
}
}
this.addEventListener(MouseEvent.CLICK,func1);
All the things goes right. I used the trace command.
The FullScreen command doesn't work on Loader Class , Complete Event when displayed in html file