www.pudn.com > C++_Flash.rar > SWFSprite.h


// SWFSprite.h: interface for the CSWFSprite class. 
// 
////////////////////////////////////////////////////////////////////// 
 
#if !defined(SWFSPRITE_H) 
#define SWFSPRITE_H 
 
#include "Definitions.h" 
#include "SWFObject.h" 
#include "SWFShape.h" 
#include "SWFMorphShape.h" 
#include "SWFAction.h" 
#include "SWFColorTransform.h" 
#include "SWFButton.h" 
 
class CSWFSprite : public CSWFObject 
{ 
public: 
	CSWFSprite(USHORT nID, UCHAR* pName, USHORT depth); 
	virtual ~CSWFSprite(); 
 
public: 
	// Public methods 
	UCHAR* BuildSWFStream(); 
	int GetSWFStreamLength(); 
 
	// Control methods 
	void SetFrameLabel(UCHAR* frameLabel); 
	void ShowFrame(); 
 
	// Action methods 
	void TriggerAction(CSWFAction* pAction); 
 
	// Dictionary methods 
	void DefineObject(CSWFObject* pObject, int depth, bool bShow); 
 
	// Display list methods 
	void AddObject(CSWFObject* pObject, int depth, SWF_COLOR_TRANSFORM* pColorTransform, int ratio, bool bInitialDisplay); 
	void UpdateObject(CSWFObject* pObject, int depth, SWF_COLOR_TRANSFORM* pColorTransform, int ratio); 
	void RemoveObject(int depth); 
 
	// Transformation methods 
	void Scale(float scaleX, float scaleY); 
	void Rotate(float angle); 
	void Translate(float translateX, float translateY); 
	void Shear(float shearX, float shearY); 
 
private: 
	// Private methods 
	void DisplayObject(CSWFObject* pObject, int depth, bool bInitialDisplay, SWF_COLOR_TRANSFORM* pColorTransform, int ratio); 
 
private: 
	// Private members 
	SWF_DEFINE_SPRITE_TAG m_Sprite; 
	UCHAR* m_SWFStream; 
	int m_SWFStreamLength; 
 
public: 
	// Public members 
	CSWFMatrix m_TransformationMatrix; 
	UCHAR* m_Name; 
 
}; 
 
#endif // !defined(SWFSPRITE_H)