• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Trying to make an animation of PNG files and clueless about Java

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm a mechanical engineering student and I've been programming in Scilab to make a matrix of temperatures of soil at varying depths. Our goal is to make an animation of the change in temperature at different time intervals. My research partner found this site (http://www.caps.ou.edu/wx/p/20110322/r/spmeso/fcst_22.1200Z/1200Z/anim/soilt/) and this animation is exactly what we want to do. He e-mailed the creator and the creator said they created a series of PNG files and made the animation using a JavaScript file. I know nothing about JavaScript. My question is: is it worth trying to learn JavaScript to build our animation? Or is there some kind of program out there that will make an animation that will allow us to change our variables like the animation in the link I provided?

Thank you!
 
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Katie Piorkowski wrote:I know nothing about JavaScript.


The first thing you should learn is that JavaScript and Java are not the same thing.
Hopefully a moderator will move this to the Javascript forum where you will probably get better answers.
 
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If this is in a web page, then yes, JavaScript is what you would need to use.

It's not that complicated. You would use window.setInterval() to cause to code to execute periodically. In the callback, you would locate the image element and replace its src properly with a new image each time. The display will automatically update with the new image.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
View the page source, you can see the code.
reply
    Bookmark Topic Watch Topic
  • New Topic