Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 03-21-2011, 03:29 PM   #1
farzanmc
Registered User
 
Join Date: Oct 2010
Posts: 15
Default Fullscreen Problem With Loader

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
Attached Files
File Type: zip Files.zip (32.2 KB, 34 views)

Last edited by farzanmc; 03-21-2011 at 04:00 PM.
farzanmc is offline   Reply With Quote
Old 03-21-2011, 04:06 PM   #2
northmantif
dont Re Member
 
Join Date: May 2009
Location: Poland
Posts: 739
Default

dont looking into your code first Q is if you have <param name="allowFullScreen" value="true" /> in your object embed tag.
//sorry found it there...:|

Last edited by northmantif; 03-21-2011 at 05:12 PM.
northmantif is offline   Reply With Quote
Old 03-21-2011, 05:37 PM   #3
farzanmc
Registered User
 
Join Date: Oct 2010
Posts: 15
Default

First read my post perfectly.
I explained that it doesn't relate to allowFullScreen. It's a flash problem that FullScreen command just responed to mouse events , not timeline playback, not flash default class events like Event.Complete or ProgressEvent.PROGRESS
kirupa.com/forum/showthread.php?p=2603866&posted=1#post2603866
farzanmc is offline   Reply With Quote
Old 03-21-2011, 06:11 PM   #4
northmantif
dont Re Member
 
Join Date: May 2009
Location: Poland
Posts: 739
Default

Quote:
The ActionScript that initiates full-screen mode can be called only in response to a mouse click or keypress. If it is called in other situations, it will be ignored (in ActionScript 2.0) or throw an exception (in ActionScript 3.0)....
that should answer your doubts.

Last edited by northmantif; 03-21-2011 at 06:14 PM. Reason: //misspell
northmantif is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:10 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.