Play Movie Clips with AS 2

I have 3 Buttons
I have 3 movie Clips
Each Button Plays A Different Movie Clip.. Thats Where you
come in !
Whats the Code for the button

are the instance names of your buttons: btn1, btn2, btn3
are the instance names of your movieclips: mc1, mc2, mc3
They would need to be named so in order for this to work, and
it will.

Similar Messages

  • Copying movie clip with flv

    Hi, I am trying to copy a movie clip with an flv in it from
    one project to another. Everything works fine except the flv just
    keeps trying to load and never plays. I am not sure what to do. Any
    suggestions?

    It sounds like you are using the FLVPlayback component to
    display the FLV, in which case, the FLV is a separate file and
    likely needs to be in the folder next to the new project. Go back
    to the old project and copy the FLV from its location there to the
    new projects folder.

  • Noob help: Triggering Movie Clips with Buttons

    Hi guys,
    I'm taking an intro Flash and Action Script class and for my final I need to create a portfolio project that contains 5 unique buttons that trigger 5 unique movie clips. I'm having a hard time with this. I've been able to trigger the 1st movie clip with the first button (although I can't stop it) but I can't trigger any ohter movies with any other buttons.
    Here's my code:
    stop();
    chuck1_btn.addEventListener(MouseEvent.CLICK, playMovie);
    function playMovie(event:MouseEvent):void
        spaceship_mc.play();
    chuck2_btn.addEventListener(MouseEvent.CLICK,playSaucers);
    function playSaucers(event:MouseEvent):void
        saucers_mc.play();
    Nothing happens when I click on chuck2_btn when I test the movie. I think I need to create a variable or class but I'm not sure. I'm a super noob with this stuff. Any thoughts? Thanks!
    Rick

    You should learn how to use the Help documentation to find answers like how to use the visible property.  For the code you showed earlier, here's what you can try in frame 1 to replace it.
    stop();
    spaceship_mc.visible = false;
    saucers_mc.visible = false;
    slideshow_mc.visible = false;
    chuck1_btn.addEventListener(MouseEvent.CLICK, playMovie);
    function playMovie(event:MouseEvent):void
         spaceship_mc.visible = true;
         saucers_mc.visible = false;
         slideshow_mc.visible = false;
        spaceship_mc.play();
    chuck2_btn.addEventListener(MouseEvent.CLICK,playSaucers);
    function playSaucers(event:MouseEvent):void
         spaceship_mc.visible = false;
         saucers_mc.visible = true;
         slideshow_mc.visible = false;
        saucers_mc.play();
    etc...
    It could be refined, like having a function that hides everything and using that every time before making the one you need to show visible.  You might find it necessary to include telling the movies to gotoAndStop(1) as well.
    That's about as generous as I'm going to get.  It's important that you learn things, and handing you a solution isn't going to help do that.

  • Exporting a move clip with alpha channel

    Hi there,
    I’m trying to export a move clips with alpha channel.
    I’m trying to export an animation with Premiere CS5. I made an animation of a rotating object in Maya and exported it with alpha channel as tiff images. Then they are edited with Photoshop to give them a drop shadow.
    My problem is this. Can I export this tiff animation with the alpha channel?
    My plane is to use move clips over backgrounds in a game – depending on the result there are different animations playing on top of several different backgrounds. There for the objects has to have a transparent/alpha channel over the backgrounds.
    Again the reason for this is the complexity of the game and to make the game looking as real as possible. I’m hoping for some help here to make my plan possible
    …thanks

    Thanks alot for the help.
    But now I’m wondering how to get the file size down?
    The 32bit and alpha channel just increase the file size from about 1MB to 9,3MB, which is pretty much??
    …any ides mate?

  • What type of movie clips are handled by the ipad? I have shot a movie clip with my canon camera and the file is .AVI.  will this load onto ipad?

    what type of movie clips are handled by the ipad? I have shot a movie clip with my canon camera and the file is .AVI.  will this load onto ipad?

    Per http://www.apple.com/ipad/specs/
    AirPlay Mirroring to Apple TV (2nd and 3rd generation) at 720p
    AirPlay video streaming to Apple TV (3rd generation) at up to 1080p and Apple TV (2nd generation) at up to 720p
    Video mirroring and video out support: Up to 1080p with Apple Digital AV Adapter or Apple VGA Adapter (adapters sold separately)
    Video out support at 576i and 480i with Apple Composite AV Cable (cable sold separately)
    Video formats supported: H.264 video up to 1080p, 30 frames per second, High Profile level 4.1 with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats; MPEG-4 video up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second, Simple Profile with AAC-LC audio up to 160 Kbps per channel, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats; Motion JPEG (M-JPEG) up to 35 Mbps, 1280 by 720 pixels, 30 frames per second, audio in ulaw, PCM stereo audio in .avi file format

  • Check for movie clips with AS?

    Is it possible to check if a frame contain a movie clip with
    AS, and then if movie clip is found run a function? Like a global
    "event handler " for movie clips.

    I want a function that automaticly can detect and fade in any
    movie clip found in any keyframe in the main timeline. So i don't
    have to make
    In the first keyframe in the main timeline
    on (ohh here i found a movie clip)
    //let's run a nice fade function on that movie clip
    mx.transitions.TransitionManager.start
    (eval(TheClip),
    {type:mx.transitions.Fade,
    direction:0,
    duration:1,
    easing:mx.transitions.easing.None.easeNone,
    param1:empty,
    param2:empty
    Something like that

  • Moving movie clips with ActionScript

    I am trying to move four movie clips with actionscript in a
    circler motion with two buttons, one to rotate the mc’s to
    the left and one button to rotate the mc’s to the right. Here
    is a link to what I am trying to do;
    http://www.us.playstation.com/Lair/
    and it is undrer game features.

    Yes, that's what the code I gave you is intended to do....
    you replace that code with whatever action you need to take to turn
    your movie around.
    I have no idea what your movieclip is doing, but I'm guessing
    by your response that if it was an arrow pointing left to right
    (just an example), you want it to be pointing right to left when
    the left arrow is pressed. If you want an immediate turn around,
    then the simplest way to do that is to have another frame
    containing the movieclip that it moves to where it faces the other
    direction--and to have it appear turned around, from the toolbar
    you select Modify -> Transform -> Flip Horizontal.
    So the movieclip would live inside another movieclip that has
    two frames with stop()'s for each frame. In the first frame you
    would have the subclip facing left to right, and in the second you
    would have it facing right to left. If we call that 2-framed
    movieclip "walker", the code I provided before would
    become...

  • 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

  • How to play a movie clip with a tween animation

    I created a movie clip symbol with a tween animation and created an instance of it on the main stage. The animation is in the movie clip timeline, not on the main timeline. I cannot get the mc to play using mc.play() or mc.gotoAndPlay.  What am I missing??

    Hi Ned, thanks for the response;
    1.Yes I named the instance.
    2.I  don't beleive so. I started from the library creating a new symbol, added the graphics, added the key frames, then created the tween. Then I dragged the symbol onto the main stage and named the instance. So I don't think there is a movie clip inside an mc.
    Here is the main timline:
    Here is the mc timeline:
    Here is what I'm trying to do:
    stop();
    blk1._visible = false;
    blk2._visible = false;
    blk3._visible = false;
    ppk1._visible = false;
    ppk2._visible = false;
    ppk3._visible = false;
    storeCartons = new Array();
    storeCartons = [blk1, blk2, blk3, ppk1, ppk2, ppk3];
    startButton.onRelease = function() {
        myNumber = Math.floor(Math.random()*storeCartons.length);
        trace("myNumber "+myNumber);
        activeCarton = storeCartons[myNumber];
        activeCarton._visible = true;
              activeCarton.play();

  • Urgent Need of Help Playing Movie Clips

    I'm a complete noob when it comes to AS. I know basic things like stop(); and gotoAndPlay.
    Here's my dilemma.
    Dearest Professor has given us a task of creating a website in Flash. You need to have 15 links, or 15 pages. He states that you can only go frame by frame on the main timeline with no tweening spaces in between. So I'm virtually creating all of my animations in symbols.
    This isnt such a problem... I created a short introduction title video in Flash using a Movie Clip Symbol... placed it on the main timeline on the first page, and then called ActionScript to play the video.
    Here's the problem... So.... the movie will play, but it will continuously loop... I've tried putting stop(); on the home page, under the AS... I'm just completely lost on how to get this to play the short clip and go straight to the home page... Could someone PLEASE, direct me on how to do this and give me an explanation as to why this way is the way it is... I would very much like to understand how it works.
    Thanks
    The Flash Noob

    Thanks Rob!
    I did what you suggested but I think I may have messed it up...
    Here's the output error I have going on right now.
    TypeError: Error #1034: Type Coercion failed: cannot convert flash_website_template2_fla::MainTimeline@7fff0d7aea1 to openingtodogwood.
      at openingtodogwood/frame9()[openingtodogwood::frame9:3]
    In the end of the timeline of the movie clip I put this:
    stop();
    openingtodogwood(parent).play();
    I think that might be wrong but I'm unsure on what I should have really put. I was also reading that having the name of the movie clip the same as the class in the properties panels is not a good idea?
    Thank you so much for your help!

  • Help - Using Cue Points to Play Movie Clips

    I have a FLV, into which I have placed about 8 cue points. I
    want a movie clip to play - (each movie clip is simply a snippet of
    supporting text for the video) - when a cue point is "hit". I am
    really quite baffled by most of the documentation that I have read
    so far.
    How can I do this? Many, many thanks for any support you can
    give.
    tommy53

    You can build out a menu by reading the cuePoints array in
    the NetStream.onMetadata handler, or by using the MetadataEvent
    with the FLVPlayback component (AS3). The simple thing for me to
    say is to refer to Chapter 9 of my new Flash Video book. :) (see
    link in my signature below.)

  • Playing Movie clip backward using buttons?

    Im trying to create a series of images that scroll acoss the page left and right using arrows at either side of the stage. The arrows use mouse over events to play a movie clip of the images foward and backward.
    There are a few issues I am having. I have a mouse over and mouse out events in place to start and stop the clip on to different buttons. However when playing the clip backward with my current script the mouse out doesnt do anything so the clip just keeps playing backward to the beggining. Once this has happened neither button then does anything.
    Another issue is once the clip has played foward once in total and I mouse over the same arrow button again it flicks back to the begginging of the clip.
    Here is my current scrpit:
    panel.stop();
    leftarrow_btn.addEventListener(MouseEvent.MOUSE_OVER, fl_MouseOverHandler_7);
    leftarrow_btn.addEventListener(MouseEvent.MOUSE_OUT, fl_MouseOutHandler_4);
    function fl_MouseOverHandler_7(event:MouseEvent):void
              panel.play();
    function fl_MouseOutHandler_4(event:MouseEvent):void
              panel.stop();
    rightarrow_btn.addEventListener(MouseEvent.MOUSE_OVER, fl_MouseOverHandler_9);
    rightarrow_btn.addEventListener(MouseEvent.MOUSE_OUT, fl_MouseOutHandler_7);
    function fl_MouseOverHandler_9(event:MouseEvent):void
       panel.addEventListener(Event.ENTER_FRAME, everyFrame);
    function everyFrame(event:Event):void
              panel.prevFrame();
    function fl_MouseOutHandler_7(event:MouseEvent):void
              panel.stop();
    Please Help!!
    Patrick

    use:
    panel.stop();
    leftarrow_btn.addEventListener(MouseEvent.MOUSE_OVER, fl_MouseOverHandler_7);
    leftarrow_btn.addEventListener(MouseEvent.MOUSE_OUT, fl_MouseOutHandler_4);
    function fl_MouseOverHandler_7(event:MouseEvent):void
              panel.play();
    function fl_MouseOutHandler_4(event:MouseEvent):void
              panel.stop();
    rightarrow_btn.addEventListener(MouseEvent.MOUSE_OVER, fl_MouseOverHandler_9);
    rightarrow_btn.addEventListener(MouseEvent.MOUSE_OUT, fl_MouseOutHandler_7);
    function fl_MouseOverHandler_9(event:MouseEvent):void
       panel.addEventListener(Event.ENTER_FRAME, everyFrame);
    function everyFrame(event:Event):void
              panel.prevFrame();
    function fl_MouseOutHandler_7(event:MouseEvent):void
    panel.removeEventListener(Event.ENTER_FRAME,everyFrame);

  • Play movie clip on frame

    I am using Flash CS4 and i have made some short movie clips. I want one of them to play on frame 24 once and then the next on frame 48 ect. How would i do this?
    Thank you in advance,
    Ben

    Your posting could be interpretted at least a couple ways, so I'll try for one of them... Give your movieclips instance names via the Properties panel, and in an actions layer, on the frame you want one to play, add a keyframe and in it add the code: mcName.play();  where mcName is whatever instance name you assign to the movieclip
    The preceding assumes you have a stop(); command in the first frame of each movieclip.
    If that doesn't agree with the scenario you intend, try explaining the details again.

  • Play movie clips backwards

    I have a scene with 7 frames on the main stage, each
    containing movie clips, i was wondering if there was a way to:
    1. Make one or part of one of these movie clips play
    backwards when a button is pressed.
    2. Once a movie ends another specified clip(not neceserally
    after it in the timeline) automatically plays.
    Thanks,
    Ben

    Hi,
    Ive emailed you the file. Any problems then let me know.
    Cheers

  • Playing DVD clips with Keynote

    Greetings,
    I'm trying to figure out a way to have movie clips play from within Keynote '08 without having to leave and use an outside program like DVD Player. Is this possible? Thanks.

    Hi. I have been putting together a KN presentation with quite a few movie clips (see my other current posts). My process is to use QTPro to make a selection and save that to a folder (called Movie Edits) in .mov format.
    Putting them into KN is simple: you can just drag them into a place holder on any slide as you would an image file. The issue I am experimenting with at the moment is whether to have all the movies embedded in the KN file or to leave them all 'outside'. Be warned: you have to make this decision right at the start of creating your presentation. Create a new presentation and do "save as..." with with relevant box unchecked. Once you've started saving the project with movies embedded, you can't get them out and your KN document may bloat unacceptably.
    The advantage of leaving them outside is you get a smaller KN file which is quicker on Open and Saves. The disadvantage is that the presentation is stuck on your computer and you can't move the movie edit files around or rename them. On the other hand you can always do another 'Save as...' when the project is complete and this time elect to embed all media files.

Maybe you are looking for

  • TS2972 Home sharing

    I just udated my Apple TV and now i can't access 2 of the 3 music libraries. Before the update i had 3 family members on 1 computer with their own itunes sharing music. Now 2 of them say " could not connect" yet they show up under the computers tab.

  • What are the best settings for ripping cd's in the AAC format?

    I have researched and found out that the AAC format rules over the MP3 format as fas as sound quality goes with lossy formats. Example: AAC at 128 is better than MP3 at 160 as so forth. My questions are: What are the best settings for ripping cd's in

  • Bluetooth Headset in Windows XP with Boot Camp

    Does anyone know how to get a Bluetooth Headset to work on XP under Boot Camp? XP does recognize the device but I'm unable to get audio i/o through the headset.

  • SOAP, servlets and others decisions?

    Hi? I?m developing a servlet application in an AS400 server which basically does some query in the DB In other web server (Apache, Linux), I have the web application which needs to request information in the AS400 DB. I was thinking to develop the co

  • An simple question about Objects!!

    I would like to know why I can't print out the numbers~~ Please help!!!thank you!!! import java.util.*; public class testing {     public static void main(String argv[]) { Object num1=new Integer(3); Object num2=new Integer(8); Object num3=new Intege