+void AnimatedImageVisual::OnDoAction( const Dali::Property::Index actionId, const Dali::Property::Value& attributes )
+{
+ // Check if action is valid for this visual type and perform action if possible
+
+ switch ( actionId )
+ {
+ case DevelAnimatedImageVisual::Action::PAUSE:
+ {
+ // Pause will be executed on next timer tick
+ mActionStatus = DevelAnimatedImageVisual::Action::PAUSE;
+ break;
+ }
+ case DevelAnimatedImageVisual::Action::PLAY:
+ {
+ if( IsOnStage() && mActionStatus != DevelAnimatedImageVisual::Action::PLAY )
+ {
+ mFrameDelayTimer.Start();
+ }
+ mActionStatus = DevelAnimatedImageVisual::Action::PLAY;
+ break;
+ }
+ case DevelAnimatedImageVisual::Action::STOP:
+ {
+ // STOP reset functionality will actually be done in a future change
+ // Stop will be executed on next timer tick
+ mCurrentFrameIndex = 0;
+ mActionStatus = DevelAnimatedImageVisual::Action::STOP;
+ break;
+ }
+ }
+}
+