Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
459 views
in Technique[技术] by (71.8m points)

actionscript 3 - AS3 move sprite along predefined curve

I want to make a circle(:Sprite) move along a pre-drawn curve. Using the graphics library a drew a 350 degree curve and I want my scrubber to move just from 0 degrees all tha way to 350 degrees without leaving the path. I found a great class from senocular.com that does this, but the problem is that Im limited to the lenght of the curve that I could use, since for it to work correctly I have to constrain myself to a maximum of a 90 degree curve. I also found another class that moves the sprite along a circle, but the problem with that is that once I reach the complete cycle. the sprite goes back to position 0. I just want the sprite to go from 0 - 350 and back, I dont want it to jump from 350 - 0. Is there any class or way to just draw the curve and attach the circle to that curve? Here are some pics:
Here is what senocular.com Here is what I want

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...