I'm creating a ScaleForm menu at the moment that would be a lot easier if it was data-driven.
So say my ScaleForm has some movie clip somewhere (that has some text, an icon, etc) to represent an ability. For each ability in the game I dynamically set the text, icon etc to the data for the ability. If I have a menu which lists all the abilities in the game, it would be nice to be able to make this data-driven, rather than hard-coding each ability into the flash file. This would also save a lot of re-work when re-ordering, adding or removing new abilities.
In looking through GFxMoviePlayer.uc, I see:
native function GFxObject CreateObject(string ASClass, optional class<GFxObject> type, optional array<ASValue> args);
This looks close to what I want - except I'd have to then define everything in ActionScript. Can I just clone an existing movie clip, giving it a new name? So say my flash file has a template movie clip, can I then clone it as necessary, and give the clones the data-driven values for display?
Otherwise I guess I'll just have to go create a ton of identical movie clips (more than I'll ever need) in the flash file, then hide those I don't need? And if abilities get re-ordered or changed, we'll just have to remember to update the menus too?



Reply With Quote

Bookmarks