PDA

View Full Version : [AS3] create a projector that will open my movie full screen and use it on a touch sc


pfwork
02-15-2010, 01:56 PM
Hi,
I am a Flash newbie and I'm trying to create a simple application similar to a video dvd. I know there's an "export to flash" function in Encore dvd but it's limited and I would like to do it by myself and create a projector that will open my movie full screen and use it on a touch screen.

I am doing like this:

Frame 1: - labeled "menu"

I have two buttons on the stage and this actionscript code:

fscommand("fullscreen", "true");

stop();

btn_1.addEventListener (MouseEvent.CLICK, function () { gotoAndStop ("Movie1");})
btn_2.addEventListener (MouseEvent.CLICK, function () { gotoAndStop ("Movie2");})


Frame 2 - labeled "Movie1"

I have an empty movieclip on the stage, and a button (menu_btn) to go back to the main menu

My actionscript code is:

/* VIDEO LOADER */

import fl.video.*;

var myVideo:FLVPlayback = new FLVPlayback();
myVideo.source = "video.flv";

myVideo.addEventListener(VideoEvent.COMPLETE, completePlay);

function completePlay(e:VideoEvent):void {
movie1_mc.removeChild(myVideo);
gotoAndStop("menu");
trace ("end movie");

}

/* MENU LOADER */

menu_btn.addEventListener (MouseEvent.CLICK, function () { gotoAndStop ("menu");})

movie1_mc.addChild(myVideo);


The swf movie works fine in Flash but when I export it to a projector I get two main issues:

- The FLV movie playback is full screen and it hides the "menu_bnt"
- the action "gotoAndStop" called by the function completePlay doesn't work

How can I solve the problem? Sorry but I'm very new to flash and I'm trying to learn.

Thank you!

henke37
02-15-2010, 02:29 PM
The component defaults to using hardware acceleration to only show itself when in fullscreen. Tell it not to.