home *** CD-ROM | disk | FTP | other *** search
- class VersionMonkey extends com.pixelconsumption.core.CoreComponent
- {
- var isLivePreview;
- var __testFile;
- var __productName;
- var __buildVersion;
- var __date;
- var __devEmail;
- var __developerName;
- var __noEmail;
- var __bugWebsite;
- function VersionMonkey()
- {
- super();
- this.init();
- }
- function init()
- {
- if(this.isLivePreview)
- {
- this._visible = true;
- }
- else
- {
- this._visible = false;
- }
- if(this.__testFile)
- {
- this.createMenu();
- }
- }
- function createMenu()
- {
- var _loc2_ = new ContextMenu();
- _loc2_.hideBuiltInItems();
- _loc2_.customItems.push(new ContextMenuItem(this.__productName,this.nullHandler));
- _loc2_.customItems.push(new ContextMenuItem("Version " + this.__buildVersion,this.nullHandler));
- _loc2_.customItems.push(new ContextMenuItem(this.__date,this.nullHandler));
- if(this.__devEmail != "" && this.__developerName != "")
- {
- var _loc3_ = new ContextMenuItem("Email " + this.__developerName);
- _loc2_.customItems.push(_loc3_);
- _loc3_.separatorBefore = true;
- _loc3_.onSelect = mx.utils.Delegate.create(this,this.emailDeveloper);
- }
- else
- {
- this.__noEmail = true;
- }
- if(this.__bugWebsite != "" && this.__noEmail == true)
- {
- var _loc4_ = new ContextMenuItem("Go to Bug Website");
- _loc2_.customItems.push(_loc4_);
- _loc4_.separatorBefore = true;
- _loc4_.onSelect = mx.utils.Delegate.create(this,this.getWebsite);
- }
- else if(this.__bugWebsite != "")
- {
- _loc4_ = new ContextMenuItem("Go to Bug Website");
- _loc2_.customItems.push(_loc4_);
- _loc4_.onSelect = mx.utils.Delegate.create(this,this.getWebsite);
- }
- this._parent.menu = _loc2_;
- }
- function nullHandler()
- {
- }
- function emailDeveloper()
- {
- this.getURL("mailto:" + this.__devEmail);
- }
- function getWebsite()
- {
- this.getURL(this.__bugWebsite);
- }
- function set developerName(dn)
- {
- this.__developerName = dn;
- }
- function set buildVersion(bv)
- {
- this.__buildVersion = bv;
- }
- function set productName(pn)
- {
- this.__productName = pn;
- }
- function set date(d)
- {
- this.__date = d;
- }
- function set devEmail(de)
- {
- this.__devEmail = de;
- }
- function set bugWebsite(bw)
- {
- this.__bugWebsite = bw;
- }
- function set testFile(tf)
- {
- this.__testFile = tf;
- }
- }
-