Advertisement
WindowsTV

Untitled

Nov 15th, 2015
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var PARTY;
  2. var PARTY_ICON;
  3. var PARTY_ICON_INSTANCE_NAME = "partyIcon";
  4. function showIcons()
  5. {
  6.     ICONS._visible = true;
  7.     MAIL_ICON._visible = true;
  8.     MOD_ICON._visible = true;
  9.     EPFMissionHUDLayer._visible = true;
  10.     var _loc2 = SHELL.isPlayerMascotById(SHELL.getMyPlayerId());
  11.     MOD_ICON._visible = !shell.getIsRoomIgloo() || _loc2;
  12.     if (shell.getIsRoomIgloo())
  13.     {
  14.         if (_loc2)
  15.         {
  16.             MOD_ICON._x = 137;
  17.         } // end if
  18.     }
  19.     else
  20.     {
  21.         MOD_ICON._x = defaultModIconPos;
  22.     } // end else if
  23.     if (com.clubpenguin.login.LocalData.getStoredNewspaperIssue() == getCurrentNews())
  24.     {
  25.         NEWS_ICON.new_mc._visible = false;
  26.     }
  27.     else
  28.     {
  29.         NEWS_ICON.new_mc._visible = true;
  30.     } // end else if
  31.     NEWS_ICON.news_btn.onRelease = onNewsButtonRelease;
  32.     showPhoneIcon();
  33.     MAIL_ICON.mail_btn.onRelease = function ()
  34.     {
  35.         shell.showMail();
  36.     };
  37.     showMapIcon();
  38.     EGG_TIMER_ICON.clock_btn.onRelease = function ()
  39.     {
  40.         showContent("egg_timer");
  41.     };
  42.     MOD_ICON.shield_btn.onRelease = function ()
  43.     {
  44.         if (shell.isPlayerMascotById(shell.getMyPlayerId()))
  45.         {
  46.             var _loc1 = interface_mc.widgets_mc.mascotScriptClip;
  47.             if (_loc1 == null)
  48.             {
  49.                 _loc1 = interface_mc.widgets_mc.attachMovie("com.clubpenguin.ui.MascotScript", "mascotScriptClip", interface_mc.widgets_mc.getNextHighestDepth());
  50.                 centerWidget(_loc1);
  51.             } // end if
  52.             _loc1.show();
  53.         }
  54.         else
  55.         {
  56.             showContent("mod_help");
  57.         } // end else if
  58.     };
  59.     if (displayScavengerHunt())
  60.     {
  61.         showPartyIcon("scavenger_hunt_icon");
  62.     }
  63.     else if (displayFairTickets())
  64.     {
  65.         showPartyIcon("scavenger_hunt_icon");
  66.     }
  67.     else if (displayPartyIcon())
  68.     {
  69.         showPartyIcon("party_icon");
  70.     } // end else if
  71. } // End of the function
  72. function displayPartyIcon()
  73. {
  74.     var _loc1 = SHELL.getPartyOptions();
  75.     if (_loc1.party_icon_active && !SHELL.isInSoloRoom())
  76.     {
  77.         return (true);
  78.     }
  79.     else if (_loc1.party_icon_active == undefined)
  80.     {
  81.     } // end else if
  82.     return (false);
  83. } // End of the function
  84. function showPartyIcon(partyIcon)
  85. {
  86.     var _loc2 = new com.clubpenguin.hybrid.HybridMovieClipLoader();
  87.     if (PARTY_ICON)
  88.     {
  89.         setPartyIconPositionForLikeWindow();
  90.         return;
  91.     } // end if
  92.     var _loc3 = SHELL.getPath(partyIcon);
  93.     var _loc4 = com.clubpenguin.util.URLUtils.getCacheResetURL(_loc3);
  94.     PARTY_ICON = ICONS.createEmptyMovieClip(PARTY_ICON_INSTANCE_NAME, 1);
  95.     _loc2.addEventListener(com.clubpenguin.hybrid.HybridMovieClipLoader.EVENT_ON_LOAD_COMPLETE, com.clubpenguin.util.Delegate.create(this, onPartyIconLoad));
  96.     _loc2.loadClip(_loc4, PARTY_ICON, "icons.as loadPartyIcon()");
  97. } // End of the function
  98. function onPartyIconLoad(event)
  99. {
  100.     if (EGG_TIMER_ICON._visible)
  101.     {
  102.         PARTY_ICON._x = PARTY_ICON._x - 58;
  103.     } // end if
  104.     defaultPartyIconPos = PARTY_ICON._x;
  105.     setPartyIconPositionForLikeWindow();
  106. } // End of the function
  107. function setPartyIconPositionForLikeWindow()
  108. {
  109.     if (shell.getIsRoomIgloo())
  110.     {
  111.         PARTY_ICON._x = defaultPartyIconPos - 100;
  112.     }
  113.     else
  114.     {
  115.         PARTY_ICON._x = defaultPartyIconPos;
  116.     } // end else if
  117. } // End of the function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement