Tree node images changes.. with start and stop button

I create the animator extends JPanel, which start and stop can be controlled with Swing Timer. It works fine with animation control over the panel.
Now, I have a tree with each image at each node.
when the start button clicks, one node image should be animated.
It is implementable. If animation.gif would have worked, I did't have to do this, but animation gif has fatal error with time interval.
any words would be appreciated. Thanks =

Damn !
With version 1.2.1 I think you'll have to create a new class that extends PositionPathInterpolator and add a pause() anr resume() method to it.
i suggest something like:
public class MyPositionPathInterpolator() extends PositionPathInterpolator {
// add some constructors if necessary
private float pauseAlphaValue = 0;
// override computeTransform method
public void computeTransform(float alphaValue, Transform3D transform) {
   float newAlphaValue = alphaValue + pauseAlphaValue; // calculate new alpha value
   if(newAlphaValue > 1)  // modify it if it is out of bounds
      newAlphaValue -= 1;
   else if (newAlphaValue < 0)
      newAlphaValue += 1;
   super.computeTransform(newAlphaValue, transform); // computeTransform with the right alpha value
public void pause() {
   this.setEnable(false); // it won't compute transform anymore
   pauseAlphaValue = this.getAlpha().value(); // retrieve current alphavalue
public void resume() {
   pauseAlphaValue -= this.getAlpha().value();
   this.setEnable(true) // restart computing transform
}Now you invoke pause and resume methods on your myPositionPathInterpolator object when user clicks on the buttons.
Of course it is a trick and it will work only with increasing alpha.
c ya
GnG

Similar Messages

  • I am trying to create a ringtone, when I right click and and go to get info I can't open anything under options. Itunes is not allowing me to do anything under options including changing the start and stop times. ??

    I am trying to create a ringtone, when I right click and and go to get info I can't open anything under options. Itunes is not allowing me to do anything under options including changing the start and stop times. ??

    GarageBand '11 - Create an iPhone ringtone - Apple Support

  • Action Script 3 code not working for start and stop button?

    Ok so I have this simple animation I created of a circle that moves from one side of the stage to the other. I have added a new layer and called it buttons. On this layer I have added 2 buttons. One for start and another one for stop. The purpose is to get my circle to move from one side of the stage to the other but be able to use my buttons so that I can start and stop the animations at random times during playback. I fixed all my compiler errors now the problem lies in that everytime I click the start or the stop button I get an output error. I have a 3rd layer in which is titled actions and this is where all my code is posted. I removed that layer and placed my code in the first frame of the buttons layer to see if this would change anything but I still get the same output errors. So I just added back my actions layer. What could I be doing wrong? I have made sure to name all my movie clips and buttons correctly and I even added an instance name to them.
    Here is my code and the errors I am getting when I press the play and stop button on test-
    start_btn.addEventListener(MouseEvent.CLICK, startCircle);
    stop_btn.addEventListener(MouseEvent.CLICK, stopCircle);
    function startCircle(e:MouseEvent):void{
        circle.play();
    function stopCircle(e:MouseEvent):void{
        circle.stop();
    green_btn.addEventListener(MouseEvent.CLICK, greenCircle);
    red_btn.addEventListener(MouseEvent.CLICK, redCircle);
    function greenCircle(e:MouseEvent):void{
        circle.play();
    function redCircle(e:MouseEvent):void{
        circle.stop();
    Here are my output errors-
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
        at exercise2_fla::MainTimeline/redCircle()
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
        at exercise2_fla::MainTimeline/greenCircle()

    ok so my circle is my movie clip and it is titled circle and the instance name is circle. Am I supposed to change MovieClip to circle? I put the code at the top of my actions script but for some reason it did not work. I did change play to stop and it got the movie clip to stop when I do test movie but my buttons still do not work. So I changed stop back to play. Strange.
    I did try changing MovieClip to circle but that did not work so I did Circle with a capital C and that did me no good eigther.
    I meant to add that I did get an error that said- 1180 Call to a possibly undefined method circle.

  • Frequency counter with start and stop - Need help

    When No load, 200VA Unity , 400VA Unity, 600VA Unity, 400VA LAG, 400VA LEAD or Short is active Frequency Counter starts.
    When OFF and BENCH PWR is active Frequency Counter stops and is grayed out.
    Frequency Counter is grayed out when BENCH PWR is inactive
    Any one know ho to do this?
    Attachments:
    Buttons.vi ‏77 KB

    In order to enable or disable a control you need to write a U8 value to the Disabled property of the property node for that control.
    The values are:
    0 = Enabled
    1 = Disabled
    2 = Disabled and Grayed Out
    Kelly Bersch
    Certified LabVIEW Developer
    Kudos are always welcome

  • How to run and stop LabView code without using start and stop buttons

    Hey
    I've attached my code that I'm going to use with thermocouples. What I'm trying to do is: when I hit start button the code should run for a minute then stop for 5 minutes and then start again, this process should be repeated twice . Could you please suggest the appropriate way to do it.
    Regards 
    Rajab
    Solved!
    Go to Solution.
    Attachments:
    temp. samples.png ‏24 KB

    Rajab84 wrote:
    Hi altenbach
    Thanks a lot for your help, I've tried the state machine, I’ve created 5 case structures as following: start for 1 min, stop 5 min, start again for 1 min, stop 5 min, restart again 1 min and finally stop. I’ve tried the code and it didn’t work. Could you please have a look at the attached code and let me if I need to change something. I think I’ve not used the elapsed time function properly. 
    Best Regards 
    Rajab
    you really dont need to repeat cases (2x)...using a shift register will reset your timer function once the timer has reached it's set limit. the "bool crossing" is used to tell me when the "5 min" case is done and increments the cycle count....ofcoarse, change the "seconds" constant to your desired time on the elapsed timer of this example 
    and you could "or" the stop to the "compare = 2" or change the select "wait" to "exit" with a constant connected to the stop
    Attachments:
    Untitled 2.vi ‏42 KB

  • Starting and stopping video and MP3

    I can't seem to get around my video and audio files starting when I arrive at the page. I'm even using some example code with start and stop buttons. This is in CS4 Flash. I expect it's because the ActionScript is in the wrong place because when I run the movie it flashes through all of the pages on the site without stopping at the home page. Is there some generic code that will allow me to simply swap out the name of the video or audio file I want to start. If there is, do I need to locate it on its own layer at the top of the timeline? Thanks to anyone who can help.

    >>Why is it that the default setting for a video player placed on the stage
    is to start playing when the page appears? I would think it would be
    paused.<<
    I don't know it doesn't seem any more logical to have it paused. I assume it
    is just a preference on the part of the developers of Flash.
    >>Is there some piece of script that can correct this situation<<
    There are several ways to pause the video playback at teh beginning of the
    Flash movie. It actually depends on how you have the movie inserted into the
    time line. If you used an FLVPlayback component, then all you have to do is
    click to select the component, open the component inspector
    (window>component Inspector) and se the autoplay value for the component to
    false. If you have the video inserted another way let me know.
    >>Forgive my naivete but I am trying to learn the ways of Actionscript
    wherever I can find it and builds something at the same time.<<
    Thats always hard. What tecnology do you normally work with Ajax? C++
    The comment about the behavior of video suggests you work with a technology
    that has the opposite autoplay behavior.
    Jerron Smith

  • HT1349 cant change start and stop time on aac file using PC

    I am trying to create a ringtone for my iphone.   So i created a AAC file of the song i wanted as a ringtone.  And I am doin exactly what the videos say.  So when i click Get INfo on the AAC file, it says i am supposed to be able to change the start and stop type. but it doesnt allow me to do so. 

    Set the start/stop where you want. Then right-click on the song in your library and choose "Convert Selection to mp3." This creates a new shorter file, files it by artist/album, and adds it to your library. It will play correctly inside or outside of iTunes.
    After you've confirmed the new one plays OK, you can either keep or delete the longer original, as you wish.
    Note that the above assumes that the source file is unprotected, which is true in your case, since you are starting with an mp3.

  • Add-on  starting and stopping using Buttons In SAP BusinessOne

    Hi,
    I have a requirement that   Add-on should be  start and stop should  be done using Button.  When ever i click on Button add-on should start and  after click the button add-on should be stop...
    anyone  have any idea...
    Thanks,
    Y.

    Well... stopping it is no problem, you can stop the addon with a button. But starting it with a button? What is going to place this button in B1? And what is going to handle the event of the button being pressed to start the addon?
    This can't be done without creating another addon (or using an existing one) just to create the button and listen for its event. So it kind of defeats the purpose.
    But all users can have access to addon manager, why not just trigger it from there, where there already are Start and Stop buttons?

  • Measurement mark for start and stop interval

    I have added measurement mark as Start interval and Stop Interval and saving that in the Time interval measure as indicator for BAM in my BPM Process.
    This is to calculate the time it takes to finish some task. e.g.
    A. process is started
    B. Start Interval measurement mark is added and saved in measure BAM indicator
    C. some task takes places.
    D. Stop Interval measurement mark is added and saved in measure BAM indicator
    But, when I create the report, the measure indicator doesn't have any value.
    I think I am doing something wrong, but don't know what.
    Has any one done this or come across this situation.
    Thanks

    Dear sir,
    My application development steps are as follows:
    1. My application consists of three control buttons are Start, Stop & Exit
    2. Initially input parameters validation (Limits are assigned)
    3. If any value entered out of limit, it will show the error message and the start button will gray and disabled. The user should not start the application until entered values are valied.
    4. Internally some conversions and logics are implimented.
    5. Coming to Front panel (GUI) start button is green color and stop button is red color.
    6. The user entered the correct parameters and he started the appilication. After sometime he should know already application was started and he should not start again until he stops the appilcation.
    For this i need logic for start and stop buttons to implement in my application. Thats why i choosen the traffic light concept changing the colors vice versa (which button shows green he should press that perticular button).
    Please suggest me or provide any better option for start and stop buttons.
    Regards,
    S Nagaraju

  • Pump Start and Stop?

    While making the I/O list, I have identified theDigital Ouput,  Port0/line1 as start for the pump and Digital Output, Port0/line1 for stop i.e is two port, lines, of the pump...but while making the software, VI, I am using the verticle toggle switch to consider the start of pump as up and stop as down of the toggle switch which works at one DO port line.
    How can I give two signal start and stop to the pump?
    Should I use two buttons? Which ones?
    I am confused. Please let me know.

    What do the two DO lines do?  Ultimately there will be one device (contactor, relay, thyristor, ...) which has two states (like a single boolean) to turn the pump on and off.  How do the two digital lines connect to that control device?  Are they inputs to some kind of electronic pump controller or are they simulating the standard industrial Start and Stop buttons via relays? Something else?
    You can use the single switch on the front panel and the boolean Not function to create the two lines for your DO.
    Lynn

  • Create Run And Stop Buttons on Front Panel, rather than using the toolbar run/stop

    I would like to make my vi more user friendly by creating start and stop buttons on the front panel. I havent found much info on how to create them. I have created a boolean stop button to stop my FOR LOOP.
    -Chris

    Creating the buttons is easy - just select the style you want from the Boolean palette. What you need to do is change your diagram and the VI properties. To have a VI automatically start running when opened, open VI Properties by selecting that under the File menu or right clicking the VI's icon. Select Execution and check the Run when opened box. If you need the user to enter some data or change parameters before running the program, there's a couple of ways to go about it with a front panel Start button. You could have a separate while loop with just the start button in it and connect an output of that to a main while loop. This creates data flow and ensures that the start while loop executes before the main. You could create a simple state machine. T
    here's a couple of shipping examples. Just open the Example Finder and enter state for the keyword. You could also use the Event structure. Again, there are several shipping examples. Instead of doing a search, you could also browse the Example Finder and look at what's underneath the Building User Interfaces topic.
    p.s. I don't think you created a stop button for a for loop as there is no way to stop a for loop. What you can stop is a while loop.

  • I do not have the 'Advanced' tab on the menu bar. I am trying to change ringtone on my iphone 4s. Have done the following: Right cick on song, entered the start and stop times, but unable to proceed as need 'Advanced' tab in order to change to option.

    I do not have the 'Advanced' tab on the menu bar. I am trying to change ringtone on my iphone 4s. Have done the following: Right cick on song, entered the start and stop times, but unable to proceed as need 'Advanced' tab in order to change to option.

    You don't need to upgrade your software.  But if you're struggling with Spry, IMO you should cut your losses and switch to something better for the longrun.
    If you have a budget to work with, I highly recommend Project Seven's Pop-Menu Magic 3.  It's easy to use in DW CS4, 5, 6 or CC.  More importantly, it's bullet proof and works in all devices. 
    Pop-Menu  Magic3 by PVII (commercial DW extension)
    http://www.projectseven.com/products/menusystems/pmm3/index.htm
    If you don't have a budget to work with, you can roll your own menus with jQuery plugins.  A bit more effort on your part, but they perform better than Spry.
    jQuery Superfish
    http://users.tpg.com.au/j_birch/plugins/superfish/
    jQuery MegaMenu2
    DEMO:
    http://www.geektantra.com/projects/jquery-megamenu-2/
    DOWNLOAD:
    http://code.google.com/p/jquery-megamenu/
    Nancy O.

  • My ipod nano 7th gen. won't save the changes I make to a song's start and stop time. How do I fix this?

    So I have a few songs that I don't like the intro to or the end of it that I had cut to where I wanted on my previous ipod. When I try to do the ame thing with this one with the start and stop time, it will work for awhile and then randomly start and stop where it had originally. I have done it like 4 times now for some songs and I can't seem to get it to stick. Suggestions?

    If you use the Sync feature in iTunes, then it needs to be done to the song in your Music Library, then synced with the iPod.  If you do not use the Sync feature and are performing the changes to the song on your iPod specifically, then the setting may be getting overwritten when you drag the song that's already on the iPod back onto the iPod.  It will overwrite all local settings for the song on the iPod with the settings in your library. 
    Try performing the changes to the song in your music library, and then dragging it back over to your ipod (or Sync your iPod if you use that feature).  This will make sure that the setting are consistent in both your library and iPod in-case you were to ever overwrite the song once more.

  • I want cRIO to start and stop acquisition with push of physical button on cRIO, is that possible?

    When using my cRIO 9024 on the field, I prefer  to be able to start and stop acquisition with push of a physical button on cRIO. 
    I mean I don't want it to be "as start-up," I don't want cRIO to start acquisition as soon as the power is supplied. 
    Is that possible?
    Solved!
    Go to Solution.

    Hi Cashany,
    you surely can read that switch status. But there are easier (but more expensive) ways to switch a button. Fiddling with a pen or small screwdriver to switch USER1 isn't what I call "user friendly"...
    - You have atleast 2 voltage inputs on your module available. Use a switch to supply voltage to those inputs. Use a "real" button!
    - You have a serial port available. You could set some pins to GND or voltage and check their status inside cRIO/RT target...
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Windows script to start and stop jobserver only, with BOXI31

    hi,
    my question is easy but i have found nothing : on BOXI31
    how  to start and stop jobserver (adaptive...) automaticaly with windows script ?
    in tasklist command, jobserver have no services name...
    thank's

    In XI R2 you can stop & start job servers by their types, but in XI 3.1 I don't think you can do that, b'cos it doesnt list by server type just shows jobserver for crystal, webi & deski.
    Thanks,
    Hari

Maybe you are looking for