Help with Reverse Animation On Button

The buttons are animated with a movie clip inside each button
and the movie clip plays on rollover, however I need this same
movie clip inside the buttons to play reversed, when the cursor is
moved away from the button.
I know how to do this with an instance but I already made
each button and fooled around a thousand times with the animation
and I do not wish to start over again!
I have only experimented with this type of action script
before and I must say I am a little lost =(
Can anyone help me as to how I would go about doing this ?
Any coding would help.
I know there is a simple way of doing it with action script,
but I have no more time to fool around and I need your assistance
=P
If you could supply the code it would help me out.
(I can modify it to work with my page and my buttons)
Just need something to work off of.
Maybe a code I can put on the button, or whatever you can
come up with.
For future reference,
thanks

Without knowing the details of what you have created, or the
code you have attempted to use, the best I can offer at the moment
is to say you need to have the reverse playing code of the
movieclip get triggered by the mouse out event and not stop
stepping back down the timeline until the _currentframe value
reaches 1. If another mouse over should occur, then it's your
decision as to whether it picks up from where it has stepped back
to or starts from frame 1.
Starting over again is often the better approach, since what
you may have created may not be able to facilitate directing things
to play in reverse.

Similar Messages

  • Help with flash animation!

    Hi there! My name is Dean and I've bought Adobe Flash CS4 4 months ago. I'm very new to flash and I've already made my first animation -
    http://www.swfcabin.com/open/1267200676
    but I'm here to ask a question.
    Well, I've been riding this cartoon -
    http://www.youtube.com/watch?v=bbUqEPUZ-ds
    and I was wondering, how did they do the hands and legs animation? It looks like the bone tool, but whenever I use the bone tool, I can't get it right! I always get wrong edges! Here are some pictures of my failures -
    http://img202.imageshack.us/gal.php?g=fail5.jpg
    anyway, I just couldn't get it right and I think it's because I draw it wrong.
    Please, any help will be awesome!
    mail: [email protected]
    msn: [email protected]
    Oh and by the way, about the lipsync, I think its a little jumpy, How can i make it better? (Like the Cartoon on top^)
    Thanks!

    Best to do it all in Flash or not Flash at all.
    Dan Mode
    --> Adobe Community Expert
    *Flash Helps*
    http://www.smithmediafusion.com/blog/?cat=11
    *THE online Radio*
    http://www.tornadostream.com
    *Must Read*
    http://www.smithmediafusion.com/blog
    "edmann1414" <[email protected]> wrote in
    message
    news:eqg06u$73n$[email protected]..
    >I am building my website in Dreamweaver MX 2004 and have
    been using the MX
    >2004
    > version of Flash for some of my slide shows. Those have
    been going well,
    > primarily because I have been following a tutorial, but
    for what I am
    > looking
    > for now, I cannot seem to find the right tutorial. I
    would like for the
    > buttons on my main page to "shoot" onto the page from
    the left just as a
    > user
    > opens the page and then for that animation to stop.
    Currently the buttons
    > are
    > rollover images with links to other areas of my website
    in dreamweaver,
    > and
    > with this animation I would only assume that Flash would
    be necesary. Do
    > I
    > have to remove the buttons in Dreamweaver and just
    create a movie in Flash
    > and
    > then position that movie where the buttons would be? Or
    can I have an
    > introduction movie for the buttons and then have my real
    buttons appear?
    >

  • Help with making a back button

    hi
    in a game im making i have a start menu that then when you click play goes to the game after playing the game, when you die a game over screen appears with a play again button in it i want to put a back button to go to the first frame.
    the way this is set up is that the game over menue is a movie clip with the play again button in it i want to have a back movie clip to make it go to the first frame
    gotoAndStop(1) dosent seem to work or mabye i am doing it wrong
    this my game class file as the game over menu does not have a class file:
    package com.alienattack{
              import flash.display.MovieClip;
              import flash.events.Event;
              import flash.utils.Timer;
              import flash.text.TextField;
              import flash.text.TextFormat;
              import flash.display.Stage;
              public class Game extends MovieClip          {
                        static var ship:MovieClip;
                        static var enemyShipTimer:Timer;
                        static var scoreText:TextField;
                        static var score:Number;
                        static var healthMeter:HealthMeter;
                        static var enemyHealthMeter:EnemyHealthMeter;
                        static var gameOverMenu:GameOverMenu;
                        static var powerUpTimer:Timer;
                        static var miniBossTimer:Timer;
                        static var RocketShipTimer:Timer;
                        var bossCountdown:Number;
                        static var Bombtimer:Timer;
                        private var _stage:Stage;
                        static var backgroundMusic = new BackgroundMusic();
                        var Bullet;
                        public function Game(){
                                     this.addEventListener(Event.ADDED_TO_STAGE,init);
                        function init(e:Event):void{
                                  _stage=stage;
                                  KeyClass.initialize(stage);
                                  stage.focus = this;
                                  ship = new Ship();
                                  ship.x = 300;
                                  ship.y = 150;
                                  _stage.addChild(ship);
                                  enemyShipTimer = new Timer(2000);
                                  enemyShipTimer.addEventListener("timer", sendEnemy);
                                  enemyShipTimer.start();
                                  RocketShipTimer = new Timer(3500);
                                  RocketShipTimer.addEventListener("timer", sendEnemyRocket);
                                  RocketShipTimer.start();
                                  resetScore();
                                  gameOverMenu = new GameOverMenu();
                                  gameOverMenu.x = 0;
                                  gameOverMenu.y = 0;
                                  addChild(gameOverMenu);
                                  gameOverMenu.visible = false;
    gameOverMenu.playAgainButton.addEventListener("mouseDown", newGame); (this is where i think the play again button is but how would i make it so it when to the first frame)
                backgroundMusic.play(0,1000);
                        static function gameOver()
                                  gameOverMenu.visible = true;
                                  enemyShipTimer.stop();
                                  miniBossTimer.stop();
                                  RocketShipTimer.stop();
                                  Bombtimer.stop();
                                  powerUpTimer.stop();
                                  for (var i in EnemyShip.list)
                                            EnemyShip.list[i].kill();
                        function newGame(e:Event)
                                  gameOverMenu.visible = false;
                                  ship.visible = true;
                                  ship.x = 300;
                                  ship.y = 150;
                                  ship.takeDamage(-ship.maxHealth);
                                  ship.addEventListener("enterFrame", ship.move);
                                  resetScore();
                                  enemyShipTimer.start();
                                  miniBossTimer.start();
                                  RocketShipTimer.start();
                                  Bombtimer.start();
                                  powerUpTimer.start();

    hi
    i make a new function back and change the new game to back but the screen does not go to the first frame
    gameOverMenu.backbutton.addEventListener("mouseDown", back);
    function back(e:Event)
                                  gotoAndStop(1);
    any help?

  • Need a little help with an animated JButton.

    I have a nice little button that on mouse entry runs a morf animation from one picture to another then stops.
    On leaving the button it runs the animation in reverse. The animation is done with two GIF images loaded as
    Icons using ImageIcon. Now this looks really nice, BUT it only dose it the first time the button is entered
    and the first time the button is exited. After this is abruptly switches from the "un-entered" button icon to the
    "entered" button icon (the end frame of the respective GIF animation's). I originally tried using the
    setRolloverIcon etc. When that did not work I thought that I would be able to get the images to be loaded
    each time by adding a MouseListener and using the mousePressed, mouseReleased, mouseEntered,
    mouseExited etc. methods. This gives me the situation described above. In the MouseListener methods a
    line like the following is used:
    ((JButton) e.getSource()).setIcon (new ImageIcon (MainWindow.
    class.getResource ("images/selected.gif")));
    How can I get the Button to run the animation every time it is entered | exited? The GIF from which the
    icons are made are set to run the animation through once, not an end less loop which would not be the
    desired effect.
    Any suggestions would be great
    Thank you
    M Pratten.

    Well I guess I should of just kept trying "lunch helps".
    Any way to get the image to reanimate each time the mouse pointer enters leaves the button I changed the
    code in the mouseListener to something like:
    ImageIcon i = new ImageIcon (MainWindow.class.getResource ("images/selected.gif"));
    i.getImage().flush ();
    ((JButton) e.getSource()).setIcon (i);
    I am assuming the flush puts the GIF animation back at its first frame so it has to redo the animation, which is
    exactly what I want.
    Now if any of the local experts know of a better way of doing this I would be happy to hear about it. But at
    the moment it seems to work just fine.
    Thanks to those that read my post.
    M Pratten.

  • Need help with flash animation and jump to slide

    I have been researching for days on how to build a menu in
    flash 8 that has links to jump to a slide later in the captivate
    lesson.
    The goal:
    I want to have a tab - when clicked on - opens up and shows a
    table of contents. Click on an item and it will jump to that slide.
    Method:
    I used flash 8 to build a tab and pop up menu. Works great.
    But how do I make the buttons or links to jump to slide?
    Is it possible to:
    * - use a roll over image in captivate - pause image and
    click on a button to pop over to the slide - no flash menus...just
    action script to pause and allow clicking.
    * - use a FS Command script from inside the captivate movie
    - java call in button proprieties.
    * - write the menu in flash - use action script to say "on
    release - jump to slide" or "on release - jump to frame" - I have a
    frame counter that I can find the frame number of the slide - but
    how would you get the script to work.
    Please Help -
    Flash not a good friend of mine - so any time I can avoid --
    is great...but it is what it is - i do anything to get it to work.
    Thank you in advance for your help and I really look forward
    to your thoughts.
    Regards -
    Vince

    Hi
    I didn't understand a few things here.
    1. Are you trying these things using Adobe Presenter or this is just plain Powerpoint you are talking about?
    2. Are you trying to view the output on the Slide show or presenter output
    If you are doing it for PowerPoint slide show, try setting the animations using with previous and after previous
    1. first insert the video. Set it to play automatically
    2. Insert the first text box. Apply animation on it saying "with Previous". This will make the animation play as soon as the video starts. If you want some delay apply some delay for the animation in the animation pane, such that the animation appears when the video has content sound
    3. For the remaining text boxes apply animations as "after Previous". This will make the animations play after the previous animation has completed.
    4. Now all you have to do is applay delay to the animations to adjust them as and how you want
    Hope this is what you wanted to achieve
    Thanks
    Mahesh

  • Help with Re-Linking Navigation Buttons

    I have Adobe Flash CS3 Pro.
    I have a navigation header flash file that came with my website template and I am having difficulty making sense of the actionscript. It has a logo section with effects, 5 main nav buttons that move, and two extra link buttons above the navigation bar. Let’s focus on just the Navigation buttons for now. Here is what I have gathered. I have multiple text buttons on one movieclip, and I have successfully edited the text for each button. If I look at the actionscript in the top layer of this movieclip I see:
    “gotoAndStop(parent._parent.num);”
    I also have a separate movieclip symbol (with effects) with 5 buttons layers listed in the actionscript with the following actionscript tied to each button from numbers 1 through 5:
    onClipEvent (load) {
                num=1;
    onClipEvent (load) {
                num=2;
    onClipEvent (load) {
                num=3;
    onClipEvent (load) {
                num=4;
    onClipEvent (load) {
                num=5;
    On the top layer of these 5 buttons I have the following actionscript:
    stop();
    this["item"+_root.button].gotoAndPlay("s1");
    _root.link = _root.button;
    I also have a separate button symbol with the following actionscript:
    on (rollOver) {
                if (_root.link<>1) {
                            menu.item1.gotoAndPlay("s1");
    on (releaseOutside, rollOut) {
                if (_root.link<>1) {
                            menu.item1.gotoAndPlay("s2");
    on (release) {
                if (_root.link<>1) {
                            _root.menu["item"+_root.link].gotoAndPlay("s2");
                            _root.link = 1;
                            getURL("index.html");
    Now my website template came with 5 html pages that my flash navigation buttons correspond to: (index.html, index-1.html, index-2.html, index-3.html, index-4.html, index-5.html). My problem is that I have created new pages (index.html, about.html, featured.html, projects.html, contact.html). I would like each of the 5 buttons to correspond to these pages, not the existing standard “index-n.html” pages. 
    Also, this is probably not relevant, but each html page has something to this affect so I can see how they correspond to each button.
    <script type="text/javascript">
              var fo = new FlashObject("flash/menu_vf8.swf?button=2", "head", "100%", "144", "7", "");
              fo.addParam("quality", "high");
                        fo.addParam("wmode", "transparent");
                            fo.addParam("scale", "noscale");
              fo.write("head");
            </script>
    I guess my real question is: What actionscript do I need to update or remove for the nav button LINKS to work with my new html pages rather than the standard 5 index-n.html pages that it automatically wants to link to?
    When I try and add a “getURL” command to each of the 5 buttons and test preview the movie, the links work, but it messes up the effects of the movieclip. In other words, the buttons don’t move, they are motionless, however the links work. If I added this command to each button in some way, what actionscript would I need to remove so there weren’t any complications? I need some expert help here for it would be much appreciated. I am a novice with Flash script and its killing me that I can’t figure it out. I asked for help from the template support and all they came back with was the following message and it wasn’t helpful:
    You need to duplicate each button you are editing - it is very important.
    2) Update the scripting to look similar way:
    on (release) {
    if (_root.link<>num) {
    _parent["item"+_root.link].gotoAndPlay("s2");
    _root.link = num;
    if (num == 1) {
    getURL("index.html");
    } else {
    getURL("index-"+Number(num-1)+".html");
    Update it to:
    on (release) {
    getURL("http://www.google.com");
    Also, I read through the following discussion, which was helpful to a degree, but it still didn’t answer my questions about getting the links to work.
    http://forums.adobe.com/message/3614092#3614092

    First of all, thank you for showing interest and helping out in my dilemma here. I wish I understood your meaning behind “on” because with my luck there is probably some hidden way of placing script on an object that I don’t understand or haven’t discovered yet.
    This is what I know:
    I have multiple text buttons on one movieclip entitled “textbutton1” (see previous picture), and I have successfully edited the text for each button and created two extra frames/buttons to make 7 total. If I look at the actionscript in the top layer of this movieclip I see:
    “gotoAndStop(parent._parent.num);”
    But there is no action on each individual frame (all 7 of them) on that layer.
    Like I mentioned before I have a separate movieclip symbol (entitled “menu effect”) with 7 button movieclip layers listed in the actionscript with the following actionscript on each layer.
    onClipEvent (load) {
                num=1;
    onClipEvent (load) {
                num=2;
    onClipEvent (load) {
                num=3;
    onClipEvent (load) {
                num=4;
    onClipEvent (load) {
                num=5;
    onClipEvent (load) {
                num=6;
    onClipEvent (load) {
                num=7;
    On the top layer (layer 4 frame 25) of these 5 buttons I have the following actionscript:
    stop();
    this["item"+_root.button].gotoAndPlay("s1");
    _root.link = _root.button;
    I can upload another particular image of the movieclip/actionscript if it would be helpful. Let me know.

  • Help with Quiz pages and buttons (please)

    We use Captivate 6 with a subscription. I have put together a couple of modules with question pools, and some with just a few questions pages inserted. The last time I created a new captivate project, I put inserted quiz pages and the buttons were different then they had been before. The first few times they were grey, now they are green and a bit smaller. Looking at the proporties for each page and button, I cannot see anything that is different othe than one is a text button and the other is a transparent button. Both buttons are marked as default quiz button style. I don't use any themes. To make this short, I would like to know if there is a way to make the buttons the same every time I add a page, or a pool? I am not yet up to designing my own buttons, but probably will here shortly. Right now I need to get some training modules completed as quickly as possible so I don't have the time to reinvent the wheel (so to speak). The only other thing that I noticed was different in the projects was that in the skin editor one uses one called [default](modifired) and the other one uses one that I created. HOWEVER, I have another one that uses my custome skin and the buttons are grey on that one which is the same as the default one. I don't think the skin has anything to do with the button look. Correct me gently if I am wrong on this.
    Thanks for the help.

    Just one remark: in CP6 you always use a theme. And quiz slides have their own master slides, that will always be used. The buttons take on the style you see on those master slides, and this style can also be found in the object style manager. Skin and object styles are part of the theme. Probably you have overridden some of the styles defined?
    Lilybiri

  • Need help with java browser "Back" button

    All:
    I'm trying to make the "Back" button in my Java web browser work. Any help would be greatly appreciated. Here is my code:
    import javax.swing.*;
    import java.net.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.event.*;
    import java.util.*;
    import java.io.*;
    import javax.swing.text.html.*;
    import javax.swing.text.*;
    public class Browser implements HyperlinkListener, ActionListener
    String source = "http://www.google.com";
    final String GO = "Go";
    final String Back = "Back";
    JEditorPane ep = new JEditorPane(); //a JEditorPane allows display of HTML & RTF
    JToolBar tb = new JToolBar(); //a JToolBar sits above the JEditorPane & contains
    JTextField tf = new JTextField(40); // the JTextField & go button
    JLabel address = new JLabel(" Address: ");
    JButton back = new JButton(Back);
    JButton go = new JButton(GO);
    BorderLayout bl = new BorderLayout();
    JPanel panel = new JPanel(bl);
    JFrame frame = new JFrame("Billy Wolfe's Browser");
    protected Vector history;
    public Browser()
    openURL(source); //this method (defined below) opens a page with address source
    ep.setEditable(false); //this makes the HTML viewable only in teh JEditorPane, ep
    ep.addHyperlinkListener(this); //this adds a listener for clicking on links
    JScrollPane scroll = new JScrollPane(ep); //this puts the ep inside a scroll pane
    panel.add(scroll,BorderLayout.CENTER); //adds the scroll pane to center of panel
    tf.setActionCommand(GO); //gives the ActionListener on tf a name for its ActionEvent
    tf.setActionCommand(Back);
    tf.addActionListener(this); //adds an ActionListener to the JTextField (so user can
    go.addActionListener(this); //use "Enter Key")
    tb.add(back); //this adds the back button to the JToolBar
    tb.add(address); //this adds the Label "Address:" to the JToolBar
    tb.add(tf); //this adds the JTextField to the JToolBar
    tb.add(go); //this adds the go button to the JToolBar
    panel.add(tb,BorderLayout.NORTH); //adds the JToolBar to the top (North) of panel
    frame.setContentPane(panel);
    frame.setSize(1000,900);
    frame.setVisible(true);
    }// end Browser()
    public void openURL(String urlString)
    String start = urlString.substring(0,4);
    if(!start.equals("http")) //adds "http://" to the URL if needed
    urlString = "http://"+urlString;
    }//end if
    try
    URL url = new URL(urlString);
    ep.setPage(url); //this sets the ep page to the URL page
    tf.setText(urlString); //this sets the JTextField, tf, to the URL
    catch (Exception e)
    { System.out.println("Can't open "+source+" "+e);
    }//end try-catch
    }//end openURL
    public void hyperlinkUpdate(HyperlinkEvent he) //this allows linking
    HyperlinkEvent.EventType type = he.getEventType();
    if(type == HyperlinkEvent.EventType.ACTIVATED)
    openURL(he.getURL().toExternalForm());
    history.add(he.getURL().toExternalForm());
    }//end hyperlinkUpdate()
    public void actionPerformed(ActionEvent ae) //for the GO and BACK buttons
    String command = ae.getActionCommand();
    if(command.equals(GO))
    openURL(tf.getText());
    history.add(tf.getText());
    //JOptionPane.showMessageDialog(null, "This is a test");
    if(command.equals(Back))
    try
    String lastURL = (String)history.lastElement();
    history.removeElement(lastURL);
    lastURL = (String)history.lastElement();
    // JOptionPane.showMessageDialog(null, lastURL);
    ep.setPage(lastURL);
    if (history.size() == 1)
    back.setEnabled(false);
    catch (Exception e)
    System.out.println("ERROR: Trouble fetching URL");}
    }//end actionPerformed()
    }// end Browser class

    Here it is. I need to be able to click the Back button and view the previous URL.
    import javax.swing.*;
    import java.net.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.event.*;
    import java.util.*;
    import java.io.*;
    import javax.swing.text.html.*;
    import javax.swing.text.*;
    public class Browser implements HyperlinkListener, ActionListener
    String source = "http://www.google.com";
    final String GO = "Go";
    final String Back = "Back";
    JEditorPane ep = new JEditorPane(); //a JEditorPane allows display of HTML & RTF
    JToolBar tb = new JToolBar(); //a JToolBar sits above the JEditorPane & contains
    JTextField tf = new JTextField(40); // the JTextField & go button
    JLabel address = new JLabel(" Address: ");
    JButton back = new JButton(Back);
    JButton go = new JButton(GO);
    BorderLayout bl = new BorderLayout();
    JPanel panel = new JPanel(bl);
    JFrame frame = new JFrame("Billy Wolfe's Browser");
    protected Vector history;
    public Browser()
    openURL(source); //this method (defined below) opens a page with address source
    ep.setEditable(false); //this makes the HTML viewable only in teh JEditorPane, ep
    ep.addHyperlinkListener(this); //this adds a listener for clicking on links
    JScrollPane scroll = new JScrollPane(ep); //this puts the ep inside a scroll pane
    panel.add(scroll,BorderLayout.CENTER); //adds the scroll pane to center of panel
    tf.setActionCommand(GO); //gives the ActionListener on tf a name for its ActionEvent
    tf.setActionCommand(Back);
    tf.addActionListener(this); //adds an ActionListener to the JTextField (so user can
    go.addActionListener(this); //use "Enter Key")
    tb.add(back); //this adds the back button to the JToolBar
    tb.add(address); //this adds the Label "Address:" to the JToolBar
    tb.add(tf); //this adds the JTextField to the JToolBar
    tb.add(go); //this adds the go button to the JToolBar
    panel.add(tb,BorderLayout.NORTH); //adds the JToolBar to the top (North) of panel
    frame.setContentPane(panel);
    frame.setSize(1000,900);
    frame.setVisible(true);
    }// end Browser()
    public void openURL(String urlString)
    String start = urlString.substring(0,4);
    if(!start.equals("http")) //adds "http://" to the URL if needed
    urlString = "http://"+urlString;
    }//end if
    try
    URL url = new URL(urlString);
    ep.setPage(url); //this sets the ep page to the URL page
    tf.setText(urlString); //this sets the JTextField, tf, to the URL
    catch (Exception e)
    { System.out.println("Can't open "+source+" "+e);
    }//end try-catch
    }//end openURL
    public void hyperlinkUpdate(HyperlinkEvent he) //this allows linking
    HyperlinkEvent.EventType type = he.getEventType();
    if(type == HyperlinkEvent.EventType.ACTIVATED)
    openURL(he.getURL().toExternalForm());
    history.add(he.getURL().toExternalForm());
    }//end hyperlinkUpdate()
    public void actionPerformed(ActionEvent ae) //for the GO and BACK buttons
    String command = ae.getActionCommand();
    if(command.equals(GO))
    openURL(tf.getText());
    history.add(tf.getText());
    //JOptionPane.showMessageDialog(null, "This is a test");
    if(command.equals(Back))
    try
    String lastURL = (String)history.lastElement();
    history.removeElement(lastURL);
    lastURL = (String)history.lastElement();
    // JOptionPane.showMessageDialog(null, lastURL);
    ep.setPage(lastURL);
    if (history.size() == 1)
    back.setEnabled(false);
    catch (Exception e)
    System.out.println("ERROR: Trouble fetching URL");}
    }//end actionPerformed()
    }// end Browser class

  • Help with shadow animation

    I'm having a bit of a difficulty animating a shadow. I have several pieces of art on the stage with a shadow on them. I have them on a tween, that will enlarge them (one at a Time) from there current state (100%) to (300%). What I'm trying to do is as the art increases in scale the shadow decreases to nothing, and on the return tween will increase the shadow back to the original setting.
    I'm able to get the shadow the fade out, but its not smooth, or precise enough (may have something to do with the timimg of the tween itself), then there is the problem of animating the shadow back on the scale down.
    here is the code I have that I have been trying to get that effect
    //Function called by an enterframe listener so the shadow will change every frame
    function drawshadow (e:Event):void
    makeShadow = new DropShadowFilter();
    makeShadow.distance = 5;
    makeShadow.angle = 80;
    makeShadow.color = 0x333333;
    //figured the alpha was the easiest filter to change for the animation I want
    makeShadow.alpha = changeshadow
    makeShadow.blurX = 2;
    makeShadow.blurY = 2;
    makeShadow.strength = 1
    makeShadow.quality = 15;
    makeShadow.inner = false;
    makeShadow.knockout = false;
    makeShadow.hideObject = false;
    //if the stamp is  scaling up in the range the alpha decreases (note:the tween to enlarge is .5)
    if (stamp[i].scaleX > 1 && stamp[i].scaleX<3)
    changeshadow = changeshadow-.03
    stamp[i].filters = new Array(makeShadow)

    I am using all as3 for the animantion. I have  two functions containingg tweens that scales up and down based on a timer to trigger
    One tween to another (and repeat)
    this is what I'm using for the scale up tween if it helps
    stampScaleX=new Tween(stamp[i], "scaleX", Strong.easeIn, 1, howLarge, .5, true)
    stampScaleY=new Tween(stamp[i], "scaleY", Strong.easeIn, 1, howLarge, .5, true)
    HowLarge is = 3 (300%)

  • Need help with jerky animation in Flash CC

    Hello,
    I'm creating an animation of a planet orbiting the sun and it is stuttering a little bit no matter what I try.  I'm working in Flash CC, the animation is done with a custom ease and only 2 keyframes (one at the slowest point and one at the fastest).  The end result has to be .mp4 so I am exporting as video.  But even the swf is a little jerky.  My frame rate is 29.97.  The animation path is oval in shape (using an oval guide path which the planet follows), the planet is small, maybe 6 mm across,  and the planet's speed varies as it orbits the sun (thus the custom ease).  The number of frames in the animation is 202, that's how long it takes for the planet to complete one rotation.  That anim is then looped in the movie as a graphic.
    thanks in advance for any help you can give.  

    Here would be a similar example, linear versus an ease tossed in. I made an oval similar to yours (633px by 446px) and just used it as a guide:
    Here's some videos showing the movement I get per frame. You can even see Flash Pro (CS6 in this case) exporting some odd frame choices. For example right before the 5 second mark the circle jumps 2 movements and stays in place for an extra frame (easy to see stepping through it using arrows and Quicktime player). It does this consistently even when using "None" for Quicktime compression, or using a codec.
    Here's some video examples (30FPS over 202 frames, 6.7 seconds):
    Linear Movement
    -60 to 60 ease at the opposite side
    (Source MOV (Animation codec @ 85 quality) to verify MP4 is the same)
    I imagine your results are the same. It's just too much movement for to little time to really get it to play back smooth. Double the time and you'll cut that in half and I think you'll be happier. Increasing FPS beyond 30 might not be a good idea as playback will start to become machine dependant at that resolution and it could bog even worse.

  • Help with writing code for button

    Hi!
    Can someone help me with the code for a button that sends my menu back to 0?
    This is the code current code, and I've created a button called sistapilen that I want to insert where the regular button "arrow" is not visible. I want sistapilen to navigate me back to 0. (Or if I can get "arrow" to do it and delete "sistapilen"). 
    /Jen
    // File downloaded from www.riacodes.com
    import com.greensock.*;
    var arrayX :Array = [0,-800,-1600,-2400,-3200,-4000,-4800];
    var currentIndex:Number=6;
    left_mc.addEventListener(MouseEvent.CLICK,navigate);
    right_mc.addEventListener(MouseEvent.CLICK,navigate);
    left_mc.buttonMode = true;
    right_mc.buttonMode = true;
    checkArrows();
    function navigate(e:MouseEvent):void{
    if(e.currentTarget == left_mc) currentIndex --;
    else currentIndex ++;
    checkArrows();
    TweenLite.to(content_mc,.5 ,{x:arrayX[currentIndex]});
    function checkArrows():void{
    if(currentIndex == 0) left_mc.visible=false;
    else if (currentIndex == arrayX.length - 1) right_mc.visible = false;
    else{
    left_mc.visible = true;
    right_mc.visible= true;

    Add a listemer for whichever other button you plan to use...
    sistapilen.addEventListener(MouseEvent.CLICK,navigate);
    And try changing your navigate function as follows...
    function navigate(e:MouseEvent):void{
         if(e.currentTarget == left_mc) {
              currentIndex--;
         } else if(e.currentTarget == right_mc){
              currentIndex ++;
         } else {
              currentIndex = 0;
         checkArrows();
         TweenLite.to(content_mc,.5 ,{x:arrayX[currentIndex]});

  • Newbie: Help With Reverse Engineering a SWF

    Hi I'm looking for some help (direction to resources, etc) in recreating the kind of functionality seen at this website: http://www.schiff2010.com/
    Specifically, the "10,000 Supporters" dynamic animation with the Statue of Liberty and realtime loading of pledge names.
    I'm wondering what I need to create something similar.
    Also, there is a widget attached to this database which gives similar information that I would like to recreate:
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="160" height="215" title="Schiff2010.com"><param name="movie" value="http://www.schiff2010.com/widgets/bomb_count_160x215.swf" /><param name="quality" value="high" /><embed src="http://www.schiff2010.com/widgets/bomb_count_160x215.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="160" height="215"></embed></object>
    Thank you for any help.

    Just collecting a little data to see if this is as dynamic as you think it is, because when I checked it when you first posted, it seems to be the same info...
    4/30/2009: 5311 supporters displayed, starting with Steve Anthony
    If that doesn't change over time, this is not a real time presentation--which isn't surprising considering the trust-ability of anything political in nature.  Not that it couldn't be.

  • Asking for help with my animation

    First, I want to thanks to those that take time to answer and help. I solved the problem of my shivering images, setting the fps to 30. Now, if someone  can help me with this: I need to make a sequence of images (6) flow along the screen continuously. I don't know how to join the last image with the first as a non stop smoothy loop. I know there is a way using the action-scrip window, but I don't remember much because I have not been using this app much lately. Thank you.

    Place the images in separate layers
    Then you take the half part of the last image animation to the starting of frame
    Or placing the half part of the first animation to the last frames

  • Hello guys need help with reverse array

    Need help reversing an array, i think my code is correct but it still does not work, so im thinking it might be something else i do not see.
    so far the input for the array is
    6, 25 , 10 , 5
    and output is still the same
    6 , 25 , 10 , 5
    not sure what is going on.
    public class Purse
        // max possible # of coins in a purse
        private static final int MAX = 10;
        private int contents[];
        private int count;      // count # of coins stored in contents[]
         * Constructor for objects of class Purse
        public Purse()
           contents = new int[MAX];
           count = 0;
         * Adds a coin to the end of a purse
         * @param  coinType     type of coin to add
        public void addCoin(int coinType)
            contents[count] = coinType;
            count = count + 1;
         * Generates a String that holds the contents of a purse
         * @return     the contents of the purse, nicely formatted
        public String toString()
            if (count == 0)
                return "()";
            StringBuffer s = new StringBuffer("(");
            int i = 0;
            for (i = 0; i < count - 1; ++i)
                s.append(contents[i] + ", "); // values neatly separated by commas
            s.append(contents[i] + ")");
            return s.toString();
         * Calculates the value of a purse
         * @return     value of the purse in cents
        public int value()
            int sum = 0; // starts sum at zero
            for( int e : contents) // sets all to e
                sum = sum + e; //finds sum of array
            return sum; //retur
         * Reverses the order of coins in a purse and returns it
        public void reverse()
           int countA = 0;
           int x = 0;
           int y = countA - 1;                                          // 5 - 1 = 4
           for (int i = contents.length - 1; i >=0 ; i--)                        // 4, 3 , 2, 1, 0
                countA++;                                             // count = 5
            while ( x < y)
                int temp = contents[x];
                contents[x] = contents [y];
                contents [y] = temp;
                y = y- 1;                                         // 4 , 3 , 2, 1 , 0
                x = x + 1 ;                                             // 0 , 1,  2  , 3 , 4
    }

    ok so i went ahead and followed what you said
    public void reverse()
          int a = 0;
          int b = contents.length - 1;
          while (b > a)
              int temp = contents[a];
              contents[a] = contents;
    contents [b] = temp;
    a++;
    b--;
    }and its outputting { 0, 0, 0, 0}
    im thinking this is because the main array is has 10 elements with only 4 in use so this is a partial array.
    Example
    the array is { 6, 25, 10, 5, 0, 0, 0, 0, 0, 0,}
    after the swap
    {0, 0 , 0 , 0, 0 , 0 , 5 , 10 , 25, 6}
    i need it to be just
    { 5, 10, 25, 6}
    so it is swapping the begining and end but only with zeroes the thing is i need to reverse the array without the zeroes                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Need Help with script: CS4 Flash Buttons

    I created a 3 button bar using Flash CS4. It will link to three different HTML pages in a website. This is one of the three scripts I have on the first frame of the main timeline, the code is for one of the buttons, the other two are really the same with differing button numbers. This code does now open the page up in a NEW BROWSER window, but I would like the page to open in the existing window and not in a new one. The 3 buttons also have down states identified by a frame label of “hold”, I would like the script to set the hold frame or down state to be displayed when the proper page is loaded in the browser .  Will someone please suggest to me what I need to add to this script to achieve this, your time and effort will be appreciated.
    stop();
    button1_btn.addEventListener(MouseEvent.CLICK, illus);
    function illus(e:MouseEvent):void {
        var targetURL:URLRequest=new URLRequest("illustrator.html");
        navigateToURL(targetURL);

    Thank you Todd... How about the code to display the Down stage when displayed,
    got any thoughts on this.
    Thanks'
    Bill

Maybe you are looking for