Is there a easy way to draw animation image in java(like .gif)

hi there,
someone told me to create thread for each animation , but it would be real pain and time comsuming is there some method to do such this work?, thank you you all

A single timer or thread works okay for animating multiple images and/or graphics. Use multiple timers if the delay interval is different among the animated objects. Or, if you must have individual threads for each object, build the thread/timer into the object so all you have to do is to tell the object to go and stop.
Single thread usually works well.

Similar Messages

  • Is there an easy way to centre an image between 2 guides in PS CS6 please?

    Is there an easy way to centre an image between 2 guides in PS CS6 please?

    // try this script ))
    var old_units = app.preferences.rulerUnits;
    app.preferences.rulerUnits = Units.CM;
    main();
    app.preferences.rulerUnits = old_units;
    function main()
        var doc = app.activeDocument;
        var layer = app.activeDocument.activeLayer;
        var x = 0;
        var y = 0;
        var x_cnt = 0;
        var y_cnt = 0;
        var doc = app.activeDocument;
        for (var i = 0; i < doc.guides.length; i++)
            switch (doc.guides[i].direction)
                case Direction.HORIZONTAL: y += doc.guides[i].coordinate; ++y_cnt; break;
                case Direction.VERTICAL:   x += doc.guides[i].coordinate; ++x_cnt; break;
        if (x_cnt)
            x = x/x_cnt;
        else
            x = (layer.bounds[2]+layer.bounds[0])/2;
        if (y_cnt)
            y = y/y_cnt;
        else
            y = (layer.bounds[3]+layer.bounds[1])/2;
        move(layer, x-(layer.bounds[2]+layer.bounds[0])/2, y-(layer.bounds[3]+layer.bounds[1])/2 );
    function move(layer, x, y)
        try {
            app.activeDocument.activeLayer = layer;
            var d1 = new ActionDescriptor();
            var ref = new ActionReference();
            ref.putEnumerated( charIDToTypeID( "Lyr " ), charIDToTypeID( "Ordn" ), charIDToTypeID( "Trgt" ) );
            d1.putReference( charIDToTypeID( "null" ), ref );
            var d2 = new ActionDescriptor();
            d2.putUnitDouble( charIDToTypeID( "Hrzn" ), charIDToTypeID( "#Rlt" ), x*28.354779 );
            d2.putUnitDouble( charIDToTypeID( "Vrtc" ), charIDToTypeID( "#Rlt" ), y*28.354779 );
            d1.putObject( charIDToTypeID( "T   " ), charIDToTypeID( "Ofst" ), d2);
            executeAction( charIDToTypeID( "move" ), d1, DialogModes.NO );
            ref = null;
            d1 = null;
            d2 = null;
        catch (e) { alert(e); throw(e); }

  • Is there an easier way to draw a shape in 3d to match X,Y, Z of photo?

    I usually start a project in 2d and import photos, draw shapes and text in this 2d environment. I find it easier this way because they all start out on the same plane, and when manipulating in 3d later, this initial plane acts as a reference plane that I can shift X,Y,Z and rotation paramaters from. I then add a new camera and turn everything into 3d. However, as I work further in the timeline, I sometimes want to add a rectangle that overlaps exactly on top of a photo lying in 3d space as to cover it. When I start the shape command in the active camera view and draw the rectangle to match the outline of the photo, it seems like the photo and rectangle are on the same plane in this view. However, when I check this by going to the perspective view and checking from other angles I see that the rectangle was placed on an arbitrary plane and the rectangle is not overlapping the photo.
    To correct this, I open the inspector of the photo and write down it's X,Y,Z positions and also it's X,Y,Z rotation parameters. Then I go to the rectangle that I have already drawn and in the wrong plane, open it's inspector properties, and replace with the X,Y,Z and rotation parameters of the photos. Then fine tune the orthogonal positions and scaling within the plane with the 3d tranform tool. This seems like a lot of work, especially when I have to do it a 100 times. Looking for an easier way to draw a shape on the same plane of a photo in 3d space.
    Thanks

    Howdy,
    This is a really good question about one of the bigger challenges of building a 3D project. When you add objects to the Canvas (including drawing), they get added in the camera's viewspace, facing the camera and sharing the same up-vector (i.e. positive Y is up). This is all well and good, but what about doing what you ask, where you want to add an object in the localspace of another object? Let's look at your example: adding a shape that is coplanar to a photo, with the camera not necessarily aligned with the photo.
    As Mark suggested, you can draw the shape in the camera's viewspace and then drag-and-drop the Position and Rotation channels from the photo onto the shape. This will replace the shape's Position and Rotation values with that of the photo, making them coplanar and located in the same place. The shortcoming of this method is that you draw the shape at a size that seems correct in the Canvas, but once it's moved to the same place as the photo, it will often turn out to be too small or large. Then you have to make further tweaks.
    Another solution is to use the Isolate command. Isolate temporarily aligns the current view to the selected object and solos that object. So you could isolate the photo and then draw the shape in the Canvas and it will be coplanar with the photo. The only caveat is that the moment you finish drawing the shape, it will disappear. This is because the photo is still isolated (and soloed). As soon as you de-isolate the photo, everything will reappear.
    The easiest way to use Isolate for new photos—not ones already in the project—is to place the photo in a 3D group, position the group where you want the photo and shape to be, then isolate the group and add anything you want to it (shapes, image, text, etc).

  • Is there an easy way to convert original images to b&w ?

    I have a canon 5d mark II and when I decide to shoot b&w pics, this is what i do : I set my camera to b&w and shoot raw+jpeg. raw files come out in color all the time but jpegs show up in b&w when i import them . I decided to do so as it is very time consuming to convert the original images to b&w one by one.
    Is there an easy way to do it?? Any suggestions? 

    Little known hint well worth knowing:
    If you use the menu selection "Photos→Add Adjustment" or "Photos→Add Adjustment Preset", the operation is done to all selected images.
    In addition to what Frank says, you could also apply a B&W Adjustment Preset when the files are imported.  These adjustments are like any others -- they can be toggled on and off, removed, and adjusted with the settings in the Bricks used.
    For grayscale, it is well worth the time exploring the included Presets and the slider controls.  Afaik, sophisticated grayscale photographers optimize their images in color prior to converting to grayscale.
    JPG is 8-bit and lossy.  RAW is (up to) 16-bit and unconverted (no loss of data, but "lossless" isn't quite right).  If the JPG conversion and quality suffices, there is little reason to shoot RAW+JPEG.
    In essence, you can use the in-camera-created grayscale JPGs, with their fixed and baked-in conversion settings, or you can use Aperture's broad (and time-consuming) grayscale controls.  If you do the latter, and settle on a conversion that works for your camera and subject(s), save it as an Adjustment Preset and use it.

  • Is there an easy way to draw a simple parallogram. . . CS 3

    I'm blind I guess, I can't find it... Thanks!! L W - Also fill with color...

    Draw a rectangle with the rectangle frame tool. While still selected, go to the Transform panel to find the Shear field and type in an angle.
    Mike Witherell in Maryland

  • I updated to snow leopard recently and when i turned on my macbook every file from pictures and music was on my desktop.. are these copies? is there an easy way to put them where they belong like music with itunes, pictures in iphoto and so on

    Hi, I updated to snow leopard recently and when I turned my macbook back on icons from every file of pictures and music i have were all over my desktop
    how can i get them to all go to their programs like music to itunes, pictures to iphoto,  do I have to do it individually? thanks for any help

    If the icons have a black arrow bottom left corner, then the icons are just aliases, not the Application itself. You can move those icons to the Trash.

  • Is there an easy way to make JSpinner wrap around at max/min values?

    I have several pages with a couple dozen JSpinners to set various values - mostly numeric, but some are not.
    I would like to make them wrap around when either the max or min values are reached.
    Is there an easy way to do this?
    I was hoping for something like an "enableWraparound" property, but I haven't found such an animal.
    I suspect I could add value change listeners to all the components and do it by brute force,
    but there are too many spinners scattered around to make that an option I would like to take.
    Any suggestions?
    Thanks.

    Ok, it looks like custom spinner models are the way to go.
    Hopefully, I can create a couple that are generic enough to meet my requirements without too much pain.
    It looks like the ones I have already created will be easy enough to modify.
    Thanks for the feedback.

  • Is there an easy way to clear the contents of Download Folder?

    Is there an easier way to clear out files (send to trash) from the downloads folder, other than dragging one by one? The downloads folder closes immediately upon dragging one file out.

    You do not need to invoke Finder to do this. Create a new empty Automator workflow and use the "Run Shell Script" option. Paste in the following....
    mv ~/Downloads/* ~/.Trash
    You can then save the workflow as an application, attach it as a Finder action or add it to the scripts menu, whichever you like better.
    If you would like to bypass the Trash and just completely delete the Downloads folder contents immediately, then paste in this command:
    rm -rf ~/Downloads/*

  • HT1660 is there an easy way to delete the whole itunes library and and start again. I notice there is only an add file/folder button but no remove facility

    I recently upgraded to the iphone 5 and managed to sort the transition out with little trouble but noticed when I tried to put my music on that Itunes has messed with album info and either it or me has generated several copies of the same albums over the years and it makes it quite dificult to sort it all out before reloading on the phone. To stop the chaos I had hoped to clear the library and start again but cant find a way to do it. I was hoping to sort all my music out in original files and consolidate them into a proper folder. HOw do I do this. I notice there is an add fole and folder button but no take away??? is there an easy way?

    Use Shift > View > Show Exact Duplicate Items as this is normally a more useful selection. You need to manually select all but one of each group to remove. If you have multiple references to the same files then don't send to the recycle bin. Use my DeDuper script if you don't want to do it by hand. See this thread for background and please take note of the warning to backup your library before deduping.
    (If you don't see the menu bar press ALT to show it temporarily or CTRL+B to keep it displayed)
    tt2

  • Is there an easy way to reimport all songs in my itunes folder?

    This may sound like a weird question but here goes... When I bring up my iTunes I have 8731 files (mostly music) that come to about 41.33G's but when I right click on my iTunes Music folder and select properties there are 8809 files and a total of 48.5G's. I am trying to free up some disk space and can't figure out why there is such a difference. I had issues with Norton 360 and removed it but I had to restore my music files from an external drive and when I did so I lost the links for music that I added after my last back-up. I noticed that TV shows I bought from Apple were not in my iTunes but I was able to locate them in the folder, and import them back into iTunes. I have a feeling there are music files in my folders that are not linked to iTunes but can't figure out how to import them without going through all 8800+ files. Is there an easy way to import all the files without losing the current playcounts or a way to figure out which files may be duplicated in my iTunes Music folder. Seems like I am wasting 7G somewhere that I would like to recover. I already went through the duplicate songs and that didn't help. Any suggestions would be great...
    hp pc m260n   Windows XP   media center

    I have a feeling there are music files in my folders that are not linked to iTunes but can't figure out how to import them without going through all 8800+ files. Is there an easy way to import all the files without losing the current playcounts
    AFIK there isn't an easy way of linking up to a lot of dead tracks and retaining play counts etc, except by finding the dead tracks and repairing each link individually. The only exception to this is if there is a simple error in the path that can be fixed by a search and replace on the xml library file, then rebuilding the library. However it doesn't sound as though that would be a solution for you.
    This MacMuse tip has a way of finding dead tracks if that helps.
    http://discussions.apple.com/thread.jspa?threadID=121967
    It is much simpler to sacrifice the playcount information and just reimport your iTunes Music folder. Then you can eliminate the dead tracks with a script. One of the forum members has written one that you can find here:
    http://home.comcast.net/~teridon73/itunesscripts/

  • I am looking to "move out" of my computer and into my wife's, is there an easy way to accomplish this task, keeping all my files and setting up a second user?

    I just bought a new external 3TB hard drive for this task and want to keep my items seperate from hers for both our sanity.
    I figured that I would do a time machine back up and use that to do the move part of things.
    But as to setting up the new user on her computer I am just not sure if I can "tell" the computer to only use the new drive for my stuff and only acces the new drive for all things related to that new profile.
    More then anything else I want to be able to say that all things that are hers have not been touched/acccesed/deleted by any of my actions. And that I am "confined" to the new drive.
    I hope this makes sence.
    Mr Geef

    I have a feeling there are music files in my folders that are not linked to iTunes but can't figure out how to import them without going through all 8800+ files. Is there an easy way to import all the files without losing the current playcounts
    AFIK there isn't an easy way of linking up to a lot of dead tracks and retaining play counts etc, except by finding the dead tracks and repairing each link individually. The only exception to this is if there is a simple error in the path that can be fixed by a search and replace on the xml library file, then rebuilding the library. However it doesn't sound as though that would be a solution for you.
    This MacMuse tip has a way of finding dead tracks if that helps.
    http://discussions.apple.com/thread.jspa?threadID=121967
    It is much simpler to sacrifice the playcount information and just reimport your iTunes Music folder. Then you can eliminate the dead tracks with a script. One of the forum members has written one that you can find here:
    http://home.comcast.net/~teridon73/itunesscripts/

  • Is there an easy way to filter a 2-d array based on the values of two of the fields?

    Is there an easy way to filter a 2-d array based on the values of one of the fields. In my attached VI the output array has the following format:
    TimeStamp        Ident                Frame Type          Bytes    Data
    10:57:07.621   3AD00016   CAN Data Frame   8          0000000000000000
    10:57:07.622   3AD00017   CAN Data Frame   8          000005E000000000
    10:57:07.624   3AD00018   CAN Data Frame   8          0000000003300000
    10:57:07.625   2DC00000   CAN Data Frame   8          0000000000000000
    10:57:07.626   3AD00019   CAN Data Frame    4         0000030000000000
    I would like to delete any rows that do not have an "Ident" between the values of 3AD00000 and 3AD0001E. So for the above data the fourth row would be deleted. The only way I can see to do it is to form a 1-d array. Is there a better approach?
    Thank you.
    Solved!
    Go to Solution.
    Attachments:
    CMM_SN_MULTI.vi ‏20 KB

    Hi chuck72352,
    after you have sorted your data, you can use the InRange Function. Combined with a "search 1D Array" you'll get the range you really want.
    Mike
    Attachments:
    ArraySubset.PNG ‏25 KB

  • Is there an EASY way to submit podcasts to the itunes store? i've tried creating podcasts in garageband, then somewhere after wordpress  itunes  doesn't recognize the feed. my process has been (i am open to suggestions for other free and EASY services/me

    is there an EASY way to submit podcasts to the itunes store? i've tried creating podcasts in garageband, then somewhere after wordpress  itunes  doesn't recognize the feed.
    my process has been (i am open to suggestions for other free and EASY services/methods):
    garageband : create & edit audio. add 1400x1400 image.
    share to itunes.
    drag file to desktop.
    upload .m4a file to google drive.
    create a link post in wordpress using "podcast" tag & create "podcast" category.
    click on "entries rss" in wordpress, which takes me to the rss subscribe page (which is basically just my wordpress address with "/feed" at the end.
    i copy this url.
    go to itunes store > then "submit a podcast"
    itunes gives me the error message "we had difficulty downloading episodes from your feed."
    when i try to subscribe to my podcast in itunes, it does, but gives me no episodes available.
    i went back into wordpress and changed settings/ reading settings to : "full text" from "summary"
    still the same error message.
    i added a feedburner step after wordpress but got the same errors. i don't think i should have to add feedburner.
    wordpress seems to be encapsulating the rss, what am i doing wrong?
    this so much easier when you could go directly from garage band to iweb to mobileme; i miss those apple days (also idisk).

    if anyone has a super EASY process, i would LOVE to know what it is. EASY, meaning no html and also free. there are many free online storage systems available, many of which i currently use. the above process was just me trying to figure it out, if you have an easier method, please share. thank you so much!

  • Is there an easy way to generate a site map of an APEX application ?

    Hi.
    Is there an easy way to generate a site map of an APEX application ?
    Thanks.

    Depends on your definition of "easy"...
    Patrick Wolf provided one way to do this a few years ago.

  • PSE10: Is there an easy way to add a vignette?

    Besides using Filter > Correct Camera Distortion, is there an easy way to put a vignette on a picture?  The method I just named doesn't give me the smooth, uniform fade that I need for creating collages, etc.  Thanks!

    Sure, just use any selection tool to make your selection.  Here, I simply used an elliptical selection:
    Then, use Select...Feather to feather the selection.  I used 10px.  Hit the Ctrl+J keys to copy that feathered selection to a new layer with a transparent background:
    Ken

Maybe you are looking for

  • Report is not getting refreshed after changing prompts once again?

    HI, I am running some webi and deski reports using webi sdk also i'm handling the prompts of report. Problem is that if i ran the parametrized webi or deski report then my application shows the prompt page then i fill all the prompt for the report it

  • Horizontal menu bar shows serif type font in Live View and Preview but sans serif is in css file

    Help I am using the Spry horizontal menu bar and while it is working fine, it is showing a serif font in Live View and in all Browsers even though I have selected a sans serif font. What gives? I have attached the SpryMenuBarHorizontal.css

  • F4 search help

    Hi, I have created some custom fields for shopping cart cost assignment. The custom fields have been added to the structure INCL_EEW_PD_ACC_CSF. Now in the web the fields are displayed under cost assignment with a search help (binocular icon) next to

  • Custom Employee Number Generation Using Fast Formulas

    Hi, I have a requirement to generate custom employee numbers like "EMP100001". we have already created a business group with the setting of Employee number generation as Automatic. but we need to generate custom employee number as Format given above

  • Badge ID (TIMEID_NO) update in HR-PDC interface

    Dears, I have just set up the HR-PDC interface connecting to subsystem Honeywell Enterprise Building Integrator (EBI). We are running some tests and the first issue we identified was related to employees with new badges assined (field TIMEID_NO). If