Skip to main content
Inspiring
June 6, 2006
Question

mouse and circle

  • June 6, 2006
  • 4 replies
  • 491 views
Hello,

I have a circle and inside i have a ball
I would with my mouse dont get out the circle when I move

could you tell me how can i do please
I hope you undertand me

thank you


This topic has been closed for replies.

4 replies

Inspiring
June 7, 2006
I'm at work and won't be able to work on this for quite awhile. But what is the fun of having somebody else do it all for you?

It is all there for you. First work on making it work for one eye.

Hint#1. The size of myCircle should be fairly small compared to the size of ball.

Hint#2. I'm guessing you also want a rotational component? If so look up Math.atan2() in the help files. It is giving the angle between the center of the circle and the pointer. So just a little bit of magic and you will have a value to set for _rotation.

Hint#3. Take all the stuff in the onMouseMove and make it a function that can be called for each eye.

Good luck. I will check back but don't know when I will have time to work on this.
Inspiring
June 6, 2006
please do you have a solution ?
thank you

"Dave" <frsingles@ifrance.com> a �crit dans le message de news:
e64lcn$pfj$1@forums.macromedia.com...
> Hello,
>
> It's what I want
> If you can give me the script THANK YOU
>
> "Rothrock" <webforumsuser@macromedia.com> a �crit dans le message de news:
> e64kv9$ott$1@forums.macromedia.com...
>> moose and squirrel?
>>
>> You can't ? at least not as you have presented it. The mouse sits on the
>> user's desk and Flash can't "reach out and grab" their hand.
>>
>> It is possible to restrict the ball to only being dragged wihin the
>> circle. Is
>> that what you want?
>>
>
>


Inspiring
June 6, 2006
Please do you have some patience? I do have a day job and can't answer everything immediately. In the two hours since your first response what have you done to answer your question? Remember that everybody here is a volunteer and nobody is paid or required to answer anything.

That being said. Create a circle movieclip put it on your stage with the name myCircle. Make a little ball movieclip and put it on the stage with the name ball. Then put this code on the frame. There you go!
Inspiring
June 7, 2006
I forgot to mention that the myCircle movieclip should have the registration point at the center of the circle. Also I don't know what I was thinking. I like this version of the code much better. It is much smoother.
Inspiring
June 6, 2006
Hello,

It's what I want
If you can give me the script THANK YOU

"Rothrock" <webforumsuser@macromedia.com> a �crit dans le message de news:
e64kv9$ott$1@forums.macromedia.com...
> moose and squirrel?
>
> You can't ? at least not as you have presented it. The mouse sits on the
> user's desk and Flash can't "reach out and grab" their hand.
>
> It is possible to restrict the ball to only being dragged wihin the
> circle. Is
> that what you want?
>


Inspiring
June 6, 2006
moose and squirrel?

You can't – at least not as you have presented it. The mouse sits on the user's desk and Flash can't "reach out and grab" their hand.

It is possible to restrict the ball to only being dragged wihin the circle. Is that what you want?