Animation headache

i've been working on this program for almost two weeks now, and still couldn't get it. the problem now is it's not animated. when click on "start" button. the program "sleep" for a while -- which means the "timer" is working, but it loads the last pic in the array, instead of loading each pic one by one. here is the code. i think the problem is might be within the "FeetPanel1.actionPerformed()". would you mind to look into it?
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import javax.swing.border.*;
public class FeetPanelTest
public static void main(String args[])
FeetFrame frame=new FeetFrame();
frame.setSize(400, 300);
frame.setLocation(350, 250);
frame.setVisible(true);
frame.setTitle("Test FeetPanel");
class FeetFrame extends JFrame implements ActionListener
FeetPanel1 feetPanel=new FeetPanel1();
JButton jbStart=new JButton("Start");
public FeetFrame()
feetPanel.setBorder(new LineBorder(Color.black, 1));
getContentPane().add(feetPanel, BorderLayout.CENTER);
getContentPane().add(jbStart, BorderLayout.SOUTH);
jbStart.addActionListener(this);
public void actionPerformed(ActionEvent e)
if(e.getSource()==jbStart)
feetPanel.start();
//feet.start();
class FeetPanel1 extends JPanel implements ActionListener
protected int numOfPlanes=26;
protected int currentPlaneIndex=0;
protected Image planeArray[];
protected Image planeToDisplay;
private Timer timer;
public FeetPanel1()
planeArray=new Image[numOfPlanes];
for(int i=0; i<planeArray.length; i++)
planeArray=Toolkit.getDefaultToolkit().getImage
("C:/forte4j/bin/JavaExcercise/sampledir/Project4099/Planes/Plane"
+(i+1)+".gif");
setLayout(new BorderLayout());
timer=new Timer(10, this);
public void paintComponent(Graphics g)
super.paintComponent(g);
planeToDisplay=planeArray[currentPlaneIndex];
g.drawImage(planeToDisplay, 0, 0, getSize().width, getSize().height, this);
public void actionPerformed(ActionEvent e)
for(currentPlaneIndex=0;
currentPlaneIndex<planeArray.length-1; currentPlaneIndex++)
//I think the problem is possibly here
currentPlaneIndex=currentPlaneIndex;
repaint();
public void start()
timer.start();
thanx a lot!!

Oh, where to begin with?
I think you should rethink your little animation viewer and change quite everything... but maybe you could get something displayed also with a little modification, in your loop use paintImmediately() instead of repaint(), this should avoid that all the very close calls to repaint() be coalesced.

Similar Messages

  • How do I get rid of the 3d effect when opening home screen? It gives me a headache.

    How do I get rid of the 3d effect when opening home screen? It gives me a headache.

    jimginakouri wrote:
    It's more of a "zoom-in/zoom-out" every time you turn on home screen or open/close an app.
    THAT you can't change. Silly of Apple not to provide a setting to back out the animation effects either as a whole or individually.

  • How do i export a flash movie as an animated gif with transparent background?

    each export has the background in it.
    I have looked into the publish setting for gif but no option there, or in the background colour setting in the main design window has any Alpha or Transparency setting.

    Thought that issue went away. The only workaround I found was exporting a PNG sequence with transparency, importing it all back into a better animated GIF exporter like Fireworks as an image sequence and exporting it from there again. It will give you the best quality, control over the timeline, looping and various per-frame AGIF functionality.
    But yes, it's a multi-step headache.

  • AE7 Bridge shows no animation

    In AfterEffecs 7 - I go to "Browse Presets" then select e.g. "text", but do not see any animated display of what the effects do. Clicking on the icons brings the icon to the preview window, but all I see is the icon.
    Kindof stuck here... Any help?
    Bent

    After a little reseach (I Googled "AE7 install quicktime") it seems there is a problem with AE7 and the latest QT 7.4x version - this is what they say:
    "There have been some interesting developments with the release of the QuickTime 7.4 update. Apparently, it disables After Effects 7 and will not permit users to complete rendering videos. There have been some arguments about what is causing this error, with some claiming it is related to DRM, while others claim it is nothing more than a preferences bug.
    Nevertheless, you can not revert back to a previous version of QuickTime once you have updated. In short: After Effects 7 users, beware! Avoid the QT7.4 update at all costs, lest you want to deal with a major headache."
    I found this on http://www.studiodaily.com/blog/?p=384
    Now what?

  • Problems with animation playback consistency and transparencies in DPS

    Hello,
    I'm somewhat new to Edge Animate and I'm trying to incorporate simple animation into a DPS piece that my company has been publishing for the past year. A few questions:
    1) Is there a "trick" to getting transparencies to work? I've had zero luck so far and I'm beginning to resign myself to just putting the entire design into the Edge composition as a work around. There must be an easier way? I'm hoping I'm missing something simple and obvious. From my research, I've gleaned that the poster image feature is a major player in all the headaches. Speaking of which, do you have to start over and rebuild a comp everytime you need to publish without a poster?
    2) I've noticed that playback is really inconsistant. Most of the time, when I first swipe on a page, the animation won't play at all. Subsequent swipes, and it begins playing fairly consistency. Any ideas as to what this is about?
    3) Finally, is there any guidelines for SVG settings used in Edge? I found that many of the vector files I was using in comps were messing w/playback, so I ended up subbing them out for pngs.
    Thanks!
    Darin

    Hey Darin,
    There's currently a bug where the poster image won't clear when your AN comp plays inside of DPS. So for example, if your stage is set to transparent and you have a blue poster image, the blue poster still shows while the stage is playing.
    1) A workaround for this (if you don't need a poster image) is to swap out the poster file in your publish settings for a 1x1px transparent png graphic. This makes it so even though the poster doesn't technically clear, it's only showing that 1x1px png.
    2) Try setting the auto play delay to something like .125sec in under Web Content in the Folio Overlay panel inside of InDesign. I believe there was an issue where content can sometimes have tricky playback, give that a shot and see if it helps.
    3) Not sure what the issues you're facing are, but where are you testing your playback? The desktop DPS viewer has an outdated version of webkit and won't render SVG properly (if at all).
    hth,
    Sarah

  • Disable time machine star animation in Mountain Lion

    From time to time I inadvertently delete a file and so I go into time machine to recover it. Which is super useful. What's driving me insane, though, is the animated background animation of expanding stars. Trying to scan my folders while the background keeps moving forward is making me seriously nauseous. I get a headache after only a few minutes...
    It seems like there used to be a way to turn this frankly superfluous animation off (e.g. http://hintsforums.macworld.com/showthread.php?t=102266, or http://hints.macworld.com/comment.php?mode=view&cid=117454). But starting in Lion this seems not to work any longer (see https://discussions.apple.com/message/18330846#18330846).
    Any ideas how I can get a steady background image in the time machine interface?

    vance.corkery wrote:
    Hi,
    Operating 10.7.4, I make use of 'time machine' encrypted backups to an external HD. If I wipe the HD and do a fresh install of 10.8, will I lose the encrypted backup?
    No.  It's password only.  You can even access it on a different Mac (Lion or ML) with the password.

  • How can I turn off the page turn animations on an iPhone4 ?

    iBooks for iPhone doesn't seem to have the option to turn this off. I'd really like to since I set the font size quite high and turn every 1-3 seconds. The animation every second produces headaches after longer periods of reading. Thanks for any helpful answers.

    The editing menu doesn't come up when you double tap. It comes up when you press and hold. It can't be turned off.

  • Flash Headaches

    OK. The basics. I'm running Windows 7 Home Premium 32 bit. It's completely up to date as is Firefox - using 20.0.1. Ever since I updated to this latest version of FF, Flash has been a complete and utter nightmare and I type this after TWELVE solid hours today trying to fix the problem that's been plaguing me for about a week now.
    Flash is being a total nuisance. The problem persists in other browsers too - Opera, Internet Explorer, Pale Moon and Comodo Dragon. In fact the only one I haven't tried is Chrome because I'm anti-Google. It's funny how whenever one updates Flash, Real Player and Quick Time they're eager to try and dump Chrome upon you.
    I have lost count of how many times in the last week I have downloaded and reinstalled the latest version of Flash. It simply isn't funny any more. The usual pattern is, it will be installed and I go to YouTube and it works fine. Until I reboot my computer that is. Then, it's back to square one - I'm pestered to download the latest version of Flash yet again and round and round in circles I keep going.
    OK. I have tried practically EVERY piece of advice that has been offered here. Honestly. Tried downgrading Firefox. Downgrading Flash. Going into safe mode. Disabling hardware acceleration in Flash and in Firefox. Altered firewall settings. Created a new profile. Disabled all plug ins. Etc etc. You name it, I have tried it.
    What happens is this.
    I go to YouTube and get the tedious black fuzzy screen telling me "Adobe Flash Player is required for video playback" with the "get the latest flash player" link beneath it. I click the link. Flash downloads. Installs. Great. I can watch some videos on YouTube BUT I cannot look at any flash based sites. For instance : http://www.ichoir.org.uk/ is totally blank. (By the way, I am using NO extensions apart from Last Pass for my passwords) No animations show on Adobe's site.
    When I reboot the computer that's when the misery truly kicks in. If I don't reinstall Flash then when I click on a YouTube link, the browser either hangs completely or I'll get on to the page, a black outline flickers briefly and the whole screen area is a white blank. I usually have to press CTRL-ALT+DELETE to shut Firefox down from the task manager. I never get any error messages and no crash reports show when I go to "about:crash" or whatever that option is called.
    I know and am more than aware that a great many people are having similar problems with Flash. Yes, I have read through adobe forums and they're as helpful as a chocolate teapot. Followed their advice many times and the result is always the same no matter which browser I use. Even running in Firefox safe mode makes zero difference - the browser hangs dead and it's back to task manager to get out of it.
    Yes, I have run virus and malware scans. Nothing. I rebooted Windows into Safe Mode and YouTube works with no problem but back in normal Windows, it's back to the tedious game I've been outlining.
    I am literally at my wits end with this. Like I've said, I have tried other browsers and the problems persist. Flash always demands to be updated. Again. and again. Until last week, I've never had any real problems with Firefox. Been using it since 2005 and have no desire to change, but I can't help but get a sneaking feeling Adobe and Flash are deliberately making life as awkward as possible for non-Chrome users.
    I really cannot make head or tail of this problem. System Restores have done nothing. Resetting Firefox doesn't help either. All I want to do is surf the net with none of these headaches. I've lost an entire day today wading through pages and pages of forums trying every odd little suggestion and nothing has worked. I'm reasonably computer savvy so do understand heavier things and am unafraid to tinker around and not screw up.
    Fact is, Windows 7 is working fine. It is Flash that is completely screwed no matter which version I install as proved by the same headaches appearing in all the other browsers. I've also lost count of how many times I've had to reinstall RealPlayer as well.
    I hope I've been as detailed as possible and will gladly answer any questions or suggestions. This is driving me insane and costing me a lot of time and energy that I cannot really afford to be losing. This is my last resort... I've reached the end of my tether with this!
    Thank you in advance.

    Thank you. Will give that a go.

  • Any way to turn off iOS 7 navigation animations?

    The zoom animations everywhere on the new iOS 7 are literally making me nauseous and giving me a headache.  It's exactly how I used to get car sick if I tried to read in the car.
    How do I turn them off?  Do I have to revert to 6?

    Settings --> General --> Accessibility --> Reduce Motion
    enable reduce motion
    I tried this and it doesn't do anything

  • I pause my video and the audio continues...if I play again it causes a major headache. Help?

    This might be an easy to answer question, but I am making my second video, so I'm not too knowledgeable. Anyway, I imported audio into my video and it plays back fine. So I play the video, and pause it to try and synchronize the audio. The video stops, but the audio keeps playing, and it will not stop until the whole thing has played. If I try to start from the beginning again and play the audio to sort of override it, it just overlaps with the original audio, and the resulting noise gives me a headache. I don't know if somehow I can stop the audio a portion of the way through, but if I can, that would be great. It would make syncing a whole lot easier. Thanks!

    Ok, so I had a .m4a file on my computer, which I then turned into an mp3 using the adobe media encoder. I imported the mp3 using File-Import-Import to Library, and then I created a separate layer for the file and dragged the audio from the library onto the stage while I was on that layer. The layer now had a sound file on it, and I put a keyframe a ways ahead on the timeline so I could see the audio layer. I then played it back using the play button underneath the timeline to begin syncing my animation with the audio that I had imported. I stopped it, a little late as it turned out, but the music continued to play. It would not stop until it had gone through the whole song. While the song was playing I tried starting it from the beginning again, but the new sequence overlapped with the old one so they played together out of time, creating a very unpleasant noise. They both had to finish before I could play it back again to try and sync my animations more precisely. If I could pause the video (again, I'm using that little button at the bottom left of the timeline) and stop the audio, syncing would be so much easier, and I assumed there was a way to fix this. I am working with Flash Professional CS5.5. Thanks for your consideration!

  • Interactive animations

    Hy!! Im using Director on Mac OS X 10.3.9 and Im having
    problems with the library interactive animations. If I start a new
    project and just drop a shape on the canvas and add the animation
    it works. But when the project gets a bit larger they wont work
    anymore. I tried them on .jpg, .png, on text... and they simply
    wont work.
    can anybody help me?
    THANX !!!

    There seems to be this perception among Captivate developers that because a lot of widgets out there are free, and others are only 20 or 30 dollars, that widgets must be quite simple little bits of software and take only minutes to knock up.  People are also under the mistaken impression that widget developers charging for their creations are raking in a fortune.
    Neither of these ideas is true.
    Lilybiri is correct.  When you build a widget, you have to keep RE-building it each time a new Captivate version comes out because the architectural changes keep breaking your widgets.  The more widgets you've created, the more headaches you have with every version upgrade.  And now that Adobe is putting out a new major version every year, with update versions every few months, and the CP Subscription versions are slightly different to the others...well that just gives me migraines thinking about it.  And although I've helped hundreds of clients fix issues with projects containing our widgets, even though the issue was NOT a bug in the widget, I've NEVER had one offer to pay me for my time.
    The reality of this 'widget business' is that I can earn literally 5 times more money building courses for clients than I can building widgets for course developers.  That's why there aren't more widgets in the world.

  • Eye-strain & headaches

    I’ve built a short animation in flash and converted it
    to a screensaver using 3rd party software. We have deployed it
    across our company as a method of carrying a corporate message, but
    have had a complaint from an employee that it is causing him
    eye-strain and headaches when he sees it “from the corner of
    his eye”.
    I know there are eye-strain issues with monitor refresh rates
    lower than 65zz (?), and photosensitive epilepsy can be caused by a
    flicker rate in the 16-25hz range, but are there possible clashes
    between movie frame-rate and monitor refresh rates, or does anyone
    have any information on this topic in general?
    Any help much appreciated.

    I'm not a neurologist, and no shrink either, so I'll stick to
    the technical facts:
    Iamgine the screen refresh-rate that way:
    Your movie is running at the frame rate you have set, or as
    near as the speed of your computer will allow. It is running on a
    virtual screen inside your computer, the refresh-rate is acting
    like a shutter in front of a window throuh which you look inside
    the computer. The inner screen doesn't care about the outer
    shutter. So I wouldn't see any clashes.
    The corner of the eye is in fact the most sensive part of our
    field of vison concerning movement; should have ben usefull for
    detecting lions asap for our ancestors ;-)
    I don't know what your animation looks like, but I don't
    supose it is a problem of your animation. It might just be that the
    employee in question never had anything moving before on his screen
    that captuerd his/her attention when having the screen at the
    corner of his/her field of vision.
    So if on the monitor we are talking about is at a low screen
    rate (I personally can't stand refreshrates under 85 per sec in the
    corner of the I) and is senstitve to that in a way - that might be
    an explanation. If so I would try to increase the refreh-rate if
    possible with the hardware.
    Propably the person in question just wants a new and shiny
    flats-creen display - nothing wrong in that ;-)

  • Open and edit animated .gif while preserving frame timing

    CS4 Premium Design Edition, Win XP
    I was disappointed with the removal of Image Ready from CS3 because although some of the functionality was placed into Photoshop 10, there was no way to open and edit an existing animated .gif while preserving the timing of each individual frame. I was told on the PS forum at the time that I really needed to use Fireworks. I resented that, because I was very happy with Image Ready and I didn't want to have to learn a new application just to gain functionality that had been included in previous versions of PS/IM.
    I've now got CS4 Premium Design Edition which of course includs Fireworks... and here's what Help has to say on the subject of imported .gifs.
    "Note: When you import an animated GIF, the state delay setting defaults to 0.07 seconds. If necessary, use the States panel to restore the original timing."
    This is no use to me. What if I don't know the individual frame timings? What if there are 200 frames with varying timings?
    Simple question: which current Adobe product is capable of importing a .gif while retaining the frame timings? If anyone knows, or if I've misunderstood the nature of the Fireworks Help quote above, I'd really appreciate some input here. Thanks :)
    Not so simple question: why was an excellent gif-editing application thrown out to have its functionality partially replaced by a bunch of scripts and half-effective workarounds cooked up by desperate users ("import a gif by using the video import and typing *.* into the filename box..")? It's a fair question I think.
    Mark

    Hi Bob, that's not glib at all, it's a reasonable question.
    I uninstalled it along with everything else when I installed CS3, in the reasonable expectation that whatever replaced IR would be at least equal in functionality.
    Perhaps I should just dig out CS2 and install IM from there, but I have some serious reservations about doing so, because I don't know if/how a partial install of CS2 will impact upon my installation of CS4, and I'm not confident of getting support.
    I am also curious to know if/why Adobe actually removed basic functionality without replicating or replacing it in their other software. I really want to know: which recent, currently supported Adobe product
    should I be using in order to regain this functionality? Or do Adobe no longer produce a geniuinely comprehensive .gif-editing application?
    Mark

  • Animated GIF ignoring frame timing

    I am trying to create simple animated GIFs with a few layers
    of text that simply fade in and fade out in sequence. My initial
    attempt worked perfectly. Most frames use the default 7/100's of a
    second delay as they fade. A few frames were manually set to much
    longer delays so that the text pauses, before fading out to be
    replaced by the next text.
    When I reopened the file, to adjust the background color, and
    then re-saved it, the GIF now plays straight through, ignoring the
    timing of each frame. Nothing I do now can get it to pause on the
    appropriate frames. I've tried cutting the symbols out and pasting
    them into a new file, removing the animation from the symbols and
    reapplying it, etc.
    Any ideas, anyone?
    Thanks in advance.

    None, None.

  • Edit animated gif

    Hi,
    How can I edit an animated gif in Photoshop Elements 6 for Mac?
    When I open the file there is just the first frame in one layer - no other layers available.
    Thanks!

    Thanks Barbara!
    Barbara B. wrote:
    ... then bring it to PSE.
    I can't drag the single frames from Preview to PSE, because PSE 6 doesn't run in window mode.
    (Is this improved in the current version?)
    I can only drag the single frames to the desktop (as TIFF files, I guess transparency info is lost then?).
    Barbara B. wrote:
    ... there's a bug beginning in PSE 6 where you can't change the frame delay rate from the default when you save an animated gif.
    What's the default frame delay rate? Maybe it's just what I need.
    Barbara B. wrote:
    You might  want to look into a free program like giffun from stone.com instead.
    Yes that's maybe a better idea. It doesn't have to be free software. Can you recommend something good?
    Thanks again!

Maybe you are looking for

  • Can I send a group email from my iPod?

    Occasionally I need to send email to my Sunday School class. It is easy to compose a group email from my computer, but the group names don't show up in my email address list on the iPod. I can select the group name and manually select each individual

  • The popup of the rightclick "Bookmark this page" is missing, where it gives you the shot list of folders.

    When i'm on a page and I want to bookmark it I right-click and choose "Bookmark this page" and then the dialog box shows where you see 5 of your folders to where you can place the page. This dialog box doesn't show up since upgrading to FF13

  • Problem with Telnet

    Hi, I am using Telnet from the terminal application. I can Telnet to any device except one which says "trying" and it just stays there. If I use hyperterminal from Paralles (Windows XP) I can connect without any problem. Does anyone have any idea how

  • Accessing a user defined library - CLASSPATH

    Hi all First I will tell you what I have implmented, then I will discuss the problem. My PATH (user variables) is set to c:\Program Files\Java\jdk1.6.0\bin and everything works fine - I can compile and run from any directory. When I open a shell (cmd

  • SCOM Alert Connector - not updating the start time and finish time

    When I am monitoring the status of connectors in service manager console, I found that for SCOM Alert Connector the Start Time and Finish Time are not updating. Previously it was updated daily. As of now, service manager is working fine but would lik