A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Can I sync a movieClip to a line in a scrolling text field?

  1. #1
    anyone else hear that? flashpipe1's Avatar
    Join Date
    Jan 2003
    Location
    Upstate NY
    Posts
    1,930

    Can I sync a movieClip to a line in a scrolling text field?

    I've got a dynamic text box with a scrollBar component. The text is updated dynamically, but it's consistent text.

    Now, I've got an arrow_mc movieclip that points to the first line of each paragraph as the audio hits that paragraph. Is there a way I can have the arrow scroll up and down with the textbox when the user drags the scrollbar???

    Thanks!!
    Love like you've never been hurt, live like there's no tomorrow and dance like nobody's watching.

  2. #2
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    can you make use of the scrollbar scrollPosition property ?
    Code:
    var sbListener:Object = new Object();
    sbListener.scroll = function(evt_obj:Object){
    trace( my_sb.scrollPosition );
    }
    
    my_sb.addEventListener("scroll", sbListener);

  3. #3
    anyone else hear that? flashpipe1's Avatar
    Join Date
    Jan 2003
    Location
    Upstate NY
    Posts
    1,930
    Ah...very interesting...I suppose I can figure the height of a line and then adjust the _y of the arrow based on the current scroll position?

    Very cool!!

    Thanks!!
    Love like you've never been hurt, live like there's no tomorrow and dance like nobody's watching.

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