2 Replies Latest reply on Nov 15, 2006 1:08 AM by moz.art

    Flex Components in AS3 Project

    firdosh Level 1
      I am trying to use the Flex components in an AS3 only project using FLex Builder

      package {

      import mx.core.*;
      import mx.events.FlexEvent;
      import mx.controls.Button;

      public class UsingFlexComponents extends Application
      public function UsingFlexComponents()
      this.layout = "vertical";
      this.addEventListener(FlexEvent.APPLICATION_COMPLE TE, doInit);

      private function doInit(e:FlexEvent):void {
      var t:Button=new Button();

      it compiles and runs fine but I do not see a button. ??. Also if i put trace statements in the constructor or even outside I cannot see them.

      So i tried extending the Container class but then I get a runtime error

      Error: Could not find resource bundle core
      at mx.resources::ResourceBundle$/getResourceBundle()[C:\dev\GMC\sdk\frameworks\mx\resources\ ResourceBundle.as:125]
      at mx.core::UIComponent$cinit()
      at global$init()[C:\dev\GMC\sdk\frameworks\mx\core\UIComponent.as:790]
      at global$init()[C:\ApplicationsFLEX\UsingFlexComponents\UsingFlexComponents.as:9]