aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Trying to make an animation of PNG files and clueless about Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Trying to make an animation of PNG files and clueless about Java" Watch "Trying to make an animation of PNG files and clueless about Java" New topic
Author

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

Katie Piorkowski
Greenhorn

Joined: Dec 03, 2012
Posts: 1
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!
Joanne Neal
Rancher

Joined: Aug 05, 2005
Posts: 3682
    
  16
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.


Joanne
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61434
    
  67

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
View the page source, you can see the code.
 
 
subject: Trying to make an animation of PNG files and clueless about Java