View Full Version : GFx Movie depth order
11-21-2010, 01:19 PM
Hey dudes, I've got a situation where I'm instantiating 2 movies in my HUD class but I want the movie I create first to be rendered on top of the other one.
Basically, is there a way to change the order that scaleform movies are rendered? Right now it just seems to be the order that they are created in.
I need this because I am using my HUD class to create both my cursor and a pause menu, but the pause menu is created it's first time only when I pause, so it renders on top of the cursor which is created right away.
11-22-2010, 03:13 AM
I think you want to set the Priority property for the movie players either directly or through the SetPriority() function, which determines focus and render order. Unfortunately, I don't know off hand whether higher or lower values mean on top. You will have to experiment with that.
For more information on Scaleform classes:
11-22-2010, 10:16 AM
Thanks for the help! I'll look into it.
11-22-2010, 10:48 AM
Used SetPriority() and it worked great with my PauseMenu movie set to 0 and Cursor to 1, so higher on top. In the GFxMoviePlayer class it sets Priority by default to 1.
10-18-2013, 10:32 PM
The var private byte Priority in GfxMoviePlayer helps to set the order movies stack up on screen, but how to actually change it?
For instance, in kismet, I'd like an augmented Gfx Open Movie which lets me drop in a value for Priority, or even a flag that jumps up another movie's priority via a user set increment each time another swf is opened so it is always on top. I tried to write this myself but no matter what, I can't get my extended class to understand what Priority is referring to. I tried making the byte in GfxMoviePlayer to be not private but that didn't affect things for me.
For now, the goal is just to get the cursor to always be on top of other loaded swfs whenever they happen to load.
At the moment, if a click in an open swf opens another swf after the cursor has already been opened, the cursor will slide under the new swf.
10-21-2013, 05:48 AM
Sorry, I don't have the answer, but we circumvent this problem, by creating all flash-movies that are used in the entire game at the beginning and as last movie we create the cursor-movie. We do this because creating movies during run-time creates lag-spikes that are annoying. So we create all movies at the beginning where a longer load-time does not annoy the player.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.