A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: round off the x or y position of a clip?

  1. #1
    Junior Member
    Join Date
    Jun 2001
    Posts
    8

    round off the x or y position of a clip?

    I have some scrollbar-controlled movie clips that contain graphics that need to be at exact .0 x and y coordinates when they stop moving. Is there a simple way to round off the numbers generated by my scrollbar to round off the position each time you press the scroll buttons?

    Mildly unrelated- is there a way to mask html text?
    My cat's breath smells like catfood.

  2. #2
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    1)
    with Math.round()
    example:
    clip._y = Math.round(scroller._y);

    2) you mask html text like you mask any dynamic field: you need to embed the font in the field.

    gparis

  3. #3
    Why wouldnt you use an int()?

    I guess the motion would be smoother using a round() but im not sure what the specific use would be.

    sKtd_ne

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