example code for parsing flash image