Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var LOCAL_PLAYER_WIDGET = interface_mc.widgets_mc.player_mc;
- function showPlayerWidgetMenu()
- {
- var _loc11 = LOCAL_PLAYER_WIDGET.art_mc;
- var _loc4 = _global.getCurrentInterface().getItemList();
- var _loc6 = [];
- var _loc14 = _global.getCurrentInterface().PLAYER_WIDGET_MENU_MAX_ITEMS;
- var _loc13 = _global.getCurrentInterface().player_widget_menu_type;
- var _loc19 = _global.getCurrentInterface().player_widget_menu_text;
- _loc11.sort_mc.sort_txt.text = _loc19;
- if (_loc13 != undefined)
- {
- if (_loc13 == "INVENTORY_TYPE_ALL")
- {
- _loc6 = _loc4;
- }
- else if (_loc13 == "INVENTORY_TYPE_AWARD")
- {
- var _loc17 = SHELL.INVENTORY_TYPE_FLAG;
- var _loc16 = SHELL.INVENTORY_TYPE_OTHER;
- var _loc15 = SHELL.INVENTORY_TYPE_PHOTO;
- for (var _loc8 = 0; _loc8 < _loc4.length; ++_loc8)
- {
- var _loc9 = _loc4[_loc8].type;
- if (_loc9 == _loc17 || _loc9 == _loc16 || _loc9 == _loc15)
- {
- _global.getCurrentInterface().traceOject(_loc4[_loc8]);
- _loc6.push(_loc4[_loc8]);
- } // end if
- } // end of for
- }
- else
- {
- for (var _loc8 = 0; _loc8 < _loc4.length; ++_loc8)
- {
- if (_loc4[_loc8].type == SHELL[_loc13])
- {
- _loc6.push(_loc4[_loc8]);
- } // end if
- } // end of for
- } // end else if
- }
- else
- {
- _loc6 = _loc4;
- } // end else if
- _loc6 = _loc6.slice();
- for (var _loc7 = 0; _loc7 < _loc6.length; ++_loc7)
- {
- if (_loc6[_loc7].hidden == true)
- {
- _loc6.splice(_loc7, 1);
- } // end if
- } // end of for
- var _loc18 = Math.ceil(_loc6.length / _loc14) - 1;
- var _loc12 = _global.getCurrentInterface().paginateArray(_loc6, _global.getCurrentInterface().player_widget_menu_page, _loc14);
- if (_global.getCurrentInterface().player_widget_menu_page < _loc18)
- {
- _loc11.next_btn.onRelease = com.clubpenguin.util.Delegate.create(this, _global.getCurrentInterface().onNextButtonReleased);
- }
- else
- {
- _loc11.next_btn.onRelease = undefined;
- } // end else if
- if (player_widget_menu_page > 0)
- {
- _loc11.back_btn.onRelease = com.clubpenguin.util.Delegate.create(this, _global.getCurrentInterface().onBackButtonReleased);
- }
- else
- {
- _loc11.back_btn.onRelease = undefined;
- } // end else if
- if (_loc11.menu_mc_holder_custom.menu_mc)
- {
- _loc11.menu_mc_holder_custom.menu_mc.removeMovieClip();
- } // end if
- _loc11.menu_mc_holder_custom.attachMovie(_global.getCurrentInterface().INVENTORY_LIST_LINKAGE_ID, "menu_mc", 1, {_x: 0, _y: 0});
- for (var _loc5 = 0; _loc5 < _loc14; ++_loc5)
- {
- var _loc3 = _loc12[_loc5];
- var _loc2 = _loc11.menu_mc_holder_custom.menu_mc["item" + _loc5 + "_mc"];
- if (_loc3 != undefined && !_loc3.hidden)
- {
- var _loc10 = !_loc3.is_member || _loc3.is_member && _global.getCurrentInterface().isMember();
- if (_loc10)
- {
- _loc2.gotoAndStop(1);
- _loc2.button_btn.item_id = _loc3.id;
- _loc2.button_btn.onRelease = function ()
- {
- _global.getCurrentInterface().clickPlayerWidgetItem(this.item_id);
- };
- }
- else
- {
- _loc2.gotoAndStop(2);
- _loc2.button_btn.onRelease = com.clubpenguin.util.Delegate.create(this, showMemberItemNotAvailablePrompt, _loc3);
- } // end else if
- _loc2.loader_mc.gotoAndStop(1);
- _loc2.icon_mc._visible = false;
- _global.getCurrentInterface().loadPlayerWidgetMenuIcon(_loc2.icon_mc, _loc3.id);
- continue;
- } // end if
- _loc2.loader_mc.gotoAndStop(3);
- _loc2.gotoAndStop(3);
- _loc2.button_btn.onRelease = undefined;
- } // end of for
- } // End of the function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement