AS3 to make movie clip not play on default?

I created a movie clip that I want to play when a button is
clicked and
stop when another button is clicked.
I have a stop action on the first frame where the 2 buttons
appear and
the movie clips resides. When I test the movie, the movie
clip plays by
default.
How do I set it up so the movie clip does not play until the
user clicks
the play button?
The code I am using:
myPlay_btn.addEventListener(MouseEvent.CLICK, playMc);
myStop_btn.addEventListener(MouseEvent.CLICK, stopMc);
function playMc(e:MouseEvent):void{
my_mc.play();
function stopMc(e:MouseEvent):void{
my_mc.stop();
Thanks!!!

Not sure if I understand. Where specifically should this be
added to the
code:
myPlay_btn.addEventListener(MouseEvent.CLICK, playMc);
myStop_btn.addEventListener(MouseEvent.CLICK, stopMc);
function playMc(e:MouseEvent):void{
my_mc.play();
function stopMc(e:MouseEvent):void{
my_mc.stop();
Thanks!

Similar Messages

  • Movie Clip not playing correctly (Flash CS3, AS2)

    Hey, I'm making a tutorial for a board game and there's this movie clip that mimics a piece being played. It's basically empty for about 9 frames and then the piece is on the 10th frame. On the 10th frame, I placed a stop(); script. The movie clip has no linkage and no label.
    For some reason, on a certain frame, it didn't work. It worked fine on other frames so I copy & pasted from those frames and replaced the movie clip that did not work right. Oddly enough, after I copy & pasted the movie clip, the error spread to the movie clip I copied! I tried it again and again the error spread to what ever clip I copied from. The other movie clips (same item) still functions properly. I never encountered a problem like this. Can anyone please help?

    1. you should have no code attached to objects.  assign your objects instance names (eg, mc) and use those names in your code.
    2. that code should not be in an enterframe loop. 
    if(_root.action_ryu==1){
    mc._alpha=100;  // not _Alpha
    mc.gotoAndPlay(4);
    _root.Ryu._alpha=0;
    } else {
    _root.Ryu_Attack._alpha=0;

  • Movie clip not playing

    i create some animation. actuvally i move mouse on button some menu visible, i click test button  when play "boxani" Movie Clip.
    but not playing.  ?????
    Test link
    http://megaswf.com/serve/1185333
    btn_mc.menu_mc._visible = false;
    boxani_mc.stop();
    btn_mc.onRollOver = function()
              btn_mc.menu_mc._visible = true;
    btn_mc.onRollOut = function()
              btn_mc.menu_mc._visible = false;
    btn_mc.test_btn.onRelease = function()
              boxani_mc.play();

    any solution that type of animation method
    like freedocast video player mouse over menu and click run action (16:9, 4:3).
    http://www.freedocast.com/watchvideo.aspx?vid=531B426A31D72143109F

  • Can't get nested movie clip to play

    Hi everyone,
    I have a movieclip on one of the frames on the maintimeline.
    Within this movieclip is a nested movieclip which itself is
    contained by another clip. The first movie clip plays to a certain
    frame where I've got some code telling the nested movie clip to
    play at that frame but this nested clip doesn't play. I'm not sure
    if I'm targetting the nested clip incorrectly or whether something
    else is wrong with the code.
    The .fla file can be downloaded at:
    http://www.officelinkonline.com.au/Ad/
    if someone would take a look. The movie clip in question is
    on the layer called text5, and within this mc on frame 15 is the
    code I'm trying to use to get the nested movieclip to play at that
    point. The code used on that frame is:
    this.innerText5_mc.free_mc.play();
    stop();
    pauseAnim = setInterval (this, "nextFrame", 4000);
    I wondered if someone could take a look and see what I might
    be doing wrong? Basically the free_mc clip just makes the word
    "FREE" scale up.
    Would really appreciated any advice.
    Thanks

    Thanks again. I'm a bit worried that you weren't able to see
    the font that I used. All of the text used in the animations are
    static text fields. I don't seem to have the option to embed these
    characters since it's static text. It'll only let me embed if the
    text fields are dynamic. Does this mean I have to change them all
    to dynamic text fields, and if so do I need to embed the font in
    every text field in every frame of the animation or can you do this
    in one place?
    Appreciate your continued help.

  • After installing Maverick, my downloaded movies will not play in Quick Time.  It gives me the following error "You can't open the application "QuickTime Player.app" because it may be damaged or incomplete."  What can I do?

    After installing Maverick, my downloaded movies will not play in Quick Time.  I receive the following error message:
    You can’t open the application “QuickTime Player.app” because it may be damaged or incomplete.  So I tried to unistall QT and I get an error that says, You can not delete this application as it is a requirement for the OSX.
    Well I did find a way to delete it, by going into the various components and one by one deleting it.  Now I reinstall it and  the message is that this Quick Time is for an earlier version before Maverick 7.  SMH....Now what.?

    Hello, terrygav. 
    I would recommend processing a reinstall of Mavericks.
    OS X Mavericks: Reinstall OS X
    http://support.apple.com/kb/PH13871
    Make sure to backup all of your data prior to reinstalling OS X 10.9.
    Back up your Mac
    http://support.apple.com/kb/PH11371
    Cheers,
    Jason H.

  • I would like a movie clip to play repeat itself everytime a button is pressed

    Hello,
    I am new to actionscripting but not Flash, I am using Flash
    MX 2004 for a college project at the moment. I have created an
    interface which features four buttons, each button activates a
    different movie clip. This works fine but only on the first time to
    press the button if you press the button again the movie clip does
    not play again, I would like the movie clip to play EVERY time the
    button is pressed. Here is the script that I have created in a
    seperate layer called actions, if that helps:
    ellaimage._visible = false
    Betaimage._visible = false
    Yakuzapic._visible = false
    Pornopic._visible = false
    boxmovie._visible = false
    Betabox._visible = false
    textboxmc._visible = false
    Yakuzabox1._visible = false
    Pornobox1._visible = false
    pellabutton.onRelease = function () {
    stop ();
    Betaimage._visible = false
    Yakuzapic._visible = false
    Pornopic._visible = false
    textboxmc._visible = false
    Betabox._visible = false
    Pornobox1._visible = false
    Yakuzabox1._visible = false
    boxmovie._visible = true
    textboxmc._visible = true
    Pellaimage._visible = true;
    Pellaimage.gotoAndplay(1)}
    Betabutton.onRelease = function () {
    stop ();
    Pellaimage._visible = false
    Yakuzapic._visible = false
    Pornopic._visible = false
    textboxmc._visible = false
    Yakuzabox1._visible = false
    Pornobox1._visible = false
    Betaimage._visible = true
    Betabox._visible = true
    boxmovie._visible = true
    Betaimage.gotoAndplay (1) }
    Yakuzabutton.onRelease = function () {
    stop ();
    Pellaimage._visible = false
    Betaimage._visible = false
    Pornopic._visible = false
    textboxmc._visible = false
    Pornobox1._visible = false
    Betabox._visible = false
    Yakuzabox1._visible = true
    boxmovie._visible = true
    Yakuzapic._visible = true
    Yakuzapic.gotoAndplay (1) }
    Pornobutton.onRelease = function () {
    stop ();
    Pellaimage._visible = false
    Yakuzapic._visible = false
    Betaimage._visible = false
    textboxmc._visible = false
    Betabox._visible = false
    Pornobox1._visible = true
    Yakuzabox1._visible = false
    Pornopic._visible = true
    boxmovie._visible = true
    Pornopic.gotoAndplay (1) }
    // this command stops the timeline
    stop ();
    Any help would be great.
    Thanks in advance

    No that doesn't work, that isn't what I want to to be
    repeated.
    In the below script I want textboxmc (which is a movie clip)
    to restart and play again everytime pellabutton is released.
    pellabutton.onRelease = function () {
    stop ();
    Betaimage._visible = false
    Yakuzapic._visible = false
    Pornopic._visible = false
    textboxmc._visible = false
    Betabox._visible = false
    Pornobox1._visible = false
    Yakuzabox1._visible = false
    boxmovie._visible = true
    textboxmc._visible = true
    Pellaimage._visible = true;
    Pellaimage.gotoAndplay(1)}
    Please can anyone help?

  • *Class Project - Please help:  Why does my movie clip keep playing over and over?

    I am desperate for help on this one as its my Final Flash
    class project and I just can't get my scenes/movie clips to play in
    the order I want them to.
    I have Scene 1 (movie clip 1) that plays and then Scene 2
    (movie clip 2) plays. The problem is that Scene 2 (or movie clip 2)
    repeats itself over and over again. I can't get it to go back to
    Scene 1 (movie clip 1) to play that again.
    I want it go to to this Scene 1 and actually start at a
    certain frame to continue on with the story.
    I have named my movie clip instances.
    What am I doing wrong? I went into movie clip 2, into
    actions, and movie clip control, and I don't really see a way to
    tell it to go back and play movie clip 1. Trying to see how to
    refer back to the instance name of the movie clip and get it to
    play.
    Ideas? Please please? I would be forever greatful.
    Angie

    quote:
    Originally posted by:
    computerkitten
    I wonder if I should just take that movie clip out of the
    scene completely.... and not have the second scene at all. Maybe I
    should just have 1 scene and these 2 movie clips. Wonder if that
    would work better?
    As Nickels55 said, above, scenes add unnecessary complexity.
    So the answer to this is: YES. Scenes are awkward in Flash. Never
    use them in any final project. Put everything on a single timeline
    in a single scene, and you will have much better control of the
    project.

  • TS1702 I am having problems downloading 2 purchased movies. Cars 2 & Toy Story. I had it on My iPad, then after a while the movies would not play. I went to the apple store and they deleted it and told me that all I need to do is download it again. Not wo

    Hi
    I am having problems downloading 2 purchased movies. Cars 2 & Toy Story. I had it on My iPad, then after a while the movies would not play. I went to the apple store and they deleted it and told me that all I need to do is download it again. I tried what they suggested at the apple store, but I am still not successful. It continues to tell me there is a download error. Please help! Need these movies for my 3 year old!

    User to user forum.
    Apple is not here.
    You need to contact iTunes support:
    http://www.apple.com/support/itunes/contact/

  • HT204370 I purchased a movie yesterday and started the download.  The download seemed to hang up at about 90%.  Finally, it showed that it was ready to watch, but the movie will not play.  Download is apparently corrupt.  How do I get a working version?

    I purchased a movie yesterday and started the download.  The download seemed to hang up at about 90%.  Finally, it showed that it was ready to watch, but the movie will not play.  Download is apparently corrupt.  How do I get a working version?

    Depending upon what country that you are in (films can't be re-downloaded in all countries) then try deleting the film from your iPad and redownload it via the Purchased tab in the iTunes store app (or the Purchased link under Quick Links on the right-hand side of the iTunes store home page on your computer's iTunes).
    If you aren't in a country where you can re-download films, or if you have problems with the re-downloaded version, then try the 'report a problem' link from your purchase history : log into your account on your computer's iTunes via the Store > View Account menu option and you should then see a Purchase History section with a 'see all' link to the right of it ; click on that and you should see a list of your purchases ; find that film and use the 'Report a Problem' link and fill in details about the problem (iTunes support should reply within, I think, about 24 hours).
    If the 'report a problem' link doesn't work (it's been taking some people to this site on a browser instead of showing a form in iTunes) then you can try contacting iTunes support via this page : http://www.apple.com/support/itunes/contact/- click on Contact iTunes Store Support on the right-hand side of the page.

  • HT1399 movies will not play

    What do I do if my movies will not play?

    Try the following user tip:
    iTunes for Windows 10.7.0.21: "iTunes has stopped working" error messages when playing videos, video podcasts, movies and TV shows

  • How do I get a movie clip to play fully in an iphoto slide show.

    How do I get a movie clip to play fully in an iphoto slideshow.  Right now it only plays for a few seconds, while the complete clip is 22 seconds.

    Bring up the Settings pane for the slideshow and click on the movie clip in the tray at the top.  Then in the Settings pane click on This Slide button and set the play time to the actual length of the movie clip. 
    OT

  • HT1657 My rental movie is not playing, and I have 24 hours to watch it, and I did want to watch it tonight, can I get reimbursed?

    My rental movie is not playing, and I have 24 hours to watch it, and I did want to watch it tonight, can I get reimbursed?

    I'd report the problem to the iTunes Store. 
    Log in to the Store. Click on "Account" in your Quick Links. When you're in your Account information screen, go down to Purchase History and click "See all".
    Find the item that is not playing properly. If you can't see "Report a Problem" next to the item, click the "Report a problem" button. Now click the "Report a Problem" link next to the item.

  • Rented movie does not play after download if not connected to the internet

    rented movie does not play after download if not connected to the internet

    Hello b noir.
    Thank you for your interest in solving my problem.
    What I did I opened iTune. I read the information about what does my computener need to play back a rented movie. My computer is okay to play back rental movies. So I went to the iTunes store, I searched for the movie I want to watch, i singned in into my Mac account and I bought the movie. The movie started to download to my computer, it took some time because I bought a HD version, but it never stop and after a couple of hours or little less the movie was in the Rented folder of my iTunes and also I checked to be sure that was in the movie folder. So, next day I open iTunes and click on the movie, it opens but I wait for five minuetes and never started to play back, so I tried several time and I looked for info in different internet forums but I couldn't find anything that help. So I posted the problem in this forum and also I called Apple. Apple contacted me and they let me to download the movie again. So I did it and now I will watch the movie later. Not sure if the movie will play back normally or if I am going to have the same problem. I'll keep you posted.
    Apple representative did not know why this happened.
    Thanks.

  • Certain flash movies will not play - including Adobe TV movies with Dreamweaver tutorials

    For months, certain .swf movies will not play.  No error, won't even load the player.  I thought it was because of IE8 which I installed several months ago.  Now I loaded Firefox and Opera and the movies still do not play in those browsers either.  At least I get an error message "TypeError: Error #1009: Cannot access a property or method of a null object reference".
    I have newly installed Dreamweaver CS4 and when I launch it, there are links to Adobe TV videos.  These will not play.  Here is an example of a video that will not play: http://tv.adobe.com/watch/inside-the-dreamlabs/dreamweaver-cs4-live-preview/
    I have googled the error but the results seem to be developers talking about code in Action Script 3.
    Can someone please help?  I have spent hours trying to get this resolved.
    My Flash Player version is 10,0,45,2 and I had the issue when I was at 10,0,32 whatever as well.

    Ya, it's a very old post.  This forum actually has a very high response rate (more than 90%+) thanks to people like Pat, Carl and Xircal who volunteer their time and knowledge to help the community.

  • ITunes movies will not play; blank window.

    I recently purchased several HD movies from the iTunes Store (~$15.00 or more each), and now I've discovered they will not play on my MacPro (I do not own a TV.)
    When I click the movies a separate window opens (as usual), but it remains black and nothing plays, If I move the movie window to another screen (I have three 30" Apple Cinema displays connected to a 2010 MacPro) the movies still will not play on any of the screens. If I change the iTunes settings to open the movie in the iTunes window, the movies still does not play. This problem seems to be recent, I have purchased MANY HD moves/TV shows from the ITunes store and have not had this problem until very recently (a month or so.)
    If I try to open the movie with QuickTime instead of iTunes I get this message: "This movie cannot be played because it is on a display that is not authorized to play protected movies. Try moving this window to a different display or disconnecting any displays that are not HDCP authorized."
    The only thing I can find buried in the iTunes Terms and Conditions is "(viii) An HDCP connection is required to view content transmitted over HDMI." But I am not transmitting over HDMI, the displays are connected directly to the MacPro and I don't have any HDMI cables connected to the machine. There is NOTHING at the time of purchase that indicates the HD movie will not play on my Apple displays.
    Is it just the HD version of the movie? Would the SD version play OK?
    How can the displays I'm using not be "authorized" it's an Apple display, using Apple cables/adapters connected to an Apple MacPro.
    Any insight, information, or constructive help would be greatly appreciated (I do have a Apple support call scheduled for tomorrow...)
    Thanks.

    Hi there,
    You may find the information in the article below helpful.
    iTunes: Purchasing and viewing HD videos
    http://support.apple.com/kb/ht3209
    -Griff W.

Maybe you are looking for

  • Bonjour not working with new Cisco Gateway from Shaw

    I have a PC running Windows 7 (64 bit version) and a 2nd gen iPad.  On the PC, I have AirPrint for Windows, Shairport4w, Calibre (for e-books) and AirVideo Server installed.  These used to allow me to print from my iPad to the Samsung ML-1670 connect

  • Totally ridiculous.... Lumia 800 won't sync my con...

    I've been having this problem for a while now (~1month) with my company phone I use for business and would need this basic functionality to work to be able to change my broken Lumia800 (speaker is kaputt) to a new one (which I already have sitting on

  • Swfobject or Adobe Embed Code

    What do you recommend using to embed SWF's? The Adobe Embed code: http://helpx.adobe.com/flash/kb/object-tag-syntax-flash-professional.html Or swfobject? Adobe code is a simple copy and paste. With swfobject it looks like I install the swfobject libr

  • Adding dependency jars to EAR

    Can anyone advise me on how to add a normal jar file to my EAR file? I have deployed the EAR on weblogic but the ejb does not get deployed becuase it cannot find a class. The class is included within a seperat jar file which does not have any EJBs in

  • How do I build and run a java application?

    I wrote my java swing application in jbuilder where I run it from a test class. Now I want to send it out to others, so they can run it from their computers, how do I do that? Is it possible to create an *.exe file with icon for them to click on? How