home *** CD-ROM | disk | FTP | other *** search
- _global.FPS = 15;
- this.initPlay = function(fileType)
- {
- this.VIDEO_NAVIGATION.setEnabled(true);
- this.VIDEO_NAVIGATION.start();
- if(fileType == "MP3" && !this.MUSIC)
- {
- this.attachMovie("MUSIC","MUSIC",++this.depth);
- this.MUSIC._x = this.VIDEO._x;
- this.MUSIC._y = this.VIDEO._y;
- }
- if(fileType == "JPEG")
- {
- this.bt_POSITION_SLIDER._visible = false;
- }
- else
- {
- this.bt_POSITION_SLIDER._visible = true;
- }
- };
- this.loadVideo = function(video, fileType)
- {
- var arr;
- var index;
- if(this.VIDEO.getBytesTotal() != null && this.VIDEO.getBytesTotal() != 0 && this.VIDEO.getBytesTotal() < 100 || this.VIDEO.getBytesLoaded() < this.VIDEO.getBytesTotal())
- {
- return undefined;
- }
- if(this.VIDEO)
- {
- this.VIDEO.unloadMovie();
- this.VIDEO.removeMovieClip();
- }
- this.VIDEO = this.createEmptyMovieClip("VIDEO",++this.depth);
- this.VIDEO._x = 218;
- this.VIDEO._y = 47;
- this.VIDEO_NAVIGATION.register("VIDEO",this.VIDEO);
- this.VIDEO_NAVIGATION.register("PLAY",this.bt_PLAY);
- this.VIDEO_NAVIGATION.register("PAUSE",this.bt_PAUSE);
- this.VIDEO_NAVIGATION.register("REWIND",this.bt_REWIND);
- this.VIDEO_NAVIGATION.register("FORWARD",this.bt_FORWARD);
- this.VIDEO_NAVIGATION.register("MUTE",bt_MUTE);
- this.VIDEO_NAVIGATION.register("VOLUME_SLIDER",bt_VOLUME_SLIDER);
- this.VIDEO_NAVIGATION.register("VOLUME_SLIDER_BAR",bt_VOLUME_SLIDER_BAR);
- this.VIDEO_NAVIGATION.register("POSITION_SLIDER",bt_POSITION_SLIDER);
- this.VIDEO_NAVIGATION.register("POSITION_SLIDER_BAR",bt_POSITION_SLIDER_BAR);
- if(!this.LOADING)
- {
- this.attachMovie("LOADING","LOADING",++this.depth);
- this.LOADING._x = this.VIDEO._x;
- this.LOADING._y = this.VIDEO._y;
- }
- if(this.MUSIC)
- {
- this.MUSIC.removeMovieClip();
- }
- this.VIDEO.loadMovie(video);
- this.loadingInterval = setInterval(this,"onLoadingInterval",20,fileType);
- };
- this.onLoadingInterval = function(fileType)
- {
- if(!(this.VIDEO.getBytesTotal() > 100000 && this.VIDEO.getBytesLoaded() > 100000))
- {
- if(this.VIDEO.getBytesTotal() < 100 || this.VIDEO.getBytesLoaded() < this.VIDEO.getBytesTotal())
- {
- return undefined;
- }
- }
- this.LOADING.removeMovieClip();
- this.initPlay(fileType);
- clearInterval(this.loadingInterval);
- };
-