robertdoo / flv-flash-fullscreen-video-player

Automatically exported from code.google.com/p/flv-flash-fullscreen-video-player
0 stars 0 forks source link

align of the preloader: possibility to center #13

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
There should be an option to display the preloader in the middle, not only in 
the upper left 
corner.

Original issue reported on code.google.com by florianp...@gmail.com on 22 Apr 2008 at 6:17

GoogleCodeExporter commented 9 years ago
Add in the file 'Preloader.as' a new function:

// COPY ------------------------------------------------------------
public function centerPreloader(w:Number, h:Number):void {
  // center
  this.x = ((w - this.width) / 2) - (this.width / 2);
  this.y = ((h - this.height) / 2) - (this.height / 2);         
}
// COPY ------------------------------------------------------------

In the file 'FLVPlayer.as' (function start) add after
the line

// FIND ------------------------------------------------------------
this.addChild(myPreloader);
// FIND ------------------------------------------------------------

this follow line:

// COPY ------------------------------------------------------------
myPreloader.centerPreloader(myParam.videoWidth, myParam.videoHeight);
// COPY ------------------------------------------------------------

Regards mk.keck

Original comment by kec...@googlemail.com on 16 Dec 2010 at 1:13