22 #ifndef GNASH_MOVIECLIP_H
23 #define GNASH_MOVIECLIP_H
32 #include <boost/ptr_container/ptr_list.hpp>
33 #include <boost/intrusive_ptr.hpp>
48 class LoadVariablesThread;
54 class PlaceObject2Tag;
90 typedef std::map<ObjectURI, TextFields, ObjectURI::LessThan>
127 virtual Movie* get_root()
const;
129 virtual bool trackAsMenu();
135 void queueEvent(
const event_id&
id,
int lvl);
146 virtual SWFRect getBounds()
const;
149 virtual bool pointInShape(boost::int32_t
x, boost::int32_t
y)
const;
152 virtual bool pointInVisibleShape(boost::int32_t
x, boost::int32_t
y)
const;
158 virtual bool pointInHitableShape(boost::int32_t
x, boost::int32_t
y)
const;
163 return _currentFrame;
168 return _def ? _def->get_frame_count() : 1;
178 return _def ? _def->get_loading_frame() : 1;
185 return isDynamic() ? 0 : _def->get_bytes_total();
192 return isDynamic() ? 0 : _def->get_bytes_loaded();
198 return _def ? _def->get_frame_size() :
r;
211 void set_background_color(
const rgba&
color);
217 virtual bool mouseEnabled()
const;
227 const DisplayObject* findDropTarget(boost::int32_t
x, boost::int32_t
y,
241 virtual void advance();
248 DSOEXPORT void goto_frame(
size_t target_frame_number);
266 bool get_frame_number(
const as_value& frame_spec,
size_t& frameno)
const;
269 bool goto_labeled_frame(
const std::string& label);
287 _displayList.swapDepths(ch1, newdepth);
342 void remove_display_object(
int depth,
int );
366 virtual void construct(
as_object* initObj = 0);
390 if (!_callingFrameActions) queueAction(*a);
391 else execute_action(*a);
426 virtual void getLoadedMovie(
Movie* newMovie);
443 void loadVariables(
const std::string& urlstr,
444 VariablesMethod sendVarsMethod);
474 virtual void call_frame_actions(
const as_value& frame_spec);
494 MovieClip* duplicateMovieClip(
const std::string& newname,
495 int newdepth,
as_object* init_object = 0);
506 void notifyEvent(
const event_id&
id);
532 return _displayList.getNextHighestDepth();
538 void setStreamSoundId(
int id);
561 void removeMovieClip();
572 virtual bool handleFocus();
577 DSOEXPORT void setVariables(
const MovieVariables& vars);
582 virtual void visitNonProperties(
KeyVisitor&
v)
const;
586 void cleanupDisplayList();
601 void constructAsScriptObject();
612 virtual int getDefinitionVersion()
const;
619 virtual bool unloadChildren();
631 virtual void markOwnResources()
const;
635 _displayList.placeDisplayObject(ch, depth);
641 void processCompletedLoadVariableRequests();
657 void executeFrameTags(
size_t frame,
DisplayList& dlist,
661 void stopStreamSound();
669 bool isEnabled()
const;
676 bool hitTestDrawable(boost::int32_t
x, boost::int32_t
y)
const;
716 void restoreDisplayList(
size_t targetFrame);
719 void increment_frame_and_check_for_loop();
722 void cleanup_textfield_variables();
726 const boost::intrusive_ptr<const movie_definition> _def;
729 typedef boost::ptr_list<LoadVariablesThread> LoadVariablesThreads;
736 LoadVariablesThreads _loadVariableRequests;
744 PlayState _playState;
752 std::auto_ptr<TextFieldIndex> _text_variables;
754 std::string _droptarget;
757 size_t _currentFrame;
760 int m_sound_stream_id;
767 bool _flushedOrphanedTags;
770 bool _callingFrameActions;
779 #endif // GNASH_SPRITE_INSTANCE_H