René Nyffenegger's collection of things on the web | |
René Nyffenegger on Oracle - Most wanted - Feedback
- Follow @renenyffenegger
|
Action [Ming wrapper class] | ||
The sourceAction.h
#ifndef ACTION_H #define ACTION_H #include <string> #include "ming.h" #include "Character_.h" /* Sprites have the following properties: -------------------------------------- x y xScale yScale currentFrame read/only totalFrames read/only alpha (transparency level) visible: 1=on, 0=off (?) width read/only height read/only rotation target read/only framesLoaded read/only name dropTarget read/only url read/only highQuality: 1=high, 0=low (?) focusRect ??? soundBufTime ??? */ class Action { friend class Button; friend class Movie; friend class MovieClip; friend class DisplayClip; public: Action(std::string const& script); private: SWFAction action_; protected: // HACK? virtual SWFBlock_s* swf_block() const; }; #endif Action.cpp
#include "Action.h" Action::Action(std::string const& script) { action_ = compileSWFActionCode(script.c_str()); } SWFBlock_s* Action::swf_block() const { return reinterpret_cast<SWFBlock_s*>(action_); } Examples
The following examples demonstrate this class:
|