Skip navigation
HillaryIsAmazing
Currently Being Moderated

Two beginner Flash questions.

Apr 14, 2012 6:03 PM

So, my first question is this...  I have a button called Enter_btn that controls a movie clip.  I want it to disappear after it is clicked.  Is there a way to do this?

 

Second question needs a little more explaining...  When I click Enter_btn, I have it play a movie clip(Open).  The movie clip is 120 frames long.  On my main timeline, I have extended all of my layers to 120 frames.  If I wait a few seconds to click Enter_btn on my test scene, it will not play the movie clip in its entirety.  It stops before the movie clip has finished playing.  If I extend the frames out on my main timeline and click Enter_btn immediately, the movieclip will loop and play over.  Is there a way to fix this?

 

Here is all the actionscript that I have written so far. 

 

 

 

 

 

 

"Open.stop();

 

function playAnimation(event:MouseEvent):void

{

    Open.play();

}

 

Enter_btn.addEventListener(MouseEvent.CLICK, playAnimation);"

 

 

 

 

 

any help would be much appreciated!

 
Replies
  • Currently Being Moderated
    Apr 14, 2012 7:11 PM   in reply to HillaryIsAmazing

    For the first one, set your Enter_btn's visible property to false in the function.

     

    Fir the second one, try putting a stop(); command in the first frame along with the Open.stop(); and put a play() command in the function along wirth the Open.play();.  I am not sure if that solves the problem because I am not really sure what the second problem is.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 15, 2012 4:39 AM   in reply to HillaryIsAmazing

    You're welcome

     
    |
    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