SmartFoxBits without MXML (AS3 project)

Everything about the SmartFoxBits UI Components for SmartFoxServer 2X. Post your questions, suggestions and bug reports.

Moderators: Lapo, Bax

User avatar
Posts: 58
Joined: 04 Jul 2011, 16:45

SmartFoxBits without MXML (AS3 project)

Postby Damace » 13 Jul 2011, 18:09

Can I use SmartFoxBits is a pure AS3 project?

I tried to make a simple app just to get the connector working:

Code: Select all

   import com.smartfoxserver.smartfoxbits.bits.Connector;
   import flash.display.Sprite;

   public class SmartFoxBits extends Sprite
      public var connector:Connector = new Connector();
      public function SmartFoxBits()
         connector.x = stage.stageWidth / 2;
         connector.y = stage.stageHeight / 2;


But an error pops up saying something with the constructor of Connector is wrong:

Code: Select all

Error: No class registered for interface 'mx.styles::IStyleManager2'.
at mx.core::Singleton$/getInstance()[E:\dev\hero_private\frameworks\projects\framework\src\mx\core\]
at mx.styles::StyleManager$/get impl()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\styles\]
at mx.styles::StyleManager$/getStyleDeclaration()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\styles\]
at com.smartfoxserver.smartfoxbits.bits::Connector$/classConstruct()[/Users/Paolo/gotoAndPlay/gotoAndPlay/SmartFoxServer2X/SmartFoxBits/Flex/Base Pack/source/src/com/smartfoxserver/smartfoxbits/bits/]
at com.smartfoxserver.smartfoxbits.bits::Connector$cinit()
at global$init()[/Users/Paolo/gotoAndPlay/gotoAndPlay/SmartFoxServer2X/SmartFoxBits/Flex/Base Pack/source/src/com/smartfoxserver/smartfoxbits/bits/]
at SmartFoxBits()[/Users/Damace/Dropbox/Projects/Game Dev/SmartFoxBits/src/]

From the look of this error I guess that he is looking for some MXML class that he can't find in an AS3 project.
User avatar
Site Admin
Posts: 4355
Joined: 29 Mar 2005, 09:50
Location: Italy

Postby Bax » 14 Jul 2011, 10:02

The SmartFoxBits for Flex use the mx UI framework classes, so you should extend the Application class at least.
This link can provide additional informations:
What about using the Flash version of the Bits?
Paolo Bax
The SmartFoxServer Team

Return to “SmartFoxBits for SFS 2X”

Who is online

Users browsing this forum: No registered users and 1 guest