The Flash File
Planning Ahead -
It's always a good idea to know what you want to do already. Your GDD should have very precise requirements out of the HUD that you'll be working with, and as such, you can better plan, and prepare for the set up of the Flash file with a good GDD or goal in mind.
Now, my current project involved creating a HUD that would keep track of inventory, as well as display status messages, be the main menu and be an alternative to player interference and surprise.
It is best to have each MovieClip in the Flash file have its own animation. You'll be calling that animation using: with.
To call a movie object inside a movie object:
This is what you will include in any function that will require animating ExampleMovieClip or any movie clip you make. Note that "ExampleMovieClip" is the name of the instance of a movie clip, and that "ExampleMovieClipPlay" is a label inside that movie clip.
This code is telling Flash to find that specific instance of a movie clip, and find the label "ExampleMovieClipPlay" and to play that movie clip from there.
The way you use this depends on the situation, so I'll bring up what I did.
1) Scary FaceThe concept is simple. Have a scary face show up when they don't expect it.
Execution: create a movie clip. Label the instance of it (click on the movie clip after placing it), as RightFace (or whatever, I used RightFace, to keep track of where it was).
On the first frame put the actionscript
Change the alpha to 0 in the beginning, animate it however you want (start from the 2nd frame, leave the first frame as a stop with alpha 0. Have the alpha reset to 0 at the end of the animation.
Setting up for the function: Label the 2nd frame of animation as something that you will use for the other animations like this one, such as, "Scare" or "Play".
Create a function:function ScaryFace()
Now whenever you want to use ScaryFace(), just call it, and it will animate! You can call it from UDK, from a key press, randomly through a timer! Whatever!
This technique will be used throughout the project, so keep it in mind!