Skip navigation
charellen
Currently Being Moderated

How do i start a motion tween by clicking a button and stop it at the end of the tween.

Sep 20, 2012 11:27 PM

Tags: #cs5 #help #actionscript #flash_cs5

Hi guys,

 

I am creating a website for a project and i am trying to activate a box bropping down from another box when i click on the enter here button i have created. I have set the motion tween and its working when i preview i just unsure of the correct actionscript to start this tween when i have clicked the entere here button or how to stop it at the end of the tween.

 

I am scared i may have made the layers in the wrong place, they are all currently in scene 1. does my second box that is dropping down need to be set inside the layers of the first box?

 

Bit of a newbie at this.

 

Thanks in advance!

 
Replies
  • Currently Being Moderated
    Sep 21, 2012 4:17 AM   in reply to charellen

    Create the dropping box movieclip as an animation by itself with a stop() coomand in the first frame and a stop() command in the last frame.  The click of the button should tell the movieclip to play(); at which point the animation should play and stop at the end.

     

    Another option would be to use an actionscript Tween to make the box drop.  Going that route the animation is what you code it to be and there is no need to have to stop it as it will end where you tell the Tween to end at.

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 21, 2012 4:40 AM   in reply to charellen

    I should add that you can also have this as part of the same timeline by just having the animation at the end and putting a stop() command at the beginning of it and at the end.  Again, the button would execute the play() command.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points