A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Numeric Stepper AS2

  1. #1
    Junior Member
    Join Date
    Oct 2013
    Posts
    2

    Numeric Stepper AS2

    Hi

    I'm new to flash and I need some help translating a as3 code to as2. I have a scen were I have a movieclip with a classictween animation which is controlled by a Numeric Stepper. But I need now to convert the scen from as3 to as2.

    I tried searching online but all I could fine were code for as3.

    This is the code I'm using right now.

    Code:
    import fl.controls.NumericStepper;
    
    NUMERICSTEPPER1.addEventListener(Event.CHANGE,NUMERICSTEPPER1FUNCTION);
    
    function NUMERICSTEPPER1FUNCTION(event:Event):void 
    { 
    var gotoFrame = NUMERICSTEPPER1.value;	
    pumpa.gotoAndStop(gotoFrame);
    }

  2. #2
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,785
    Hi,

    If you compare the two codes you will notice how similar they are really.
    Try something like so,
    PHP Code:
    var nMSListener:Object = new Object();
    var 
    gotoFrame:Number;

    nMS.addEventListener("change",nMSListener);

    nMSListener.change = function()
    {
        
    gotoFrame nMS.value;
        
    pumpa.gotoAndStop(gotoFrame);
        
    trace(gotoFrame);
    }; 
    nMS is your NUMERICSTEPPER1

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center