Question

I made a .swf Application which goes automatic to the fullscreenmode with the functions

stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;
stage.scaleMode = StageScaleMode.NO_SCALE;

So what i wanted to do is to start a .flv video and in front of this .flv include, i want to have a Movieclip, which is in front of the .flv Video.

That doesn't work, in the Fullscreen mode. If i minimize the windwow. The Movieclip goes in front of the flv- included video.

So what i need is, to have something like a z-index function in the fullscreenmode.

Can anybody help me

Thanks

Flash Player: 11.4

Was it helpful?

Solution 3

I made my own solution :

var container:Sprite = new Sprite();

        container.addChild(logo);
        container.addChild(startVideo);

        container.swapChildren(logo, startVideo);

        this.addChild(container);

Whith this Sprite object it works fine.

OTHER TIPS

Assuming you have a reference to every Display Object, you could use swapChildren to swap the depth or the z index:

var index1=this.getChildIndex(child1);

var index2=this.getChildIndex(child2);

this.swapChildren(index1,index2)

where child1 & child2 could be any display object including video player.

I'm not in front of Flash right now so I can't test the problem but I'm sure its considered bad practice to have an app that goes auto-fullscreen by itself on loading. Adobe considered it a security risk and they may have taken security steps that conflict with what you're doing... just a guess though.

"That doesn't work, in the Fullscreen mode. If i minimize the windwow. The Movieclip goes in front of the flv- included video."

My advice is to make a button somewhere on the screen for going in/out of fullscreen. So when it looks okay in the window mode, click that button to go fullscreen again and then tell me if its okay now or is the problem still happening?

A) If its okay then you need to lose auto-fullscreen and just start with a button on stage. Give it text label like "Start App" or something like that so users know what to do (much better than just throwing them in fullscreen with some unexpected loud video etc).. Anyway when in fullscreen thats when your function should addChild the flv container MC and then your other MC. Use removeChild commands when F.S mode is exited. Make the "Start" button visible or hidden depending on screen mode (F.S is hidden, Window is visible etc).

B) If its not okay you have other problems.. I'm off to sleep but will check later if there's a reply. Peace..

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top