Animating Components

Hi all.
I've got a video interface happening with the following
component instances:
FLVPlayback
SeekBar
VolumeBar
PlayPauseButton
MuteButton
The issue I'm having is that when the user clicks a button to
close the video (the button isn't a component) and the interface
closing animation happens, the instances of the SeekBarHandle and
VolumeBarHandle stay right where they are even after the blank
keyframes in the timeline forces the VolumeBar and SeekBar
instances to disappear.
How do I get the SeekBarHandle and VolumeBarHandle instances
to disappear when the now non-existant SeekBar and VolumeBar
instances within which they're nested disappear?
Any help is appreciated.
JP
Donkey Ink Design

Hi Folks,
Donkey Ink have you managed to resolve this? I ask, because I
also seem to have the same problem with the seekbar component.
I have the seekbar attached to an FLVPlayback instance in one
frame, when I progress the timeline to the next frame the
seekbarhandle seems to remain on the stage (when testing the movie)
even though all compenents seem to have been removed from the
stage.
Any help would be greatly appreciated.
Thanks

Similar Messages

  • FCP X Visual Effects Animation Components

    How does FCP X Visual Effects Animation Components compare to that of FCP 7?

    Light years ahead.
    Download the free 30 day trial to find out.
    http://www.apple.com/finalcutpro/trial/

  • Integrating Flash Animation Components in Standard iPhone Application

    Hi there,
    Will it be possible in Flash CS5 to use a flash animation in a generic OpenGL ES Frame as a GFX component ?
    For example I have a OpenGL ES Frame were I am drawing polygons, rasters and stuff with standard Objective C, and I would like to add, on top of that, a Flash animation generated by Flash CS5. The kind of thing we can do with Scaleform for example.
    That would be just great ^^
    Fabien

    In the Flash CS5 Beta we have seen this was definitely not possible.

  • Photoshop CS5 Animation Help

    I'm currently working on a banner design in which certain animation components need only to loop one time while other components need to loop forever. Is there a way that I can choose specific layers to loop once and choose others to loop forever within the same animation scheme?

    Of course GIF can save animations with multiple Frames which are represented by multiple layers in the document.  I don't think PNG can do animation at all, however.
    Have you tried altering the amount of RAM you have allocated to Photoshop in the Edit - Preferences - Performance menu?
    -Noel

  • Animating under components

    I have a simple animation routine that updates every few miliseconds (based on the individual object) that is being called by a seperate Thread. The animation only needs to occur in a specific JPanel but I'm having the specific problem of the animated images appear above other components that happen to be in front of the panel at the time - namely the parent JPanel's menus. Currently, the thread (within the panel) calls "animationMethod(this.getGraphics());".
    This was not originally the problem, when I called repaint() and drew the simple animation in the paintComponent method. However, the updates were so frequent that the remaining components would not update until selected, so if the window was minimized or moved off screen, the components would vanish until intereacted with again.
    Since solving either problem would help me through this, I'd appreciate a solution to either (or both, if you're feeling generous and/or wise). I hope I've given enough information. Thanks in advance!

    This was not originally the problem, when I called repaint() and drew the simple animation in the paintComponent method. This would be the better approach.
    so if the window was minimized or moved off screen, the components would vanish until intereacted with again.Well, you have a bug with your code. We have no idea what your code looks like. With your vague description of the problem I'm not sure how you expect us to help.
    If you need further help then you need to create a [url http://homepage1.nifty.com/algafield/sscce.html]Short, Self Contained, Compilable and Executable, Example Program that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.
    And don't forget to use the [url http://forum.java.sun.com/help.jspa?sec=formatting]Code Formatting Tags so the code retains its original formatting.
    I've posted some simple animation code that may help you out "timeranimation" and "timeranimation2". You can search the forum to find them.

  • [svn:fx-trunk] 10209: reverting commit 10198, which affected animation for some halo components like Tree and ComboBox.

    Revision: 10209
    Author:   [email protected]
    Date:     2009-09-12 17:36:41 -0700 (Sat, 12 Sep 2009)
    Log Message:
    reverting commit 10198, which affected animation for some halo components like Tree and ComboBox. Should wait for either the real fix (involves RPC changes) or at least a fix that limits the scope to only Flex4 effects instead of all uses of UIComponent.suspendBackgroundProcessing.
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/LayoutManager.as

  • Using animated text components

    Is there a way to figure out how many frames a text effect
    will need to complete it's cycle by looking at the component
    inspector.
    Or is it just a trial and error kind of thing. I downloaded
    the supreme4 effects and they are pretty cool.
    thank you
    kevin

    PS 3D text and AE 3D text at this point are two completely different, incompatible things. You cannot even import 3D PSDs because due to running out of time and resources to do it, it has been stripped from CS6, while it existed in CS5.5 down to CS4. So whatever you do, you will have to re-create it from scratch in AE. If you use native text layers, then yes, they will be able to use the text animators to allow animating letters separately as will creating each extrusion as a separate shape layer. many ways to skin the cat.
    Mylenium

  • Animation in custom components

    I'm trying to add animation to a component that I have several instances of, and it reaches across applications, so I'd rather not re-write the effects each time. But, the component in question is a s:Group, and when I toss in animations, it tells me: 'Sequence' declaration must be contained within the <Declarations> tag, since it is not assignable to the default property's element type 'mx.core.IVisualElement'. But, when I drop my declairation into fx:Declairations, it no longer works. I'm sure this is an easy thing to fix, but please help!

    Never mind. I found it. I didn't specify an alphaFrom or alphaTo, and had the duration set for 2 miliseconds instead of 2 seconds Just putting my Sequence and my Parallels in my Declarations block does indeed work.

  • How to add an event after ALL the components of an animation(incl. symbols)were created and played?

    I would like to add a button/trigger that goes back to the beginning of the animation when all the elements of my composition, including symbols which have their own timelines and trigger buttons, were created and drawn/played. It should be independent of the main timeline.
    Is there any way to do it?
    Thanks!

    Can a click event handler be added to the stage to control symbols that are on the stage?  Like this question How to add a symbol event handler (on click or on mouseover) on the stage timeline
    Basically we are looking for way to load in a bunch of instructions at run time, instead of having to individually control each individual symbol.

  • Group components for animation

    I have a bunch of components- images, fxps, swc-based movieclips etc to create a single physical entity- the entity needs to be moved based on a timer.
    How do I set the "grouping" of the set of components, so I can handle them as a single entity...
    Appreciate any pointers/ guidance. Thanks

    If you are using the spark effects you can set an array of targets, for example:
    <s:Move xBy="100" targets="{[myRect, secondRect, ...]}" />

  • Importing .GIF into Fc will not play the animated gif in output

    I imported a animated .gif  (attached video.gif) into Fc (of a sequence of pics I took saved as an animated .gif)
    It inported as a "bitmap image" and upon export to swf it did NOT show the .gif as an animated .gif but just shows the first frame..
    (It did not put this file into an assests folder...)
    So I converted the "bitmap image" into an optimaized graphic...and NOW it DOES put the original animated gif into the "assets" folder with a Graphic1.fxg and video.gif in that folder.. and If I open the gif in the assest folder it plays it as the animated .gif it is..
    BUT SADLY upon export to SWF it still DOES not play the gif as an animated gif.. just the first frame...
    Can I do anything in the code to tell the swf file that is exported to play the gif in the assest folder as an animated gif not just show the frame?
    I did the animated gif approach becasue I setup a photoshop cs4 file with a quicktime video as a layer and Fc only brought in the first frame of the quicktime layer..
    Could the next beta of Fc include the ability to import and play animated gifs as artwork as well AND/or to import Ps Cs4 video layers as videos
    So I would have to created a video page in flash pro and import that as a object? into a state?
    (no experience with flash pro but just bought cs4 and will try to learn FlashPro overweekend)

    Interesting. I don't think this is somethign you can do in Flash Catalyst. We have .GIF support in the Flash Player but I don't think you can use a GIF asset inside Catalyst. If you need that GIF to play you'll have to embed it using Flash Builder.
    But Flash Catalyst will support video version 1.0. I don't think you can turn arbitrary layers into "video" layers but you can bring in video files (like .FLV) and then attach components to behaviors (like play, stop, etc).
    =Ryan
    [email protected]

  • Animated GIF image gets distorted while playing.

    Hi,
    I have some animated gif images which I need to show in a jLabel and a jTextPane. But some of these images are getting distorted while playing in the two components, though these images are playing properly in Internet Explorer. I am using the methods insertIcon() of jTextPane and setIcon() of jLabel to add or set the gif images in the two components. Can you please suggest any suitable idea of how I can get rid of this distortion? Thanks in advance.

    In the code below is a self contained JComponent that paints a series of BufferedImages as an animation. You can pause the animation, and you specify the delay. It also has two static methods for loading all the frames from a File or a URL.
    Feel free to add functionality to it, like the ability to display text or manipulate the animation. You may wan't the class to extend JLabel instead of JComponent. Just explore around with the painting. If you have any questions, then feel free to post.
    The downside to working with an array of BufferedImages, though, is that they consume more memory then a single Toolkit gif image.
    import javax.swing.JComponent;
    import java.awt.image.BufferedImage;
    import java.awt.Graphics;
    import javax.imageio.ImageIO;
    import javax.imageio.ImageReader;
    import javax.imageio.stream.ImageInputStream;
    public class JAnimationLabel extends JComponent {
        /**The default animation delay.  100 milliseconds*/
        public static final int DEFAULT_DELAY = 100;
        private BufferedImage[] images;
        private int currentIndex;
        private int delay;
        private boolean paused;
        private boolean exited;
        private final Object lock = new Object();
        //the maximum image width and height in the image array
        private int maxWidth;
        private int maxHeight;
        public JAnimationLabel(BufferedImage[] animation) {
            if(animation == null)
                throw new NullPointerException("null animation!");
            for(BufferedImage frame : animation)
                if(frame == null)
                    throw new NullPointerException("null frame in animation!");
            images = animation;
            delay = DEFAULT_DELAY;
            paused = false;
            for(BufferedImage frame : animation) {
                maxWidth = Math.max(maxWidth,frame.getWidth());
                maxHeight = Math.max(maxHeight,frame.getHeight());
            setPreferredSize(new java.awt.Dimension(maxWidth,maxHeight));
        //This method is called when a component is connected to a native
        //resource.  It is an indication that we can now start painting.
        public void addNotify() {
            super.addNotify();
            //Make anonymous thread run animation loop.  Alternative
            //would be to make the AnimationLabel class extend Runnable,
            //but this would allow innapropriate use.
            exited = false;
            Thread runner = new Thread(new Runnable() {
                public void run() {
                    runAnimation();
            runner.setDaemon(true);
            runner.start();
        public void removeNotify() {
            exited = true;
            super.removeNotify();
        /**Returns the animation delay in milliseconds.*/
        public int getDelay() {return delay;}
        /**Sets the animation delay between two
         * consecutive frames in milliseconds.*/
        public void setDelay(int delay) {this.delay = delay;}
        /**Returns whether the animation is currently paused.*/
        public boolean isPaused() {
            return exited?true:paused;}
        /**Makes the animation paused or resumes the painting.*/
        public void setPaused(boolean paused) {
            synchronized(lock) {
                this.paused = paused;
                lock.notify();
        private void runAnimation() {
            while(!exited) {
                repaint();
                if(delay > 0) {
                    try{Thread.sleep(delay);}
                    catch(InterruptedException e) {
                        System.err.println("Animation Sleep interupted");
                synchronized(lock) {
                    while(paused) {
                        try{lock.wait();}
                        catch(InterruptedException e) {}
        public void paintComponent(Graphics g) {
            if(g == null) return;
            java.awt.Rectangle bounds = g.getClipBounds();
            //center image on label
            int x = (getWidth()-maxWidth)/2;
            int y = (getHeight()-maxHeight)/2;
            g.drawImage(images[currentIndex], x, y,this);
            if(bounds.x == 0 && bounds.y == 0 &&
               bounds.width == getWidth() && bounds.height == getHeight()) {
                 //increment frame for the next time around if the bounds on
                 //the graphics object represents a full repaint
                 currentIndex = (currentIndex+1)%images.length;
            }else {
                //if partial repaint then we do not need to
                //increment to the the next frame
    }

  • Animated .gif in JPanel

    Hello,
    I'm trying to render an animated .gif in a JPanel. I'm overriding paintComponent as follows:
       public void paintComponent(Graphics g)
          super.paintComponent(g);
          // center the background image.
          //backgroundImage is an Image
          if (backgroundImage != null)
             g.drawImage(backgroundImage, (this.getWidth() - backgroundImage
                   .getWidth(this)) / 2, (this.getHeight() - backgroundImage
                   .getHeight(this)) / 2, this);
       }The problem: I'm only getting the first frame displayed. What do I need to do to properly display the animated image?
    Thanks.
    Marc

    Adding a JLabel is not convenient, nor is it the proper way to do it. The panel has other components and coming up with a layout manager that will overlay components is not the proper thing to do.
    Creating a Thread is also not the proper thing to do.
    I found a solution that works fine. Instead of using an Image, I create an ImageIcon and use that to display the animated gif.
       public void paintComponent(Graphics g)
          super.paintComponent(g);
          // center the background image.
          // backgroundImage is an ImageIcon
          if (backgroundImage != null)
             g.drawImage(backgroundImage.getImage(), (this.getWidth() - backgroundImage
                   .getIconWidth()) / 2, (this.getHeight() - backgroundImage
                   .getIconHeight()) / 2, this);
       }Thanks for your help.

  • Animated GIF files in SWF

    I have an FLA file that is utilizing numerous animated GIF
    files the files themselves are also rather large. I was hoping that
    when rendering the SWF file it would simply render to the
    resolution stated and the individual components within the FLA
    should not matter. For example, a SWF file of 100 X 100 playing for
    10 Seconds would be half the size of the same thing running for 20
    seconds. And the number of GIFs or other elements within the FLA
    should not matter. This is obviously not the case... however I
    would like to know how I can effectively integrate animated GIF
    files without hugely impacting SWF file size.
    Thanks for you time :)

    If you are web deployed you can put an animated gif as the image to an iconic button.
    Image items cannot display animated gifs.
    Anything else you can do through a JavaBean if you need to.

  • Animated gif to be a Treenode image, can it?

    I would like to put the animated gif as a treenode image.
    But it doesn't show.
    Is there any way?

    I didn't read all the code here, only the heading, but maybe this could help:
    http://www.java2s.com/Code/Java/Swing-Components/AnimatedIconTreeExample.htm

Maybe you are looking for