Attaching code to a skin / tile breaks the editor

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

Moderators: Lapo, Bax

Post Reply
sstark
Posts: 77
Joined: 21 Nov 2008, 16:06

Attaching code to a skin / tile breaks the editor

Post by sstark »

If I add a class to any of my MovieClips in my library that I want to use in OpenSpace, even if the class is empty, it will break the open space editor, but work in-game.

I have a feeling there's something simple that could be done to fix this in the editor... say, just using a bitmap data representation of the movieclip, possibly casting as a Sprite, or... magic. ;)

And ideas?
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Post by Bax »

The solution is much more simple... make your class dynamic!
For example:

Code: Select all

public dynamic class SkinWithClass extends Sprite
Thank you for pointing this out.
Paolo Bax
The SmartFoxServer Team
sstark
Posts: 77
Joined: 21 Nov 2008, 16:06

Post by sstark »

and there's the magic I was looking for.

actually wasn't aware as3 had dynamic classes... but now that I do it's prety obvious.

thanks!
Post Reply