1. First, you'll need to download the BWFlash.
2. First, name your movie clip and export to swf:
3. Drag your swf file to BWFlash.
4. Package the export images by TexturePakcer into Assets/images.
5. Drag the demo-swf.bytes into Assets/flashs/, and now your Unity folders like below:
If you can't see demo-tp.txt, reimport the demo.png file.
6. Use it in your codes:
//import the images CCSpriteFrameCache.sharedSpriteFrameCache.addSpriteFramesWithFile ("images/demo"); //load the flash file BBFlash flash = BBFlashFactory.LoadFlash ("flashs/demo-swf.bytes"); //create movie clip from flash BBFlashMovie demo = flash.cteMovie ("wizard"); demo.play (); demo.position = CCDirector.sharedDirector.winSize * 0.5f; addChild (demo); ...
That's it! Now you can see the wizard in unity:
If your image is at a large size, drag your movie clip to the main scene in fla file, and scale it, then BWFlash will export resources with autofit size.