creating avatar from scratch in flex

Post here your questions about the OpenSpace 2.x or notify bugs and suggestions.

Moderators: Lapo, Bax

Post Reply
pengerknitter
Posts: 20
Joined: 01 Apr 2010, 05:38

creating avatar from scratch in flex

Post by pengerknitter »

A couple of post in this forum discuss how to create an avatar but they all refer to flash.

I'm using fb3 and I'm unclear on how to change the appearance of an avatar.

The documentation mentions that you need to add AvatarLibrary.swf, but the components panel that is mentioned in the same paragraph seems to refer to flash, not fb3.

If one extends the Avatar class in order to create a custom avatar, where does the actual graphics come from to represent it, i.e. where are the graphics stored/loaded for the crashtest dummy in the default avatar?
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Post by Bax »

In our example, you will find a Flash FLA file containing the DemoAvatar and DemoGhost movieclips, linking the two classes that extend Avatar. The FLA also contains the avatar graphics and it is exported as a SWC file which is added to the Flex build path. In this way you are able to use FLash assets in Flex.
Paolo Bax
The SmartFoxServer Team
pengerknitter
Posts: 20
Joined: 01 Apr 2010, 05:38

Post by pengerknitter »

bax wrote:In our example, you will find a Flash FLA file containing the DemoAvatar and DemoGhost movieclips, linking the two classes that extend Avatar. The FLA also contains the avatar graphics and it is exported as a SWC file which is added to the Flex build path. In this way you are able to use FLash assets in Flex.
How do I go about changing the avatar graphics in the swc?
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Post by Bax »

You have to do it in the FLA, and then re-export the SWC.
Paolo Bax
The SmartFoxServer Team
pengerknitter
Posts: 20
Joined: 01 Apr 2010, 05:38

Post by pengerknitter »

bax wrote:You have to do it in the FLA, and then re-export the SWC.
I need Flash CS3 for that don't I?
pengerknitter
Posts: 20
Joined: 01 Apr 2010, 05:38

Post by pengerknitter »

I now understand the workflow - thanks for pointing me in the right direction.
pengerknitter
Posts: 20
Joined: 01 Apr 2010, 05:38

Post by pengerknitter »

what are the guidelines for creating an avatar, i.e. am I restricted to the dimensions of the existing demo avatar or does the engine automatically scale to the appropriate size once the avatar loads?
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Post by Bax »

OpenSpace simply instantiates your avatar class; no scaling is applied automatically.
Paolo Bax
The SmartFoxServer Team
Post Reply