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


Groups > comp.lang.javascript > #24952

Re: Simple graphics/animation question

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From "Jukka K. Korpela" <jkorpela@cs.tut.fi>
Newsgroups comp.lang.javascript
Subject Re: Simple graphics/animation question
Date Fri, 20 Jun 2014 16:17:14 +0300
Organization A noiseless patient Spider
Lines 20
Message-ID <lo1c8n$gc2$1@dont-email.me> (permalink)
References <ab26a5ad-8582-4ea5-85c9-1efa7e639aa3@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
Injection-Date Fri, 20 Jun 2014 13:17:11 +0000 (UTC)
Injection-Info mx05.eternal-september.org; posting-host="ad9d9996ed56b0226e850b84acbddfdf"; logging-data="16770"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1931+gGW4ShNFX8yUD5mcTp"
User-Agent Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.6.0
In-Reply-To <ab26a5ad-8582-4ea5-85c9-1efa7e639aa3@googlegroups.com>
X-Antivirus-Status Clean
X-Antivirus avast! (VPS 140620-0, 20.06.2014), Outbound message
Cancel-Lock sha1:h4bLSDIuZe/gAbEZiKTJNQG5IaE=
Xref csiph.com comp.lang.javascript:24952

Show key headers only | 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