3 Replies Latest reply on Aug 25, 2011 1:07 PM by drkstr_1

    Issue Setting IFlexDisplayObject

    jdobre06

      I have obtained code for a slider that I have placed within a component. This  component is to display after a button is pressed. Once the button is pressed,  nothing shows. I have tracked the issue down to the following area:

       

      private function createBackgroundTrack():void

      {

      if (!track)

      {

      var trackSkinClass:Class = getStyle("trackSkin");

      /////////////After this point the component  bombs out ////////

      track = new trackSkinClass();

      if (track is ISimpleStyleClient)

      ISimpleStyleClient(track).styleName = this;

      innerSlider.addChildAt(DisplayObject(track),0);

      }

      }

       

      I assume that trackSkinClass is undefined even though the  trackSkin skin and track are defined in their proper places as such:

       

      [Style(name="trackSkin",  type="Class", inherit="no")]

      private var track:IFlexDisplayObject;

       

      Within the code, there are multiple other instances of  IFlexDisplayObjects not properly getting skinned by a Class. I am inexperienced  with Flex and am not sure where to go next. Am I missing something?