how to use attack and run animation simultaneously

will this work for 2d animations (flipbook) also.