Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #24952

Re: Simple graphics/animation question

From "Jukka K. Korpela" <jkorpela@cs.tut.fi>
Newsgroups comp.lang.javascript
Subject Re: Simple graphics/animation question
Date 2014-06-20 16:17 +0300
Organization A noiseless patient Spider
Message-ID <lo1c8n$gc2$1@dont-email.me> (permalink)
References <ab26a5ad-8582-4ea5-85c9-1efa7e639aa3@googlegroups.com>

Show all headers | View raw


2014-06-20 1:05, patchydunn@gmail.com wrote:

> I'm relatively new to programming, but want to create a program with
> the following function: An image of a ball moves across the screen
> and goes "behind" an image of a basket. How feasible is this with
> Javascript and HTML?

Rather easy.

You could even use just HTML and CSS: use a <marquee> element containing 
a ball as an image or as a character and a <span> element positioned 
over the <marquee> element.

You could also use CSS animation to create the movement.

Alternatively, you can make the ball move with JavaScript, using 
setTimeout() to perform a change of its position at regular intervals.

-- 
Yucca, http://www.cs.tut.fi/~jkorpela/

Back to comp.lang.javascript | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Simple graphics/animation question patchydunn@gmail.com - 2014-06-19 15:05 -0700
  Re: Simple graphics/animation question "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-06-20 01:05 +0200
  Re: Simple graphics/animation question "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2014-06-20 16:17 +0300
    Re: Simple graphics/animation question Joao Rodrigues <groups_jr-1@yahoo.com.br> - 2014-06-20 13:55 -0300
      Re: Simple graphics/animation question Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-06-21 05:08 +0200
        Re: Simple graphics/animation question Joao Rodrigues <groups_jr-1@yahoo.com> - 2014-06-22 00:56 -0300
          Re: Simple graphics/animation question Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-06-24 12:54 +0200
  Re: Simple graphics/animation question Danny <dann90038@gmail.com> - 2014-06-20 12:37 -0700
  Re: Simple graphics/animation question "Chris M. Thomasson" <no@spam.invalid> - 2014-06-20 16:53 -0700

csiph-web