A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: got the straight line working = need a diagonal

  1. #1
    Junior Member
    Join Date
    May 2001
    Posts
    23
    Yeah the straight line is working great...Thanks for the assist...

    Diagonal line is still a mystery.

    But some ideas i had was attaching the clip to a motion guide layer ... drawing a path ...

    Doesn't work though...

    Why does it have to be so hard!!!!!

    You would think that you could do this rather easily.

  2. #2
    Senior Member
    Join Date
    Dec 2000
    Posts
    515
    i assume you are talking about a slider, having it move not just on a vertical or horizontal line, but on a diagonal.

    i have two suggestions. one a bit complicated, one just tooo simple.

    simple: your slider is a movieclip, right? rotate it 45 degrees. it's now diagonal. should maintain it's functionality. i've rotated them 90.

    the more complex one is - say you have a vertical scroller. the handle should be a movieclip itself with a _y value. just throw a loop in there that sets the _x value according to the _y value. for a 45 degree slant, _x=_y .
    for a different angle, say _x=_y*.6 for example. this even opens the door to a wavy scroll bar with trig:
    _x=Math.sin(_y)*20 or something along that line.

    haven't tested these, just straight out of my head onto the keyboard.

  3. #3
    Junior Member
    Join Date
    May 2001
    Posts
    23

    cool, but i'm confused.

    I've tried this before...

    I have the movie clip, i put the on Press --> startDrag command on the movie clip and then rotate it 45deg. It still will only go up and down on a line. So, what should I do then?

  4. #4
    Senior Member
    Join Date
    Dec 2000
    Posts
    515
    ok, you have the handle of the slider itself. it's a movieclip with a button and set to drag. don't rotate that.

    put that clip inside ANOTHER movieclip and rotate the outside one. in its own internal world, the slider will still be moving vertically, but on the stage, it's going at an angle.

  5. #5
    Junior Member
    Join Date
    May 2001
    Posts
    23

    this is awesome - THANKS!

    thanks alot! That rotate trick worked out great!

    Thanks for the help.

    When my site is live, I'll post the url

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