Any guidance on creating a GFx view manager like the Unreal Tournament menu?

I would really like to learn all about how the UT main menu was made. Unfortunately, when I load it into Animate, I just get a lot of errors and warnings about how ActionScript 2 is no longer supported, so I can’t really experiment with any of it. (I guess I could try installing an old version of Flash Pro, but that would be kind of a pain.)

Do any of you (maybe @ciox if you’re still around) know of any detailed explanations of what’s happening in the Unreal Tournament menu?

The way I did Himeko Sutori’s menus is kind of an embarrassment. I open and close GFxMoviePlayers using ConsoleEvents and Kismet. That was all I knew how to do when I got started, and I just kept adding to it. My pause menu is a giant, bloated monster with all of the submenus built in on the timeline.

How do you load other movies dynamically into a base movie? Can I have different movies in different parts of the screen and have a mouse interact with all of them independently? How do you create a stack of movies open at the same time, and navigate back and forth between them? (Say from the main menu to the options menu and back, and from there to the save game menu? In Himeko Sutori that is all on the timeline and I have a lot of gotoAndPlay commands.)

I made a mess before, and I got it to work. Now I’d like to get it right from the beginning.

I don’t tend to use the timeline (in terms of keyframes, etc) when working with animate/AS3/Scaleform. Use scripts to handle all your animations. I treat it more like web development using javascript. I also don’t really use Unrealscript to handle any of the frontend visual logic (like they show examples of in the docs). I only use US to send or receive data to and from the frontend. For example I don’t use US to add widgets or build any visual layout. Do all of that in AS3. I just will call some init function in my AS code and let that handle the construction of the frontend.

You can create MC’s dynamically in AS3 simply like this:

var someMc:MyMcClass = new MyMcClass();
addChild(someMc);

I avoid extending from UIComponent unless I need the MC to have it’s own corresponding US class to communicate back and forth with (so only wrapper classes). UIComponent is wildly bloated with event listeners and logic. Extend from MovieClip if that component has no direct dependency on US.

Use tween libraries and script animations instead of manually using the timeline. Using the timeline is bad practice in my opinion as changes are not tracked in version control. I use tweenLite/tweenMax from Greensock, which is excellent for scripting animations: TweenLite - Products - GreenSock

These are obviously just my opinions. My frontend app is absolutely huge (nearly as big as my US). But is very lightweight to run due to lazy-loading/unloading components as they are needed and cleaning up after them. Always make sure to cleanup your components (event listeners, etc) after you remove them from the stage (removeChild(myMc);).

One lesson I’ve learnt with scaleform (the hard way) is to make sure you always unload UI components in AS3 if you remove it’s corresponding US object. Making a call from AS3 from a component, where it’s corresponding US object has been removed, will always result in a full engine crash.

1 Like

I didn’t really do much, I just modified and added small bits to what was already happening in there, in the flash files of the UDKFrontend package and the Unrealscript classes in UTGame.

The way their solution is set up is extremely clunky and slow to work with, I don’t really recommend it. Plenty of bugs too especially with the mouse interacting with the main menu, disabled the mouse there eventually since I didn’t need it. At the end of the day the menu just looks and animates kind of nice, in every other way it’s a pain.