Cp-s05box Wiki
SWF Tricks
2021 notice:
To avoid Adobe from blocking flash rendering, set your computer time to 2020 or earlier while decompiling and/or rendering swf files as a temporary fix.

The following tutorial is for generating large images of penguin outfits, both in-game and on a player card.

Required programs[]

Required files[]

The following files were made by Sandorl, and are used for this tutorial:


These files were made in a way that they would load any item swf file based on the query strings on the browser. This method, however, lacks the support of Kurst, which allows to get a transparency rather than taking screenshots. Therefore, the following tutorial would mainly be used for loading files from your computer- downloaded SWF files for in-game or player card items. This is the most efficiant way for getting a good result.



This step can be skipped!

The player card stages show how to modify the file in a way that it can be easily worked with. If you want to achive the same result, you can download this file. Items can be downloaded to the folder on which you saved this file, and be given the following names:

File name Role
item0.swf Clothing items
bg.swf* Background image
pin.swf* Pin/flag

File names with a red asterisk are not available using the file given from the "Preparations" section. However, it is recommended to read the Preparation section to see how it works.

The first step would be to download these in-game and player card penguin files. Due to the file names (hosted in swfcabin), we recommend to rename the downloaded files by SandorL. On this tutorial, they are treated as sprites.swf and paper.swf. Open these files with JPEXS, and for each one, open the scripts menu on the left. Open Frame 1 and select the DoAction in the list below it. You should see something like this:

doll.c0.loadMovie("http://" + mediaURL + "v2/content/global/clothing/icons/" + _root.pinID + ".swf");
doll.c1.loadMovie("http://" + mediaURL + "v2/content/global/clothing/sprites/" + _root.bodyID + ".swf");
doll.c2.loadMovie("http://" + mediaURL + "v2/content/global/clothing/sprites/" + _root.feetID + ".swf");
doll.c3.loadMovie("http://" + mediaURL + "v2/content/global/clothing/sprites/" + _root.handID + ".swf");
doll.c4.loadMovie("http://" + mediaURL + "v2/content/global/clothing/sprites/" + _root.faceID + ".swf");
doll.c5.loadMovie("http://" + mediaURL + "v2/content/global/clothing/sprites/" + _root.headID + ".swf");
doll.c6.loadMovie("http://" + mediaURL + "v2/content/global/clothing/sprites/" + _root.neckID + ".swf");

This is the script that usually loads the items using the query strings used in the browser. Press the "Edit" button at the bottom, and update each one of these URLs, so now they will point to a file in your computer. This should be the result:


On this example, the file would load any SWF file named itemN.swf in the same folder, where N is a number from 0 to 6 (can load multiple files). If one or some of these files don't exist, only the existing files available on that folder.
Then, press "Save" at the bottom, and when "Code successfully saved" popup appears, close the popup and also press "Save" at the top of JPEXS, on the File tab.


It's recommended to save the sprites.swf and paper.swf in a different folder each, so you don't mix player card and in-game item files.

Generating PNGs[]

  1. Download the files that you want to the target folder, and name them itemN.swf (or another name that you picked in the stage in the previous section).
    • Note: when using multiple items on the same PNG generation, their order matters. item0.swf is the bottom item, and the higher the number is, the upper it is vertically ordered. In general, the order of the items, from bottom to top, is the following:
      1. feet
      2. body
      3. hand
      4. neck
      5. face
      6. head
  2. Open sprites.swf or paper.swf with Kurst. Set the Frame rate to 1 and the Seconds to 5. A good scaling value would be 10.
  3. Start capturing.
  4. When done, open the folder with the PNGs. The first files wont have the items, as it takes time for the SWF file to load other resources. Therefore only at the 3rd or 4th PNG image, the items will be featured. Though, always generate 5 images just in case.
  5. Now all there is left is to crop the image and save.

Missing parts[]

If some part(s) of a given item are cut off by the borders of the PNG, follow these steps:

  1. Get a large version for that item's look in-game (can also be done using SWiX, best for achiving transparency).
  2. In a new file of GIMP, load as layers (Ctrl+Alt+O) both the penguin versions with the cut-off item, and the one without the item (if you only loaded 1 item, use the PNG version before the item appeared.
    • If you loaded multiple items, delete the cut-off item and capture again- then use this layer as well as the one with the cut off penguin.
  3. Proportionally resize the image that you got on step #1, so its height/width would match the dimensions of the cut-off image.
    • Tip: if you set extract from the cut-off in-game SWF file Movie_Clip_2.swf/Sprite 2.swf, and only generate a PNG using Kurst, where the scaling value is exactly 400% of the value that you used to scale up the penguin (e.g. ×40 if the scaling value for the penguin was ×10), it would prefectly match the dimensions of the cut-off item (only intact). If you do that, you can skip step #3.
  4. Copy, paste and Position the generated item file above its equivalent cut-off version. It is possible that the pixels would be off by 0.X pixels, which means that the tranparency of the edges shift, but you would still be able to position it perfectly with an offset of 0.5px or less.
  5. In the Layers menu (Ctrl+L), right click the layer of the recently pasted item image and choose To New Layer.
  6. Go to Image → Fit Canvas to Layers.
  7. Delete the layer with the cut-off item.
  8. Merge the intact item's layer with the penguin layer that doesn't have the cut-off item.
  9. Crop and save.

Different directions[]

This set of steps shows how to get an image of a penguin in-game that faces a different direction, sitting or standing.

  1. Download the in-game penguin swf file, or the proper action swf file if what you want to achive is an action swf. In addition, download the item's in-game swf file.
  2. Using Trillix, extract the relevant resources from the Frames list, where item0.swf is the penguin, and item1.swf is the item.
  3. Fron sprites.swf, Delete the shapes of the penguin (1. beak, feet and shadow 2. belly 3. colored part). The save.
  4. Generate a PNG thumb using Kurst.


In order to change the penguin's color, whether you wish to do so in sprites.swf, paper.swf or for both, open the file with JPEXS. Then:

  1. Browse to sprites → DefineSprite (4) → frame 1 → PlaceObject (SomeNumber) (colour_mc).
  2. In the main window's area, a tree navigation of some of the sprite's properties should appear. Press "Edit" at the bottom.
  3. Expand the colorTransform menu, and change the values of the redAddTerm, greenAddTerm and blueAddTerm values to the RGB value of the color that you want (in decimal units).
  4. When done, press "Save" at the bottom. Then also press "Save" at the top of the window.

Note: for multiple colors, it may be easier to modify using SWiX. A proper text editor or an online application may allow you to quickly replace all occurations of a given color value.