views:

59

answers:

2

i want to create an application that when running would make appear a circle ( radius and color configurable ) move from centre-down of my laptop screen to centre-up ( speed of motion configurable ). this animation should run in a loop as long as the program is running and i want to know is it also possible that when this circle is running other work on the laptop can be done please suggest how can i create this application ( which programming language ) which functions ? etc. rergardless for whether it is possible to continue normal work while animation runs or not.

A: 

Did you even try? This could be achieved in almost any language out there, e.g. C++, Java, even Haskell. The commands necessary depend on the language choosen.

Martin Hohenberg
i'm a begginer programmer . i am not expert in any language . i program by researching commands on google . if you guys can refer me to any webpage that has any moving graphic application i would continue from there
silverkid
You move too fast, silverkid. While learning by typing without understanding can be fun (and many of us haev begun programming in that manner), you should first decide on a language and then learn the languages basic. As you seem to be a beginner, I suggest Java, which is free and has a very nice IDE (Eclipse). It also features Java2D, a canvas which could achieve what you are trying to do. Plus, there are tons of Java examples on the web.
Martin Hohenberg
A: 

Flash would be the easiest to get something up and running. There is a trial of CS4. The free route would be to use Flex.

Here is a decent overview of flash. http://www.senocular.com/flash/tutorials/as3withflashcs3/

To help you out this is a rough structure of how you would program it in Flash.

Use the IDE to create a MovieClip symbol and draw a circle using the drawing tools. Give this instance a name mcCircle. The size can be changed dynamically as needed and so can the colour. (although you might then want to use code to draw the circle, again easy). Place the MovieClip in the centre of the stage.

Then using actionscript:

var moveDown:Boolean = true;

mcCircle.addEventListener(Event.ENTER_FRAME, onEnterFrame);

function onEnterFrame(e:Event):void
{
  if (moveDown)
  {
    mcCircle.y--;

    if (mcCircle.y+(mcCircle.height/2) > stage.height)
    {
     mcCircle.y = stage.height-(mcCircle.height/2);
     moveDown = false;
    }
  }
  else
  {
    mcCircle.y++;

    if (mcCircle.y-(mcCircle.height/2) < 0)
    {
     mcCircle.y = 0+(mcCircle.height/2);
     moveDown = true;
    }

  }
}
Allan
thanks a lot , your reply is very useful
silverkid