A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: divide

  1. #1
    Junior Member
    Join Date
    Aug 2002
    Posts
    14
    I am using version 5 of Flash.In a movie,I have kept a sliding bar and a text box to get its y-value.How can I get the value ranging from 1 at the bottom of the bar to 10 at the top.

  2. #2
    Senior Member
    Join Date
    May 2001
    Posts
    1,838
    Move your sliding bar to top, record the _y as top. For example, it may be 0; Then move your sliding bar to bottom and record _y as bottom. For example bottom=400;

    unit=(top-bottom)/(10-1);
    textbox.text=1+(bar._y-bottom)/unit;

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