Some time ago, we transplanted a browser game to the mobile game. The original browser game project contains more than 1000 Flash characters, pet animations, and special effects.
If this is all done again, are you still tired? So I want to play the SWF file directly in Cocos2d (x. (Including scene, scene animation, character, pet actions)
The idea is as follows: parse swf and then draw the various tags in swf. sprite uses opengl es to draw.
Previously, I worked on Flash in the MP4 era. However, in that era, the cpu did not support opengl es and the memory was still 16 Mb.
So you must learn opengl es, NeHe, Redbook, Blue Book, and graphics again... Swf_file_format_spec... You can drop a few large parts in a month.
Then, we will spend another month to complete the code. And integrate the code into cocos2d (x ....
Tired of a word!
Integrated into Cocos2d and Cocos2dx, supports es 1.0 2.0:
CCFlashNode * fn = CCFlashNode: create ("dog.swf ");
Fn-> setPosition (ccp (100,100 ));
Fn-> setScale (0.8f );
Fn-> setFlipx (true );
F n-> setRepeat (true );
Fn-> runAction (true );
AddChild (fn );
Fn-> setFrameEvent (-1, CC_SELECTOR (: fun ));
Fn-> stopAction ();