0 Replies Latest reply on Oct 19, 2009 11:35 AM by workedout

    HSlider + bind to as3 application

    workedout

      Hey there-  I have a simple as3 menu application that I want to "bind" with a Flex HSlider. Basically when a user changes the HSlider the ASMenu updates accordingly.  So far the code below does not update the ASMenu.  Any help or direction is appreciated.  Thanks!

       

      ASMenu AS3:

       

      package {

      public class ASMenu extends UIComponent {

       

      public function ASMenu():void {

      }

       

      private var _textSize:Number = 12; // default text size
             
      // get and set modifiers:

      public function get textSize():Number {
          return _textSize;
      }
      public function set textSize(val:Number):void {
          _textSize = val;

      }

      }

      }

       

      MXML:

       

      <mx:Canvas>
          <asm:ASMenu id="asMenu" textSize="{hSlider.value}"/>

          <mx:HSlider id="hSlider" minimum="0" maximum="20" liveDragging="true"/>
      </mx:Canvas>