/bigbluebutton-client/src/org/bigbluebutton/main/model/BigBlueButtonPreloader.as

https://github.com/markoscalderon/bigbluebutton
ActionScript | 61 lines | 34 code | 7 blank | 20 comment | 2 complexity | 3c5708d9c12c518bcf83930bd3fc4499 MD5 | raw file
  1. /**
  2. * BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
  3. *
  4. * Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
  5. *
  6. * This program is free software; you can redistribute it and/or modify it under the
  7. * terms of the GNU Lesser General Public License as published by the Free Software
  8. * Foundation; either version 3.0 of the License, or (at your option) any later
  9. * version.
  10. *
  11. * BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
  12. * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  13. * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU Lesser General Public License along
  16. * with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
  17. *
  18. */
  19. package org.bigbluebutton.main.model
  20. {
  21. import flash.display.Sprite;
  22. import flash.geom.Rectangle;
  23. import mx.events.RSLEvent;
  24. import mx.preloaders.DownloadProgressBar;
  25. public class BigBlueButtonPreloader extends DownloadProgressBar
  26. {
  27. private var _labelRect:Rectangle = null;
  28. public function BigBlueButtonPreloader()
  29. {
  30. super();
  31. downloadingLabel = "Downloading ...";
  32. initializingLabel = "Starting...";
  33. MINIMUM_DISPLAY_TIME = 0;
  34. }
  35. override public function set preloader(value:Sprite):void{
  36. super.preloader = value;
  37. value.addEventListener(RSLEvent.RSL_ERROR, sharedLibraryLoadingFailed);
  38. }
  39. override protected function get labelRect():Rectangle{
  40. // this is used to change the label width from 100 to 154, to better fit the label text
  41. if (_labelRect == null) {
  42. _labelRect = new Rectangle(
  43. super.labelRect.x,
  44. super.labelRect.y,
  45. super.barRect.width,
  46. super.labelRect.height);
  47. }
  48. return _labelRect;
  49. }
  50. private function sharedLibraryLoadingFailed(e:RSLEvent):void{
  51. // ResourceUtil.getInstance().changeLocale([ResourceUtil.DEFAULT_LANGUAGE]);
  52. }
  53. }
  54. }