A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: scroll dynamic text boxs in as3.. used to use "scroll" as2

  1. #1
    aidanmack.co.uk
    Join Date
    Dec 2001
    Location
    York, UK
    Posts
    400

    scroll dynamic text boxs in as3.. used to use "scroll" as2

    Hi, I used to hook two functions like this up to buttons to scroll dynamic scroll boxs in as2. Can i do something similar to this in as3 for dynamic txt boxs?

    doScrollUp = function(){
    onEnterFrame = function(){
    body_txt.scroll -= 1;
    }
    }
    doScrollDown = function(){
    onEnterFrame = function(){
    body_txt.scroll += 1;
    }
    }



    Cheers
    Aidan

  2. #2
    Member
    Join Date
    Jun 2007
    Posts
    33
    yep thats possible the syntax has changed quite a bit
    try this;

    //event listeners for your scroll up and down buttons
    doScrollUp_mc.addEventListener( MouseEvent.CLICK , scrollUp);
    doScrollDown_mc.addEventListener( MouseEvent.CLICK, scrollDown);

    //functions
    function scrollUp( myevent : MouseEvent ) : void {
    body_txt.scrollV--
    }

    function scrollDown ( myevent : MouseEvent ) : void {
    body_txt.scrollV++
    }

  3. #3
    aidanmack.co.uk
    Join Date
    Dec 2001
    Location
    York, UK
    Posts
    400
    ahhh "scrollV" so thats what it is!

    Thanks for that!

    Cheers
    Aidan

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