AS3 Fullscreen projector has black screen instead of flvplayback

Posted on 2012-09-12
Last Modified: 2012-12-11
Hi All,

I'm having difficulty getting this to work. Basically I'm putting together a CD Rom which will play full screen.

Parts of the CD Rom have videos in. I don't want these to play full screen but just play in a box in the middle.

The problem I'm having is that it works fine until I export a Macintosh Projector file. When I go to the scene with the movie, it just goes black. Filling the screen with black, and when I press escape, it goes back to the scene but the movie hasn't started playing.

I'm also using cue points so that it can go to the next video at the end. I'm not a very good programmer yet, as you may see from my code...

The fullscreen code I'm using is on the previous scene:
import flash.system.fscommand;

fscommand("fullscreen", "true");
fscommand("allowscale", "false");

Open in new window

On the next scene, with the video on it, I've tried
 IntroMovie.fullScreenTakeOver = false; 

Open in new window

but it doesn't work. I've tried going through all of my code and now I've ended up here. Please could somebody attempt to help?

My full code is:

Intro Scene
import flash.system.fscommand;

fscommand("fullscreen", "true");
fscommand("allowscale", "false");

ADTStartBtn.addEventListener(MouseEvent.CLICK, gotointrovideo);

	function gotointrovideo(event:Event):void 
	trace("Intro Video");
	gotoAndPlay("IntroPlay", "Intro");
//This is where there's a transition for the "out" of intro. It doesn't have an end frame command to go to the next scene as it's automatic.

Open in new window

Code for Intro Video Scene:
import flash.system.fscommand;

IntroMovie.fullScreenTakeOver = false;

//Initiates the Cue Point

function cp_listener(event:MetadataEvent):void
// Traces cue points for info
trace("Elapsed time in seconds: " + IntroMovie.playheadTime);
trace("Cue point name is: " +;
trace("Cue point type is: " +;

// Code for going to next scene automatically at the end of the video
if ( == "Intro End") {

// Code for "Next" button
next_btn.addEventListener(MouseEvent.MOUSE_DOWN, stopflv);
function stopflv(event:MouseEvent):void {

// Code for "Pause" button
pause_btn.addEventListener(MouseEvent.MOUSE_DOWN, intro_pauseflv);
function intro_pauseflv(event:MouseEvent):void {

// Code for "Play" button
play_btn.addEventListener(MouseEvent.MOUSE_DOWN, intro_playflv);
function intro_playflv(event:MouseEvent):void {;  

// Code for "Scene Selection" button
menubtn.addEventListener(MouseEvent.CLICK, gotomenu);

	function gotomenu(event:Event):void 
	trace("Game Menu");
	gotoAndPlay(1, "Game Menu");


Open in new window

Many thanks,

Question by:tomsaunders9
    LVL 19

    Expert Comment

    I'm not sure if this will help, but it sounds like it may be related

    Also, since the author of that piece says this only works with videos encoded in the flv format, one other possible solution may be (if you are using flv videos yourself) is to re-encode the videos using a *different* video codec (e.g. using Adobe Media Encoder and choosing, say, the H264 video codec).

    Accepted Solution

    Thanks for the reply, quizengine.

    Actually it turned out to be an issue that when the screen goes black it's actually crashing:
    ReferenceError: Error #1056: Cannot create property IntroMovie on flash.display.Stage.

    It's processing the code before it's had chance to add all the elements to the display list. I'm referencing "IntroMovie" but it doesn't exist yet.
    A simple solution is to delete the video from the stage in the timeline, and instantiate the FLVPlayback instance with code:
    var IntroMovie:FLVPlayback = new FLVPlayback();
    //Then set up the properties like this:
    IntroMovie.source = "Videos/1_Intro.mp4";
    IntroMovie.fullScreenTakeOver = false;
    // change these as appropriate
    IntroMovie.x =100;  //in pixels
    IntroMovie.y= 100;
    IntroMovie.width = 800;
    IntroMovie.height= 400;
    //add this newly created object to the stage

    Open in new window

    There's also a COMPLETE event that I used instead of adding cue points. Much better.

    Anyway, that should solve the problem for most people, and the MP4s work just fine.

    LVL 37

    Expert Comment

    This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
    Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
    The goal of the tutorial is to teach the user how to how to record live broadcast.
    The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now