Actionscript to play a movie?

I am fairly new to Flash. Can someone provide the AS3 to play
a movie on
the stage onClick of a button?
Thanks!!!!!!

I also placed a stop action on the first frame of the stage
in the scene.
CJ wrote:
> It is not working for me, here is what I did:
>
> 1. Made a movie clip and placed a stop action on the
first frame of the
> movie clip. Am I not supposed to do this?
>
> 2. Dragged the movie clip to the stage
>
> 3. dragged a button to the stage
>
> 4. named the button my_btn
>
> 5. copied your action script to a the first frame on a
new layer of the
> stage
>
>
>
> How does the action script know to play the specific
movie clip on the
> stage that I want it to?
>
>
> Thanks for your help!!!!!!
>
>
>
> dzedward wrote:
>> my_btn.addEventListener(MouseEvent.CLICK,
btnClicked);
>> function btnClicked(e:MouseEvent):void{
>> play();
>> }

Similar Messages

  • Playing a movie using actionscript

    I'm pretty sure this is possible but i'm not sure how to do
    it. I want a movie clip to play another movie clip on mouseover. I
    know how to get the movie being mousedover to play... on (rollover)
    { play(); }. But i want it to play a different video, not itself.
    Any ideas?

    BryanThomas wrote:
    > I'm pretty sure this is possible but i'm not sure how to
    do it. I want a movie
    > clip to play another movie clip on mouseover. I know how
    to get the movie being
    > mousedover to play... on (rollover) { play(); }. But i
    want it to play a
    > different video, not itself. Any ideas?
    on rollover
    differentMovie.play();
    Regards
    Urami
    Happy New Year guys - all the best there is in the 2006 :)
    <urami>
    http://www.Flashfugitive.com
    </urami>
    <web junk free>
    http://www.firefox.com
    </web junk free>

  • Playing a movie clip in a simgle frame

    I'm making a flash gallery of several different animations,
    each being in one movie clip. I was wondering if there's a way to
    make a whole, say, 1000 frame movie clip play in a single frame on
    the main timelime, and how it would be done. (assuming that the
    main timeline frame has the actionscript to make the movie stop)
    I'm kinda new to actionscript and all, even though I've been
    working with flash for a while, so it would be a real big help for
    this project and future ones.
    -EDIT-
    I'm using AS2 for this project.

    It helps to realize that even the main timeline is a
    MovieClip instance.
    MovieClips play independently of one another, and can be
    nested. So if you
    just take your 1000 frame clip and place it on a frame (any
    frame will do)
    it will play - so long as the play head of the parent clip is
    on that frame.
    And you said you have a stop(); on the main timeline, so I
    assume it is. So,
    like kglad said, just put the clip on stage...
    Dave -
    Head Developer
    http://www.blurredistinction.com
    Adobe Community Expert
    http://www.adobe.com/communities/experts/

  • Play multiple movie clips - with sound

    Hello Forum members,
    I am a total new comer in terms of flash and action script,
    self-educated and Adobe forum and internet educated. I can now
    click a button and stop and start a movie clip, use attachMovie,
    and even mute sound in a movie clip (not video). I am currently
    using Flash 8, and waiting for CS3 (downloaded a trial, and like it
    better than Flash 8).
    Enough history - now to my question - I have an application
    that had 3 scenes. I read in some Adobe article
    "Flash Best Practices" that it was not a good idea to use
    scenes in an application. I converted my Scene 2 and Scene 3 into
    movie clips.
    I figured I could either put each movie clip on a separate
    layer in my timeline (mc_scene2, mc_scene3)
    and play them, one after the other (did not quite work, more
    later). Or...
    copy the timelines from the scenes, and add those frames to
    my Scene 1, making a application with both scenes staggered one
    after the other in the main timeline. Or...
    Keep Scene 1 and at the end of scene 1,
    attacheMovie("mc_scene2", etc) and when scene 2 was done play and
    or attach the final movie clip (mc_scene3).
    I could not figure out how to tell when mc_scene2 was done
    using the attacheMovie method, so I could then attach mc_scene3,
    etc.
    How would I be able to tell when one attached or loaded movie
    clip is finished, and then start the next one?
    Or what is the suggested way to use actionscript to load a
    movie, play it, and when the clip is done, load and play the next,
    etc.
    Thanks for a good forum,
    eholz1

    Hello Again - I guess there is much that I do not understand.
    I followed the tip above - or so I thought.
    I have "buttons" on my movie clips that play the clip when
    clicked.
    I have placed stop actions in frame 1 of each movie clip.
    I tried placing mc_scene2 and mc_scene3 on their own layer
    in the timeline,
    and put the code above in my actions layer (Scene 1).
    it seems that nothing really works - the _visible property
    seems not to work,
    etc - I must be doing something wrong. What layer should the
    two mc's be
    placed?
    Thanks for the info
    Eholz1

  • Playing embedded movie backwards

    I am patching together my first flash, which is definitly not
    optimal (lots of redundant code etc.) Since there is a deadline,
    ill go back and learn about how to make it much more optimal after
    this first version is done, so keeping all that in mind:
    Is there any way to play an embedded movie backwards upon
    calling it with a gotoAndPlay() command from the same scene?
    Thanks, a simple solution would definitly save me a lot of
    time, thanks for any tips!!

    projection83 wrote:
    > hi urami, thanks for the reply
    >
    > this seems to half work for me,
    >
    > I say gotoAndPlay(1000), which is the end of the movie
    which starts at 500
    >
    > it goes there, and there is an actionscript at 1000
    saying prevFrame();
    > same for 999, 998 all the way to 500. (start simple:P
    and lonnng code style)
    >
    > The problem is that the code takes me right to 500
    without actually playing
    > the movie - but it does get to its desination - what am
    i missin?
    Not all timelines can reversed their playback. This will work
    on motion/shape tween
    and frame by frame animation, nothing.
    What kind of content do you have on these frames ?
    Best Regards
    Urami
    <urami>
    If you want to mail me - DO NOT LAUGH AT MY ADDRESS
    </urami>

  • Can I play a movie from my ipod classic onto my ipad screen?

    I have a 160 GM ipod classic that holds all my movies.  I would like to buy a 16 GM ipad 3 but I know it won't be able to hold my movies.  Can I stick with the 16 GB ipad 3 but play my movies on it from my ipod classic?  I want to buy a wifi ipad and not a 4G one so when I'm driving in the car and I want to show movies to my kids in the back I won't be able to access the icloud or dropbox, etc.  Can I connect my movies from my ipod classic directly to the ipad with a cord to watch them on the ipad?

    So if I want to be able to watch all my movies or listen to all 50 GB of my songs I'll need to buy a more expensive 32 or 64 GB ipad and shuffle movies and songs in and out of it or else use the wifi and iCloud.  Is that correct? There's no way the ipad can access an external hard drive?

  • Unable to play some movie from Netflix on my iPad. When I click on a movie an error message comes up which says "cannot play movie. Please try again". Can anyone assist me? I just upgraded to iOS 7.1. Netflix not able to find problem.

    Unable to play some movies from Netflix on my iPad. When I click on a movie an error message comes up "Cannot play movie. Please try again later." I contacted Netflix but have not been able the help so I am wondering if it's my iPad. I didn't have a problem before but I have recently upgraded to iOS 7.1. Also is a certain amount of storage needed to play a movie? About how much is that?

    Hello all,
    I have an iPad 2 16GB with iOS 7.0.3 and Netflix version 5.0.2. I cannot watch netflix on an External LCD monitor that I have through VGA out. I use bluetooth speakers, so the AirPlay is going to that for Audio. Before this update, this combo worked without an issue.
    So as of Friday Nov. 8/2013, I contacted Netflix support, and they said they fixed the problem on their end, and the fix is on the Apple side of things, and to contact Apple support.
    So, I contacted Apple support, and the first person I spoke to said I would have to agree to pay a $35 fee for 30 days of support to this problem since my unit is out of warranty. I said this isn't a hardware issue, it's a software issue, and I'm not willing to pay to fix a problem you created. So I got a Senior Level advisor on the line, and she was helpful, and she's looking into the issue for me and said she'll contact me sometime on Tuesday or Wednesday (Nov. 12 or 13) to let me know of the issue.
    Here's the thing: this is a combination of Netflix and iOS not working correctly with any of the Apple Authorized Dongles. This is truly a code error that some hot shot programmer had major oversight on, and their management didn't catch it either. There was no reason for Netflix to rush to get this Netflix update going until Apple sorted out the bugs in iOS 7.
    Anyway, if I hear anything from Donna (the advisor), I'll post it and let you guys know. In the mean time, good luck!

  • When I play a movie through iTunes, audio has no issues but video stutters and skips

    Hey everyone,
    I have a Dell 17R, Windows 8 64 bit, intel i7-3630QM at 2.4 GHZ, 8gb ram, Nvidia GT-650M at 1920x1080 using driver 320.49
    When I play a movie in iTunes, the audio works flawlessly but the video will be smooth for a few seconds, stutter and then skip small 2-3 second spots. I haven't noticed that the parts skipped are any more graphically intense than other spots and there is no discernable pattern.
    In the past, I have been able to play movies through iTunes with absolutely no problem but when I downloaded this most recent one a few days ago all of my movies have been experiencing the same issue.
    When I stream other videos from other sources I do not experience the same problems as I do when I use iTunes. Streaming 1080P over youtube or a similar services is no issue.
    I have updated my video drivers to the latest version as well.
    I am at a loss, any suggestions would be appreciated.
    Thanks!

    Hi there,
    I would recommend taking a look at the troubleshooting steps found in the article below.
    Troubleshooting iTunes for Windows Vista or Windows 7 video playback performance issues
    http://support.apple.com/kb/TS1718
    -Griff W.

  • I just brought a brand new Macbook pro retina display, when i connect it to my apple tv through airplay its too slow and when it try to play a movie apply tv is always a minute or 2 behind. How can i fix this?

    I just brought a brand new Macbook pro retina display, when i connect it to my apple tv through airplay its too slow and when it try to play a movie apply tv is always a minute or 2 behind. How can i fix this?

    Hello HanaAmer1,
    We've an article which provides troubleshooting steps that can help get AirPlay workign correctly.
    iTunes: Troubleshooting AirPlay and AirPlay Mirroring
    http://support.apple.com/kb/TS5209
    Cheers,
    Allen

  • TS3354 "To play this movie in HD, you must have a PC with a built-in display or have it connected to a display that supports HDCP."

    I recently reinstalled restored my Toshiba laptop with Windows 8 to factory condition.  I reinstalled iTunes, and now when I try to play a movie, I get this error message:  "To play  (name of movie) you must have a PC with built-in display or have it connected to a display that has built in HDCP."  This happens with both my downloaded movies and my iCloud movies.  It never did this before.  Any suggestions?

    I have the exact same problem. I watched both AnchorMan 2 and The Hobbit Desolation of Smaug a week ago on my set up. BenQ monitor ATI Radeon HD 5700 Series Video card. No issues. Then I reformat and all of a sudden my purchased movies give me that error. It's so frustrating.
    The odd part is for the Hobbit the itunes extras will start just like before, however I can't select a scene.
    How is there no response to this? Are we missing something obivous? A default setting? Driver?
    Help please!

  • Message: To play this movie in HD, you must have a computer with a built-in display ...

    I rarely use iTunes, prefer, for obvious reasons to own physical media (which is prompting this question). But I do have an iPad 4 so I have to use it.
    I bought a movie on iTunes and have downloaded it to a new brand new Windows 8 laptop. I am getting a message "To play this movie in HD, you must have a computer with a built-in display or have it connected to a display that supports HDCP."
    My laptop is running a display at 1366 x 768 resolution and it is hooked up to a separate monitor using the HDMI out to the DVI input. Why am I getting this message and what is the workaround? I don't think that it's right that I have to re-buy the movie in standard definition to to watch it.
    Also, as I have a 16 GB iPad, I typically don't have space available to store a 4GB movie but if I download the movie to my laptop and connect my iPad to my laptop, if I free up space will I be able to watch the movie on my iPad 4?
    You can probably tell I'm not a fan of iTunes. Why does Apple insist on making everything so difficult? The iPad 4 with Retnia Display is the only Apple product I own and previously I have played this movie on my iPad.

    I rarely use iTunes, prefer, for obvious reasons to own physical media (which is prompting this question). But I do have an iPad 4 so I have to use it.
    I bought a movie on iTunes and have downloaded it to a new brand new Windows 8 laptop. I am getting a message "To play this movie in HD, you must have a computer with a built-in display or have it connected to a display that supports HDCP."
    My laptop is running a display at 1366 x 768 resolution and it is hooked up to a separate monitor using the HDMI out to the DVI input. Why am I getting this message and what is the workaround? I don't think that it's right that I have to re-buy the movie in standard definition to to watch it.
    Also, as I have a 16 GB iPad, I typically don't have space available to store a 4GB movie but if I download the movie to my laptop and connect my iPad to my laptop, if I free up space will I be able to watch the movie on my iPad 4?
    You can probably tell I'm not a fan of iTunes. Why does Apple insist on making everything so difficult? The iPad 4 with Retnia Display is the only Apple product I own and previously I have played this movie on my iPad.

  • I'm trying to hook up my Macbook Pro to my TV. I'm using the 'mini-display port to female HDMI" adapter. all i can see is my desktop background. no folders or icons and when i play a movie it goes blank.

    I'm trying to hook up my Macbook Pro to my TV. I'm using the 'mini-display port to female HDMI" adapter. all i can see is my desktop background. no folders or icons and when i play a movie it goes blank.

    Drag applications from your main desktop off the right side of the screen and they will appear on the TV.  This is the extended desktop mode. 
    Regards,
    Captfred

  • I want to play a movie from my ipad on my tv, all hooked up and i get an error message that the tv isn't authorized to play it.

    I Want to play a movie from my ipad, on a tv but get a tv not authorized message, how do you authorize a tv?

    I was not complete clear.
    Since you never changed the settings in the advanced section of iTunes preferecnes, you have to chech that your music is really in the location setted in the folders reported in the advanced section.  If not you have 2 ways: reset the position of this folders or in the actual disk organisation or in the pointing on the preferences.
    If you press the reset button you just give to itunes its default setting as for the position of the music files: probably this will be a good choice if you have never changed any default preference.
    But before I would check the folders and see if the songs are really there
    In my iTune I have this, and I believe it is the default.
    Users/YOURHOMEFOLDERNAME/Music/iTunes/iTunes Music

  • HT3523 I can play an .mov file but cannot open it to move it to another drive/disc/etc. When we try to open it, we get a message that says "The movie file for "beanmine.mov" cannot be found. Without this file, the movie cannot play properly."

    We can play a .mov file (a full-length film created in final cut pro) but cannot actually open it in QuickTime. We get the error message saying that a file is missing, and the movie can't play properly without the file. The thing is, we can play the film, we just can't open it to move it to another drive. Help?
    Also, can the lost file (which was deleted) be recovered from a Mac HD or an external hard drive?
    Help!

    We can play a .mov file (a full-length film created in final cut pro) but cannot actually open it in QuickTime. We get the error message saying that a file is missing, and the movie can't play properly without the file. The thing is, we can play the film, we just can't open it to move it to another drive. Help?
    Sounds like you created a "Reference" file here. I.e., a "Reference" file is a file that tells the player how to play the data contained in a "Resource" file. When you try to open the "Reference" file in the QT Player app, the first thing the player does is check to see if the "Resource" data file is is still available where it is supposed to be. (I.e., moving/deleting the resource file or moving reference file without moving the resource file to maintain the relative path between the two will generate the error message you mentioned.)
    Also, can the lost file (which was deleted) be recovered from a Mac HD or an external hard drive?
    That depends. Deleting a file does not actually erase the data immediately. Instead, the operating system just tells the system directory that the space containing the movie data is available for reuse if/when needed. As time passes, the chance that some of the data sectors will be re-written by other data continuously increases. To restore the file normally requires use of a special utility that both locates and restores all of the linked sectors containing the "deleted" movie data in their correct order. Other methods of restoring files would depend on the software you routinely have active on your system. For instance, do you use "TimeMachine?" or orther software that automatically backs up your data periodically? If so, then follow the instructions for your particular application to recover a deleted file.

  • HT200109 Why do all my other Apple devices not care if the movie I rented from iTunes if it was downloaded directly to that device or not, but the stupid Apple TV won't allow you to play rented movies unless you rented it directly from the Apple TV?

    Why do all my other Apple devices not care if the movie I rented from iTunes if it was downloaded directly to that device or not, but the stupid Apple TV won't allow you to play rented movies unless you rented it directly from the Apple TV?
    Great, so now I have to airplay it by linking my computer to my Apple TV and then the movie has to buffer! So, all that time I spent downloading the HD video has to technically "download" again by buffering. The more I use Apple TV, the more I feel like this item was not created by Apple. I don't even use it for what I originally purchased it for. If I would have known that anytime I wanted to sync a movie from my computer to Apple TV by using airplay that it would have to buffer the movie, I would have never ever ever ever ever purchased this waste of time device. So the video has to technically play all the way through one time first so Apple TV can "remember" the movie to play it back in real time afterwards.
    Am I missing something here? Am I doing something wrong that can be fixing my problem? I should have known that the Apple TV had so many things backwards when simple things like when you are using the remote and you reach the bottom of your list, in order to cycle back to the top of your list you have then press the directional buton back the other way rather than most modern day devices that will automatically cycle you back to the top or to the other side when you reached the bottom or end but keep on pressing the button. That **** annoys me when I am doing a search for a movie and have to type the name in manually and have to cycle back and forth to the letters. It makes me feel like I am using a rotary phone or something!

    I was told by someone to try and purchase something directly from my Apple TV and that will help authorize my Apple TV.  So I picked something that was free and it downloaded.
    Then I went back to the Movie that would not work and it played just fine. 
    So it seemed to work.  I will have to try it on other movies and TV shows later.

Maybe you are looking for

  • Purchase order with -ve Qty

    Hi, Is it Possible to create purchase order with negative  Quantity, right now it is issuing msg "negative Quantity will not be allowed for service based invoice verification". If yes please suggest the config steps. Regards, Rani

  • Using 27" iMac as a Display for my 13" MBP

    I've read a couple of posts on this forum, but am still unsure whether this is possible. I have a 27" i7 iMac and a 13" MBP (2009) and I want to know if I can use the iMac as a display for my MBP. Is this possible, if so what do I need to acheive thi

  • I cant download itunes

    When i try to  download itunes, my screen says it cant download quicktime player because the old version of quicktime cannot be removed. when i try to remove it, it says quicktime cannot be removed, prove that it exists. what do i do?

  • IPod and usb connection

    Hi all, I'm having trouble connecting my ipod dock to my unibody macbook pro. I am getting a strange error message. USB over current notice A USB device is currently drawing to much power The hub to which it is attached will be deactivated Any help w

  • Item category....Pls help!

    Hi experts, Here's the scenario, First, I'm creating a quotation no. then i will create a sales order with reference to quotation no.In doing so, I'm using a BAPI....Now the question is..how can i determine the item category? From what table should i