There is no official game titled "Ultimate Flash Sonic". You may be thinking of a Sonic fan game or misremembering the name.
To give a precise answer, please clarify:
With the correct title, I can explain the relevant mechanics.