Index: branches/avi_play/src/lib/graphics/importer/media_container.cc
===================================================================
--- branches/avi_play/src/lib/graphics/importer/media_container.cc	(revision 6289)
+++ branches/avi_play/src/lib/graphics/importer/media_container.cc	(revision 6290)
@@ -34,11 +34,5 @@
 MediaContainer::MediaContainer(const char* filename)
 {
-  /* set the class id for the base object */
-  this->setClassID(CL_MEDIA_CONTAINER, "MediaContainer");
-
-  /* register all formats and codecs */
-  av_register_all();
-
-  fps = 0;
+  this->init();
 
   if (filename != NULL)
@@ -48,11 +42,5 @@
 MediaContainer::MediaContainer()
 {
-  /* set the class id for the base object */
-  this->setClassID(CL_MEDIA_CONTAINER, "MediaContainer");
-
-  /* register all formats and codecs */
-  av_register_all();
-
-  fps = 0;
+  this->init();
 }
 
@@ -83,4 +71,15 @@
   av_close_input_file(format_context);
 
+}
+
+void MediaContainer::init()
+{
+  /* set the class id for the base object */
+  this->setClassID(CL_MEDIA_CONTAINER, "MediaContainer");
+
+  /* register all formats and codecs */
+  av_register_all();
+
+  fps = 0;
 }
 
Index: branches/avi_play/src/lib/graphics/importer/media_container.h
===================================================================
--- branches/avi_play/src/lib/graphics/importer/media_container.h	(revision 6289)
+++ branches/avi_play/src/lib/graphics/importer/media_container.h	(revision 6290)
@@ -53,4 +53,5 @@
   ~MediaContainer();
 
+  void init();
   SDL_Surface* getFrame(int frame_number);
   SDL_Surface* getNextFrame();
Index: branches/avi_play/src/lib/graphics/importer/movie_player.cc
===================================================================
--- branches/avi_play/src/lib/graphics/importer/movie_player.cc	(revision 6289)
+++ branches/avi_play/src/lib/graphics/importer/movie_player.cc	(revision 6290)
@@ -35,4 +35,6 @@
 {
   media_container = new MediaContainer(filename);
+
+  this->init();
 }
 
@@ -40,4 +42,6 @@
 {
   media_container = new MediaContainer();
+
+  this->init();
 }
 
@@ -47,5 +51,22 @@
 MoviePlayer::~MoviePlayer()
 {
+  delete media_container;
+}
 
+void MoviePlayer::init()
+{
+  status = STOP;
+
+  tex = new Texture();
+  material = new Material;
+
+  material->setDiffuseMap("maps/radialTransparency.png");
+
+  model = new PrimitiveModel(PRIM_PLANE, 10.0);
+
+  LightManager* lightMan = LightManager::getInstance();
+  lightMan->setAmbientColor(.1,.1,.1);
+  (new Light())->setAbsCoor(5.0, 10.0, 40.0);
+  (new Light())->setAbsCoor(-10, -20, -100);
 }
 
@@ -62,30 +83,46 @@
 void MoviePlayer::start(unsigned int start_frame)
 {
-
+  status = PLAY;
 }
 
 void MoviePlayer::resume()
 {
-
+  status = PLAY;
 }
 
 void MoviePlayer::pause()
 {
-
+  status = PAUSE;
 }
 
 void MoviePlayer::stop()
 {
-
+  status = STOP;
 }
 
 void MoviePlayer::tick(float time)
 {
+  surface = media_container->getNextFrame();
 
+  if(surface == NULL)
+    texture = NULL;
+  else
+  {
+    bool hasAlpha;
+    SDL_Surface* newSurf = tex->prepareSurface(surface, hasAlpha);
+    if (newSurf != NULL)
+      texture = Texture::loadTexToGL(newSurf);
+    else
+      texture = NULL;
+  }
 }
 
 const void MoviePlayer::draw()
 {
+  material->select();
+  glBindTexture(GL_TEXTURE_2D, texture);
+  model->draw();
 
+  LightManager::getInstance()->draw();
 }
 
@@ -97,9 +134,9 @@
 float MoviePlayer::getSpeed()
 {
-
+  return speed;
 }
 
 const MP_STATUS MoviePlayer::getStatus()
 {
-
+  return status;
 }
Index: branches/avi_play/src/lib/graphics/importer/movie_player.h
===================================================================
--- branches/avi_play/src/lib/graphics/importer/movie_player.h	(revision 6289)
+++ branches/avi_play/src/lib/graphics/importer/movie_player.h	(revision 6290)
@@ -10,5 +10,10 @@
 #include "glincl.h"
 #include "sdlincl.h"
+
 #include "media_container.h"
+#include "light.h"
+#include "texture.h"
+#include "material.h"
+#include "primitive_model.h"
 
 /* include base_object.h since all classes are derived from this one */
@@ -19,4 +24,7 @@
 
 class MediaContainer;
+class Model;
+class Material;
+class Texture;
 
 /* The state of the MoviePlayer */
@@ -27,6 +35,4 @@
 };
 
-
-
 class MoviePlayer : public BaseObject
 {
@@ -34,5 +40,14 @@
 private:
 
-  MediaContainer* media_container;	
+  MediaContainer* media_container;
+  Model* model;
+  Material* material;
+  Texture* tex;
+
+  SDL_Surface* surface;
+  GLuint texture;
+
+  MP_STATUS status;	
+  float speed;  
 
 public:
@@ -42,4 +57,5 @@
   ~MoviePlayer();
 
+  void init();
   void loadMovie(const char* filename);
 
Index: branches/avi_play/src/lib/graphics/importer/texture.cc
===================================================================
--- branches/avi_play/src/lib/graphics/importer/texture.cc	(revision 6289)
+++ branches/avi_play/src/lib/graphics/importer/texture.cc	(revision 6290)
@@ -196,5 +196,5 @@
                                0xFF000000
 #else
-                                   0xFF000000,
+                               0xFF000000,
                                0x00FF0000,
                                0x0000FF00,
