CreateMyAvatar bug (?)

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

Moderators: Lapo, Bax

ffourcad
Posts: 130
Joined: 25 Feb 2010, 10:26

CreateMyAvatar bug (?)

Postby ffourcad » 06 Apr 2010, 08:29

Hello,

I have made some test projects where I loaded a map, then created an avatar, and it worked. When the beta 5 was released, I created a new project, and I reused the avatar I created for the past projects, but I was unable to create an avatar instance, the openspace engine tells me :
[WARNING] An error occurred while creating avatar '1': Invalid main avatar class definition for 'girl' avatar type: class must extend Avatar


I can't understand why :?

Edit : the same is happening when I use the DemoAvatar contained in the flex example
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 06 Apr 2010, 10:20

We can't reproduce this issue. Did you recompile the swc containing the avatar classes definitions?
Paolo Bax
The SmartFoxServer Team
ffourcad
Posts: 130
Joined: 25 Feb 2010, 10:26

Postby ffourcad » 06 Apr 2010, 10:34

No, I just took the flash example available with beta 5, recompile the DemoAvatarContainer.fla available in the flex example, add my code to the osExampleFlash.as, and load the avatar, and call the createMyAvatar method.
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 06 Apr 2010, 10:38

Drop us an email: we will re-export and send to you the Flex project of the example.
Paolo Bax
The SmartFoxServer Team
ffourcad
Posts: 130
Joined: 25 Feb 2010, 10:26

Postby ffourcad » 06 Apr 2010, 10:50

When I run the flex example, i have a runtime error :
ArgumentError: Error #1063: Non-correspondance du nombre d'arguments sur mx.binding::PropertyWatcher(). 3 prévu(s), 2 détecté(s).
at _CollapseCanvasWatcherSetupUtil/setup()
at CollapseCanvas/initialize()[/Users/Paolo/Documents/Flex Builder 3/CollapseCanvas/src/CollapseCanvas.mxml:0]
at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[C:\autobuild\3.4.0\frameworks\projects\framework\src\mx\core\UIComponent.as:5267]
...
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 06 Apr 2010, 12:33

Paolo Bax
The SmartFoxServer Team
ffourcad
Posts: 130
Joined: 25 Feb 2010, 10:26

Postby ffourcad » 06 Apr 2010, 12:36

if I remove the CollapseCanvas component, the project won't compile. Anyway, I'm not using Flex, I'm using Flash, and the problem is with the avatar creation which says that it is not extending Avatar Class, whereas it is.
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 06 Apr 2010, 14:15

ffourcad wrote:if I remove the CollapseCanvas component, the project won't compile.

Of course. You also have to modify the code which writes messages in the CollapseCanvas textareas.

ffourcad wrote:Anyway, I'm not using Flex, I'm using Flash, and the problem is with the avatar creation which says that it is not extending Avatar Class, whereas it is.

The problem might be related to application domains. The application domain in which you load the avatars library must have the main application domain as parent. In other words you should do something like this:

Code: Select all

var avAppDomain:ApplicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain)

..... (load the external swf)

openSpace.avatarAppDomain = avAppDomain

Let us know if this works.
Paolo Bax
The SmartFoxServer Team
ffourcad
Posts: 130
Joined: 25 Feb 2010, 10:26

Postby ffourcad » 06 Apr 2010, 14:50

Well, you're good : it did work !

Return to “OpenSpace v2 discussions and help”

Who is online

Users browsing this forum: No registered users and 16 guests