2 Replies Latest reply on Jul 7, 2008 4:56 AM by

    Rebuild Flex in FlexBuilder?

      I'm wanting to subclass Slider and need to tweak Slider's code to set a method as override-able... does anyone have any experience rebuilding Flex from inside FlexBuilder before I bumble along?

      The best I can tell this is the route I have to go, I've tried just moving the class into my project (maintaining the package structure) but the best I can tell this didn't work.

      Thanks in advance... Mike
        • 1. Re: Rebuild Flex in FlexBuilder?
          Gregory Lafrance Level 6
          In FB3 3 just select File-New-ActionScript Class, and in your class definition:

          public class MySlider extends Slider

          You need to import mx.controls.Slider, and then override what you need to achieve the desired functionality, but you should not need to move the Flex Slider.as file into your project.
          1 person found this helpful
          • 2. Re: Rebuild Flex in FlexBuilder?
            That was my initial approach, however Slider's private declarations get in the way (numerous compiler errors).

            Interestingly this just worked:
            1) Copy Slider into my project maintaining its package structure
            2) Fix Slider's includes
            3) Change the visibility attribute of a few variables and a method in Slider from private to public
            4) override in my subclass
            5) recompile

            I'm not sure why that didn't work on Sunday, but it works fine now.