home *** CD-ROM | disk | FTP | other *** search
/ The Complete Idiot's Guide to Microsoft Excel 2010 / CIGExcel.iso / Videos / Flash / controller.swf / scripts / frame_1 / DoAction.as
Encoding:
Text File  |  2010-09-09  |  3.7 KB  |  101 lines

  1. function previewSetup(prop, oldVal, newVal)
  2. {
  3.    unwatch("csPreview");
  4.    return newVal;
  5. }
  6. stop();
  7. var timeline = this;
  8. var csConfigFile;
  9. var csColor;
  10. var csPreloader;
  11. var pipX;
  12. var pipY;
  13. var csPreview = "false";
  14. var csButtonNames;
  15. var csPreviewStyle;
  16. var csPreviewInteracts = "true";
  17. var csPreviewPaint = "true";
  18. var csFilesetBookmark;
  19. var csConfigFileDefault = "00_config.xml                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ";
  20. var csColorDefault = "FFFFFF";
  21. var csPreloaderDefault = "                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     ";
  22. background._visible = false;
  23. background._width = Stage.width;
  24. background._height = Stage.height;
  25. var bgColor = new Color(background);
  26. if(csColor == undefined)
  27. {
  28.    csColor = csColorDefault;
  29. }
  30. bgColor.setRGB(parseInt(csColor,16));
  31. background._visible = true;
  32. watch("csPreview",previewSetup);
  33. var contextMenu = new ContextMenu();
  34. contextMenu.hideBuiltInItems();
  35. this.menu = contextMenu;
  36. var ExpressInstall = function()
  37. {
  38.    this.needsUpdate = _root.MMplayerType != undefined ? true : false;
  39. };
  40. ExpressInstall.prototype = {init:function()
  41. {
  42.    if(this.needsUpdate)
  43.    {
  44.       this.loadUpdater();
  45.       return true;
  46.    }
  47.    return false;
  48. },loadUpdater:function()
  49. {
  50.    System.security.allowDomain("fpdownload.macromedia.com");
  51.    this.updater = _root.createEmptyMovieClip("expressInstallHolder",10000000);
  52.    var _self = this;
  53.    this.updater.installStatus = _self.onInstallStatus;
  54.    this.hold = this.updater.createEmptyMovieClip("hold",1);
  55.    this.updater.onEnterFrame = function()
  56.    {
  57.       if(typeof this.hold.startUpdate == "function")
  58.       {
  59.          _self.initUpdater();
  60.          this.onEnterFrame = null;
  61.       }
  62.    };
  63.    var _loc3_ = Math.random();
  64.    this.hold.loadMovie("http://fpdownload.macromedia.com/pub/flashplayer/update/current/swf/autoUpdater.swf?" + _loc3_);
  65. },initUpdater:function()
  66. {
  67.    this.hold.redirectURL = _root.MMredirectURL;
  68.    this.hold.MMplayerType = _root.MMplayerType;
  69.    this.hold.MMdoctitle = _root.MMdoctitle;
  70.    this.hold.startUpdate();
  71. },onInstallStatus:function(msg)
  72. {
  73.    if(msg != "Download.Complete")
  74.    {
  75.       if(msg == "Download.Cancelled")
  76.       {
  77.          getUrl("javascript:alert(\'This content requires a more recent version of the Macromedia Flash Player.\')", "");
  78.       }
  79.       else if(msg == "Download.Failed")
  80.       {
  81.          getUrl("javascript:alert(\'There was an error downloading the Flash Player update. Please try again later, or visit macrmedia.com to download the latest version of the Flash plugin.\')", "");
  82.       }
  83.    }
  84. }};
  85. if(csPreview == "false")
  86. {
  87.    var ExpressInstall = new ExpressInstall();
  88.    if(ExpressInstall.needsUpdate)
  89.    {
  90.       ExpressInstall.init();
  91.    }
  92.    else
  93.    {
  94.       timeline.gotoAndStop(5);
  95.    }
  96. }
  97. else
  98. {
  99.    timeline.gotoAndStop(5);
  100. }
  101.