Page 1 of 1

Are you smart ?

PostPosted: Thu Sep 06, 2012 7:48 pm
Author: talsor
I can not figure this one out due to my limited IQ , So I was hoping some member might help me out here . Now see the image below
Image

Now I want to change this image of Kurdistan flag , So that the SUN is spining :-D . How do you do that ?

Image

Re: Are you smart ?

PostPosted: Thu Sep 06, 2012 9:12 pm
Author: Londoner
It is a long program, each a few micro seconds changes a picture with another one. Each new picture is slightly different from the last one. Because the pictures change quickly you feel a sense of continuals movement. The picture you see with President Obama is not spinning, but changes picture after picture a bit quickly. So you feel it is spinning. :)) The loughing picture on the left works on the same principle. It is made up of many pictures, change from one to another to give the sense of loughing. This has nothing to do with IQ. It is the question of learning to right the program and know the trick of it.

Bellow is a javascript I wrote to change back ground collour from white to purple and back to white. Every 1000 microseconds, changes to a new colour 32 times from white to purple.Possibly 32 times could do the same thing with Kurdistan flag. For that either you make 32 Kurdistan flags with the position of sunrays a bit moved clockwise for each next one or you just make 32 pictures of the sun, the rays of each next one moved clockwise abit. You have to adjust the position of the sun in the middle of one flag. But it is a lot easier to make 32 complete flags.

The following is the script without HTML:

function run_backGrounds()
{
setTimeout("changeBackgrounds()",1000);
}
function changeBackgrounds()
{

backGroundCounter++;


if (backGroundCounter < numberOfBackGrounds)

{
setTimeout("changeBackgrounds()",1000);

}
//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx


if (backGroundCounter == 1)
{
document.bgColor="white";
}
if (backGroundCounter == 2)
{
document.bgColor="#ffffee";
}
if (backGroundCounter == 3)
{
document.bgColor="#ffeeee";
}
if (backGroundCounter == 4)
{
document.bgColor="#ffddee";
}
if (backGroundCounter == 5)
{
document.bgColor="#ffccee";
}
if (backGroundCounter == 6)
{
document.bgColor="#ffbbee";
}
if (backGroundCounter ==7)
{
document.bgColor="#ffaaee";
}

if (backGroundCounter == 8)
{
document.bgColor="#ff99ee";
}
if (backGroundCounter == 9)
{
document.bgColor="#ff88ee";
}

if (backGroundCounter == 10)
{
document.bgColor="#ff77ee";
}

if (backGroundCounter == 11)
{
document.bgColor="#ff66ee";
}

if (backGroundCounter == 12)
{
document.bgColor="#ff55ee";
}

if (backGroundCounter == 13)
{
document.bgColor="#ff44ee";
}

if (backGroundCounter == 14)
{
document.bgColor="#ff33ee";
}

if (backGroundCounter == 15)
{
document.bgColor="#ff22ee";
}

if (backGroundCounter == 16)
{
document.bgColor="#ff11ee";
}

if (backGroundCounter == 17)
{
document.bgColor="#ff00ee";
}


if (backGroundCounter == 18)
{
document.bgColor="#ff11ee";
}

if (backGroundCounter == 19)
{
document.bgColor="#ff22ee";
}

if (backGroundCounter == 20)
{
document.bgColor="#ff33ee";
}

if (backGroundCounter == 21)
{
document.bgColor="#ff44ee";
}

if (backGroundCounter == 22)
{
document.bgColor="#ff55ee";
}

if (backGroundCounter == 23)
{
document.bgColor="#ff66ee";
}

if (backGroundCounter == 24)
{
document.bgColor="#ff77ee";
}

if (backGroundCounter == 25)
{
document.bgColor="#ff88ee";
}

if (backGroundCounter == 26)
{
document.bgColor="#ff99ee";
}

if (backGroundCounter == 27)
{
document.bgColor="#ffaaee";
}

if (backGroundCounter == 28)
{
document.bgColor="#ffbbee";
}

if (backGroundCounter == 29)
{
document.bgColor="#ffccee";
}

if (backGroundCounter == 30)
{
document.bgColor="#ffddee";
}

if (backGroundCounter == 31)
{
document.bgColor="#ffeeee";
}

if (backGroundCounter == 32)
{
document.bgColor="#ffffee";
}
//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
if (backGroundCounter == 32)
{
run_backGrounds();
backGroundCounter = 0;
}

}
</script>

Re: Are you smart ?

PostPosted: Thu Sep 06, 2012 10:59 pm
Author: talsor
I can certainly do it this way , but I thought there is programming involved . It is like making some one fly in the movie :-D .

Re: Are you smart ?

PostPosted: Fri Sep 07, 2012 12:22 am
Author: brendar
You can animate it such as below by using a software:
http://www.palmyria.co.uk/illusions/per ... eption.htm

Or using CSS or java to create it.

http://web.bogdanteodoru.com/resources/ ... nimations/

Re: Are you smart ?

PostPosted: Fri Sep 07, 2012 4:37 am
Author: alan131210
Post the result pic once it's done Heval :-D

Re: Are you smart ?

PostPosted: Fri Sep 07, 2012 9:30 pm
Author: Londoner
KurdInEurope wrote:I made the sun spin, but I did not know how to paste it on the Kurdish flag. If anyone has enough experience, perhaps they can paste the sun on the Hungarian flag (it is easier that way).

http://oi45.tinypic.com/qsppg0.jpg

The sun is big, so if anyone can accomplish this, but want the sun smaller, let me know and I'll make it smaller (of course, if it is wanted).


All you need is to make the sun pictures smaller. Use and editing program like paint to reduce the size of the sun picture. If you know to make it spin, you should also know where to postion it. I tried to see the script, but it doesn't come out.

Re: Are you smart ?

PostPosted: Mon Sep 10, 2012 3:49 pm
Author: talsor
KurdInEurope wrote:I made the sun spin, but I did not know how to paste it on the Kurdish flag. If anyone has enough experience, perhaps they can paste the sun on the Hungarian flag (it is easier that way).

http://oi45.tinypic.com/qsppg0.jpg

The sun is big, so if anyone can accomplish this, but want the sun smaller, let me know and I'll make it smaller (of course, if it is wanted).


What did you use to create the spinning sun ? looks great by the way :-D

Re: Are you smart ?

PostPosted: Tue Sep 11, 2012 4:53 pm
Author: talsor
The only way I learned so far is to take multiple still images of Hungarian flag while rotating the sun on top of it to create the spine ,then uploaded all the images to a .gif maker. but that is just not practical .