Brain Exercise...

Forum to play non-Cantr related games on the forum

Moderators: Public Relations Department, Players Department

User avatar
SekoETC
Posts: 15525
Joined: Wed May 05, 2004 11:07 am
Location: Finland
Contact:

Postby SekoETC » Fri Sep 22, 2006 1:45 pm

Ok, actually I was using this for a Flash program. Now it's working somewhat, meaning that the wheel rotates if you click on it and move the mouse. The problem is the movement seems to be rather random. Surprisingly there are no problems when the mouse cursor is far enough from the wheel's center, but since the area of movement is supposed to be much more narrow, that doesn't help much.

Code: Select all

onClipEvent(enterFrame)
{

onMouseDown = function() {

   onMouseMove = function() { //only executed if mouse button is down

      if (_parent.area_mc.hitTest( _root._xmouse, _root._ymouse, true))     { //this determines if the mouse pointer is within legitimate area, other-
  //wise it would be rotating every time the mouse is clicked anywhere.

   var point:Object = {x:this._width/2, y:this._height/2};
   this.localToGlobal(point);
//defines central point of the wheel and changes it to be displayed in global coordinates.
    
var Dy:Number = _root._ymouse - point.y; // y distance from center
var Dx:Number = _root._xmouse - point.x; // x distance from center

var a:Number; //angle in radians

if (Dx<1>-1) //there was an error here
{
   if (Dy>0) {a = Math.PI/4;}
   else if (Dy<0) {a = 3*Math.PI/4;}
   else {a = 0;} //crossing the central point
   
}

else
{
   a = Math.atan(Dy/Dx);
   if (Dx<0) {a = a + Math.PI;}
}
       
      this._rotation = a * 180/Math.PI;

      } //End if hit target true
   }; //end on mouse move
}; //end on mousedown

onMouseUp = function() {
   // checking should only be done when mouse is pressed
   delete onMouseMove;
};

}


I've gone through this in another program and although there was some jumpiness as well, I think it was only caused by exceding the 90 degree angle. But that was a bigger wheel.

EDIT: I bet it's all wrong defining x and y solely from the dimensions, that doesn't make any sense at all! The only way it would make sense is to have the registration point in the upper corner and then adding half the height and half the width to the dimensions, to come up with the central point.
Not-so-sad panda
Britt
Posts: 1
Joined: Mon Oct 16, 2006 8:18 am

Postby Britt » Mon Oct 16, 2006 8:27 am

i am so confused lol
Yes because i care
RangerSteven
Posts: 11
Joined: Sat Oct 21, 2006 3:21 pm

Postby RangerSteven » Sat Oct 21, 2006 3:41 pm

Wait, what's the riddle?
User avatar
SekoETC
Posts: 15525
Joined: Wed May 05, 2004 11:07 am
Location: Finland
Contact:

Postby SekoETC » Sat Oct 21, 2006 4:18 pm

There is no riddle. I killed it.
Not-so-sad panda
RangerSteven
Posts: 11
Joined: Sat Oct 21, 2006 3:21 pm

Postby RangerSteven » Sat Oct 21, 2006 11:49 pm

Well then, here you go:

It's January 1, 2001, and there's a line with 3000 people in it. The first person waits one day in the line, and each person (except the first) waits twice as long as the person in front of that person. So the second person waits a total of 2 days, the third person waits a total of 4 days, etc. After the line is empty, what month is it?

Remember that a leap year is one that is a multiple of 4, but not a multiple of 100 unless it's a multiple of 400.
User avatar
Torkess_theCommie
Posts: 499
Joined: Mon Apr 03, 2006 3:44 am
Location: British Columbia, Canada

Postby Torkess_theCommie » Sun Oct 22, 2006 4:32 am

RangerSteven wrote:Well then, here you go:

It's January 1, 2001, and there's a line with 3000 people in it. The first person waits one day in the line, and each person (except the first) waits twice as long as the person in front of that person. So the second person waits a total of 2 days, the third person waits a total of 4 days, etc. After the line is empty, what month is it?

Remember that a leap year is one that is a multiple of 4, but not a multiple of 100 unless it's a multiple of 400.


August?
Image
Talapus
Posts: 1452
Joined: Thu Jun 02, 2005 9:05 pm
Location: Montana

Postby Talapus » Sun Oct 22, 2006 6:18 am

RangerSteven wrote:Well then, here you go:

It's January 1, 2001, and there's a line with 3000 people in it. The first person waits one day in the line, and each person (except the first) waits twice as long as the person in front of that person. So the second person waits a total of 2 days, the third person waits a total of 4 days, etc. After the line is empty, what month is it?

Remember that a leap year is one that is a multiple of 4, but not a multiple of 100 unless it's a multiple of 400.


It is impossible to tell. The sun becoming a red giant will kill all human life on earth, thus rendering the line empty, and the exact date of that happening is unknown. Besides, the Gregorian calendar is only accurate for the next few thousand years. In the amount of time you have procribed, it would not even be close to accurate (the time it would take is about 3.4 * 10^900 years).
RangerSteven
Posts: 11
Joined: Sat Oct 21, 2006 3:21 pm

Postby RangerSteven » Sun Oct 22, 2006 9:59 am

Torkess_theCommie wrote:August?


According to my calculations, it's October. How'd you get your answer?
User avatar
Sparkle
Posts: 2200
Joined: Sun May 23, 2004 2:19 am
Location: Florida
Contact:

Postby Sparkle » Mon Dec 25, 2006 10:02 pm

Leo Luncid wrote:BlueNine suggested me to post one of my codes here, so yeah... Try and figure this code out.

I US N 2-I OM S-A's.

I think this might be more easier than my last one, though.


I am bored so I am bringing this back up. This is the only one I found not answered so I will give it my best shot then post a new one.

I use and try ohm essay's.

I also wanted to give you guys scores for whoever is interested.

Names Scores

SekoETC 3
BlueNine 2
Sho 2
AoM 2
Spider 2
Just A Bill 1
Stan 1
El_Skwidd 1
Elros 1
Solutions Maximus 1
fishfin 1
Nakranoth 1

Seko's on a role! Yay! I gave both AoM and Sho a point for the first question because BlueNine never said which was correct. BlueNine can inform us later.

On to my puzzle. It is pretty easy. Just teaches us all to pay attention to directions. Here goes:

Start with HISTORY BOOK and follow the directions carefully to discover a phrase that is apropos.

1. Print the words HISTORY BOOK.
2. Insert a D between the second and third consonants.
3. Change the last letter to an F.
4. Delete the letter that appears last in the alphabet.
5. Move the middle letter to the beginning.
6. Double the fifth letter.
7. Delete the letter that appears last in the alphabet.
8. Add a W at the beginning and at the end.
9. Swap the second O with the second D.
10. Double the fifth letter.
11. Change the third letter to an M.
12. Delete the letter that appears first in the alphabet.
13. Add an A at the end.
14. Delete the fourth letter.
15. Move the first S to the immediate right of the second D.
16. Swap the R with the third letter.
17. Without changing their order, move the fourth through the seventh letters to the end.

What did you get?
a day without cantr, is a day spent in bed convulsing and suffering from withdrawl
User avatar
SekoETC
Posts: 15525
Joined: Wed May 05, 2004 11:07 am
Location: Finland
Contact:

Postby SekoETC » Mon Dec 25, 2006 10:16 pm

worsdofwasdom?
Not-so-sad panda
User avatar
Sparkle
Posts: 2200
Joined: Sun May 23, 2004 2:19 am
Location: Florida
Contact:

Postby Sparkle » Mon Dec 25, 2006 11:14 pm

You are so very close. You need to switch two letters around. :wink:
a day without cantr, is a day spent in bed convulsing and suffering from withdrawl
User avatar
Nakranoth
Posts: 1054
Joined: Sun Jul 16, 2006 4:49 am
Location: What if I were in a hypothetical situation?

Postby Nakranoth » Tue Dec 26, 2006 5:38 am

I'm also getting "WOR DSOFWASDOM"
Scratch and sniff text
User avatar
Sparkle
Posts: 2200
Joined: Sun May 23, 2004 2:19 am
Location: Florida
Contact:

Postby Sparkle » Tue Dec 26, 2006 5:49 am

You got it! Seko just had the s and d switched around in words.

Great. You got one?
a day without cantr, is a day spent in bed convulsing and suffering from withdrawl
User avatar
Sparkle
Posts: 2200
Joined: Sun May 23, 2004 2:19 am
Location: Florida
Contact:

Postby Sparkle » Wed Dec 27, 2006 12:02 am

Ok. Here is another for those who are interested:

Discover the saying concealed in this line. Drop one letter in each pair and decide where words begin and end. If you need help getting started I'll put the first word below this post, so do not go below this post if you do not want help.

IG RF EY OA TL VH AO GP EL CS MN AE LK DE RE OV EN RS YZ TO HA LI ND GR AG NR EI AL TH EP OR ST NS AI RB EL EN.


Oh and you can get an extra point if you know who is famous for this statement.
a day without cantr, is a day spent in bed convulsing and suffering from withdrawl
User avatar
Sparkle
Posts: 2200
Joined: Sun May 23, 2004 2:19 am
Location: Florida
Contact:

Postby Sparkle » Wed Dec 27, 2006 12:05 am

The first word is "GREAT"
a day without cantr, is a day spent in bed convulsing and suffering from withdrawl

Return to “Forum Games”

Who is online

Users browsing this forum: No registered users and 1 guest