Credits* To Tybone10
Hello!
I’ve recently been seeing a lot of people wanting a “party switcher”, a tutorial on how to allow users to change what party they see.
I’ve also seen many users say “seperate mediaservers”. NO.
There’s a much easier way to do it, and I’ll show you how!
You’re going to need two things:
A loader with an ActionScript 2 file containing the loader script
A folder called “parties” in /play/v2/content/global/rooms/
Now, open your loader.as/iCPLoader.as/YourCPPSName.as/whatever. You’ll want to go near the line that looks like this:
HANDLERS.INTERFACE = {};
Under that, paste the following code:
this.party = _root.party;
}
Now, find this line:
GLOBAL_CRUMBS.redemption_server.port = 9875;```
Under that, paste this:
```if (this.party != "none") {
switch(this.party) {
case "PARTY_NAME": {
var rooms = new Array("attic", "beach", "beacon", "berg", "book", "cove", "dance", "dock", "forest", "forts", "lodge", "mtn", "plaza", "town", "village");
for (var rm in rooms)
{
GLOBAL_CRUMBS.room_crumbs[rooms[rm]].path = "http://MEDIASERVER_URL/play/v2/content/global/rooms/parties/PARTY_NAME/" + rooms[rm] + ".swf?c=" + random(9999999);
}
break;
}
}
}```
Basically, case "PARTY_NAME" will be the name of the party. If you wanted the Christmas party, you could do "christmas09". You need to then set the rooms array to each of the rooms the party will be in. If you don't want to do that, you can try this method (keep in mind you will need each room SWF in the folder, even if it isn't a party swf):
```case "PARTY_NAME":
{
var path = '';
for (var rm in GLOBAL_CRUMBS.room_crumbs)
{
path = GLOBAL_CRUMBS.room_crumbs[rm].path
GLOBAL_CRUMBS.room_crumbs[rm].path = 'http://MEDIASERVER_URL/play/v2/content/global/rooms/parties/PARTY_FOLDER/' + path
}
break;
} ```
Then, to activate the party, simply add the variable "party" to your loader.swf when loading it. For example, if you're loading it directly, add ?party=christmas09 (or w/e party you're loading). If you're loading it through html, add the flashvar "party=christmas09" (<param name='FlashVars' value='party=christmas09'/>).
```var HANDLEEVARS = {};```
or
```public var HANDLERVARS:Object = {};```
Add:
```var party = 'none';```
If you see "public" before the variables, add this one instead.
```public var party = 'none';```
This post is for shits and giggles, Thank you for coming to my ted talk.