Permalink
Browse files

[MovieClip] Add enabled property

  • Loading branch information...
1 parent 675ab7d commit 43b5b4b99f76f5dbf1c34e221d08165be726a35a @aajanki aajanki committed Mar 4, 2013
Showing with 6 additions and 2 deletions.
  1. +5 −2 src/scripting/flash/display/flashdisplay.cpp
  2. +1 −0 src/scripting/flash/display/flashdisplay.h
@@ -1015,17 +1015,20 @@ void MovieClip::sinit(Class_base* c)
c->setDeclaredMethodByQName("gotoAndPlay","",Class<IFunction>::getFunction(gotoAndPlay),NORMAL_METHOD,true);
c->setDeclaredMethodByQName("nextFrame","",Class<IFunction>::getFunction(nextFrame),NORMAL_METHOD,true);
c->setDeclaredMethodByQName("addFrameScript","",Class<IFunction>::getFunction(addFrameScript),NORMAL_METHOD,true);
+ REGISTER_GETTER_SETTER(c, enabled);
}
+ASFUNCTIONBODY_GETTER_SETTER(MovieClip, enabled);
+
void MovieClip::buildTraits(ASObject* o)
{
}
-MovieClip::MovieClip(Class_base* c):Sprite(c),fromDefineSpriteTag(false),totalFrames_unreliable(1)
+MovieClip::MovieClip(Class_base* c):Sprite(c),fromDefineSpriteTag(false),totalFrames_unreliable(1),enabled(true)
{
}
-MovieClip::MovieClip(Class_base* c, const FrameContainer& f, bool defineSpriteTag):Sprite(c),FrameContainer(f),fromDefineSpriteTag(defineSpriteTag),totalFrames_unreliable(frames.size())
+MovieClip::MovieClip(Class_base* c, const FrameContainer& f, bool defineSpriteTag):Sprite(c),FrameContainer(f),fromDefineSpriteTag(defineSpriteTag),totalFrames_unreliable(frames.size()),enabled(true)
{
//For sprites totalFrames_unreliable is the actual frame count
//For the root movie, it's the frame count from the header
@@ -506,6 +506,7 @@ friend class ParserThread;
/* This is read from the SWF header. It's only purpose is for flash.display.MovieClip.totalFrames */
uint32_t totalFrames_unreliable;
void constructionComplete();
+ ASPROPERTY_GETTER_SETTER(bool, enabled);
public:
RunState state;
MovieClip(Class_base* c);

0 comments on commit 43b5b4b

Please sign in to comment.