[Guide] How to add images to your habbo.swf [Phoenix]

Galago

New Member
Oct 8, 2011
1
0
Hi there,

This is my first post ever on DevBest. Also I am Dutch, so my English isn't the best.
I found this out a couple of months ago. A way to add images to the habbo.swf
First I decided to keep this as a secret, but I think that isn't fair.

What you need:

Your habbo.swf
Leensters HabboUI Editor
A Flash Decompiler

Part 1:

Open your habbo.swf with the flash decompiler and extract this image:

(image 1047 ofso)

Open it with paint.net/photoshop or whatever. (You have to make it transparent, so don't use paint)

Put an image you want in it, so like this:

You have to remember a few things:

1: The size from the image you pasted. (Mine is 65x20)
2: The space between your pasted image and image 1047, like this:
(Mine is 57px)
3: The space between the top from your pasted image and image 1047, like this:
(Mine is 17px)

Save image 1047, and edit your habbo.swf in the Flash decompiler. That part is done, now.

Part 2:

Open HabboUI Editor with your habbo.swf
At the left you will find a search box. Typ there
PHP:
icon_19

The result is 3 files:
PHP:
habbo-198
habbo-312
habbo-809

First open habbo-312.

Search in current file for icon_19, you will find this:

PHP:
<!-- Pixel icon -->
        <template name="icon_19" asset="$asset">
            <entities>
                <entity name="icon" type="bitmap"><region><Rectangle x="34" y="16"  width="23" height="26" /></region></entity>
            </entities>
        </template>

Copy that and paste it under it, and edit it like this:

PHP:
 <!-- Pixel icon -->
        <template name="icon_19" asset="$asset">
            <entities>
                <entity name="icon" type="bitmap"><region><Rectangle x="34" y="16"  width="23" height="26" /></region></entity>
            </entities>
        </template>

        <!-- IMAGE NAME (YOU CAN CHOOSE ONE) -->
        <template name="icon_{A}" asset="$asset">
            <entities>
                <entity name="icon" type="bitmap"><region><Rectangle x="{B}" y="{C}"  width="{D}" height="{E}" /></region></entity>
            </entities>
        </template>

{A} = A Random number. Make sure it doesn't excist allready.
{B} = The space between the left from your image and image 1047. (I explained that allready)
{C} = The space between the top fromyuor image and image 1047.
{D} = The width from your image.
{E} = The height from your image.


Click the green save button, and that part is done.

Now open habbo-198.
Search again in the current file for icon_19, you will find this:
PHP:
<asset mimeType="image/png" name="fx_icon_19_png" />

Add under:
PHP:
<asset mimeType="image/png" name="fx_icon_{A}_png" />

Click the green save button and that part is done.

Now open habbo-809

And again, search in the current file for icon_19

You will find this:

PHP:
<component type="icon" style="19" renderer="skin" asset="habbo_skin_icon_set_xml" layout="icon16">
        <states><state name="default" layout="icon16" template="icon_19" /></states>
    </component>
Add under it, before /skin:
PHP:
<component type="icon" style="{A}" renderer="skin" asset="habbo_skin_icon_set_xml" layout="icon16">
        <states><state name="default" layout="icon16" template="icon_{A}" /></states>
    </component>

Click the geen save button, and that part is done.

Now you have accualy added the image in the habbo.swf. Now you must show it somewhere. Use this code:

PHP:
<icon x="0" y="0" width="{D}" height="{E}" params="16" style="{A}" name="THE NAME YOU GAVE THE IMAGE"/>

Now it shows the image. You can add as much images as you want. I don't know if this works on r63B too, because I don't have a R63B hotel, so feel free to test it. I know that the codes are a littlebit different in r63B, but it bassicaly works the same, I think.

I hope I have helped a lot of people to make an unique habbo.swf.
Click like if you like this tutorial. Feel free to ask questions, in PM or as a comment.

Cheers,
Galago
 

Users who are viewing this thread

Top