Flash is the perfect one for these kind of tools. The same tool is already developed in many sites with the help of FLASH,PHP and MySQL. Let I will explain you generally how we can do this:
1. MYSQL is one of the dbms software that we can store datas. In our scenario, we can store all details about the fabrics. For example, maintaining Fabric id, item name, thumbnail image path, big image path, date, time etc.
So the conclusion is the details about everything is stored in database.
2. PHP is one of the software that we can develop many web oriented development things like loading fabric item details from the database and display it for the user.
3. The option buttons, categories, collor systems and whole interface is designed in flash and show to the user in a more animated and attractive way.
Let I will explain the communication:
Flash (Interface Designed) -> PHP (collecting details from database and send it to flash to display the things more attractively) -> MYSQL (details about everything)