Step 7: Blitting the Name
To blit the name we will use a stripped down version of the blitting method from the previous tutorials. As the user enters his or her name, the Text alterable string will be changing. So on every frame, simply destroy any blitted text and then re-blit it.- Always
: Destroy
- Always
: Set X position to 28
: Set Y position to 26
: Start loop "Blit" Len(Text( "
" )) times
- On loop "Blit"
: Create
at (0,0) from 
: Find(CharSheet( "
" ), Mid$(Text( "
" ), LoopIndex("Blit"), 1), 0)
: Set X position to X Right( "
" )
The first event destroys any Name Character objects present. Note these are different to the Keypad Character which make up the keypad.
The second event positions the Blitter at the desired starting location and starts a loop called "Blit". You will recall I mentioned, in the previous tutorial, an object scope bug in MMF2. That same bug is an issue when destorying objects in any event that starts a fast loop. Hence why the first two events are separated.
The third event, the fast loop, repeats as many times as there are characters in Text. Each time creating a new Name Character object and setting it's animation frame to the numeric position of the current character in the CharSheet. Lastly, the Blitter is moved to the rightmost edge of the newly created Name Character object ready to blit the next.
For testing purposes I have set the default string of Text to "Leon S Kennedy". If you created the events correctly, it should be displayed when you run the application.

10