Play a Movie Clip on a frame In Main SWF from a button, within 2 MovieClips

I’m using AS2, Flash 8
I have a frame on my main Timeline Called “Gallery” within this frame I have 2 movie clips, which I need to work together:
One is called:
Gall_Lge_1
Which contains 37 frames.
Each frame has a different movie – basically 37 different photos which pop up on each frame.
(MC’s named Lge_1, Lge_2, Lge_3 etc)
The second Movie Clip I have on here is called:
gall_strip_mc
Which contains a movie clip called strip1 , (which is set to scroll its contents controlled by buttons on ”Gallery”- which works) inside that is a movie clip called strip_all , and contains one frame with 37 buttons/photo thumbnails, (Buttons named btn1, btn2, btn3 etc which I require to link each individual button to the corresponding photo/frame in Gall_Lge_1  …
So,
btn1 will go to and play Lge_1(Frame 1 of Gall_Lge_1)
btn2 will go to and play Lge_2(Frame 2 of Gall_Lge_1)
I’m stuck and can’t get it to work..
Here is the site – under ‘Gallery’ so you can see what I’m trying to achieve
http://www.blueshelldesign.com.au/draft/
(I’ve placed in Back and Next buttons next to ‘Gall_Lge_1’ so you can see how its suppose to look when the thumbnails from ‘gall_strip_mc’ are clicked)

First, you do not use quotes when you are specifying a frame number, so try changing that first.  The only time you use quotes for that argument is for frame label strings.
If it still won't play, are you sure that the button is coded properly and executes the function when clicked?  You should put a trace in the function to make sure.  Also, you could try using _root instead of _level0... I forget the difference, if any, but _root will definitely get you to the main timeline.
btn2.onRelease = function() {
     trace("btn2 clicked");
    _root.Gall_Lge_1.gotoAndPlay(2);

Similar Messages

  • Playing multiple movie clips one after other on main timeline

    Excuse the probably simple question but I'm just starting off with Flash.
    I have imported a few video trailers directly into flash and saved them as movie clips.
    I want to be able to insert these movie clips onto the main timeline and play them one after the other, repeating once they have all played.
    On the main timeline I have set a layer for each clip and a keyframe where the clip is inserted for each layer.
    When I go to play the flash file, it is showing the first frame from each movie file and then moving to the first frame of the next movie file.
    What do I need to do to make flash play the entire movie file in that specific frame before moving to the next frame where the next movie file is and playing all that movie?
    Sorry for what is probably a simple thing to ask.
    thanks

    Create an actions layer on the main timeline and place stop(); commands on that layer in each frame where a movieclip resides.
    Within in each movieclip, at the end (last frame) you want to tell the main timeline to play(); so that it moves to the next frame (where it will stop because of the stop() commands you add).
    So at the end of each movieclip you will put either:
    for AS2:  _parent.nextFrame();
    for AS3: MovieClip(parent).nextFrame();
    For the last movieclip in the lineup you will replace nextFrame() with gotoAndStop(1);

  • Rollover buttons that play a movie clip.

    Hello,
       I am new to Flash and I am trying to accomplish a simulation such as this example, http://www.its-about-time.com/investinesart/coalplantvirtualtour.swf. I have all of my movie clips done, but how do I tell a rollover button to play a specific movie clip? I also want to have all the movie clips to play simultaneously via a rollover button as shown in the example. I've attached a captured image of my timeline, if that helps. I've tried everything so far, but nothing is working! What is the simplest way of doing this?
    I have this inside one of the movie clips (mc_2) in a seperate layer under - (actions)
    RO_btn.onRollover = function(){
    mc_2.play();
    On the main timeline I have an actions layer with this:
    stop();
    Thinking that this may stop all of my movie clips but it doesn't.
    Should I make an actions layer in each movie clip with this syntax huh? stop();?
    I'm frustrated!!
    Thanks, if you can help!
    MG

    Hi,
    I have made something that you are looking for.
    It will be of help to you.
    basically you will have to create a few movie clips namely:
    2 buttons: (name them a_btn, b_btn, c_btn, d_btn, e_btn)
    3 movie clips (I am taking example image1_mc, image2_mc, image3_mc)
    in each of these movieclips.place 2 frames and on second frame put your movieclip(one in one).on both the frames put stop()
    now click on a_btn and write this script
    on (rollOver) {
    _root.image1_mc.gotoAndPlay(2);
    _root.image2_mc.gotoAndPlay(2);
    _root.image3_mc.gotoAndPlay(2);
    on (rollOut) {
        _root.image1_mc.gotoAndPlay(1);
        _root.image2_mc.gotoAndPlay(1);
        _root.image3_mc.gotoAndPlay(1);
    with this all 3 animations will work simultaneously. if you need to run any one of the movieclips at a time the you can address that mc in particular
    .Say if you want only 1 mc to move at a time then put this on  btn 2
    on (rollOver) {
    _root.image1_mc.gotoAndPlay(2);
    on (rollOut) {
        _root.image1_mc.gotoAndPlay(1);
    .Dont forget to give proper instance names to movieclips.(they are in properties panel.)
    Cheers!

  • How to stop , play nested movie clips....

    Hi all,
    I'm calling a swf file in a container_mc, which is in
    another swf file(Interface), by loadMovie() method. The Major
    problem I've stucked with is that in the interface I'm having a
    Play/Pause Button, which is not stopping the nested movieclips of
    the external swf file which is loaded in the container_mc
    movieclip.
    The other major issue is that I'm not able to add a
    progressbar(sliderbar) which runs according to the animation, to
    this interface. Please help ASAP

    I have a similiar situation however the container_mc has me
    puzzled, I'm not sure what that is - perhaps you can answer my
    question:
    I have a master swf called index.swf. The index.swf has a
    main tool bar of buttons which load frames; each frame is named to
    coincide with the main bar button (i.e. genInfo, setup,
    mainentance, etc). This works perfectly. My problem is with Movie
    Clips.
    Each frame has a sidebar which loads external swfs (i.e.
    genInfo.swf) - each external swf is made up of a series of Movie
    Clips which run in succession along the timeline; each Movie Clip
    belongs within its own frame (i.e. MCseg1 is in frame seg1; MCseg2
    is in frame seg2, etc).
    I need to pause and play each individual Movie Clip at will;
    I have built two buttons (pauseBtn and playBtn) into a Movie Clip
    called MCpausePlay. The first frame of MCpausePlay contains the
    pauseBtn; this frame is coded with the global "stop();" In order to
    move to frame(2) which contains the playBtn, the pauseBtn is coded
    with -
    on(release) {
    gotoAndPlay(2);
    The playBtn is coded:
    on(release) {
    gotoAndPlay(1);
    When clicked, the MCpausePlay moves from pause to play.
    That's all I have been able to get this to do.
    How do I code MCpausePlay to pause and then play each
    individual Movie Clip? (How do I get a Movie Clip to control other
    Movie Clips?). Should I code the Movie Clip, the frames within the
    Movie Clip, or each individual button within the Movie Clip? And,
    does this MCpausePlay belong on the Index.swf file, or should it be
    on each external swf? Or perhaps built in to every Movie Clip? I
    have tried all and have not had any success.

  • 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();

  • Playing a Movie Clip within a Movie Clip on load

    Hi,
    I'm trying to play a Movie Clip animation that is within a Movie Clip after a button has been pressed in a different Movie Clip.
    The issue is that all Movie Clip animations are playing as soon as the SWF is loaded.
    I have a separate Main.as file that contains all of the coding except for the animation stops:
    package
              import flash.display.MovieClip;
              import flash.events.MouseEvent;
              public class Main extends MovieClip
              var title1:Title1;
              var scene1:Scene1;
              var scene2:Scene2;
              var scene3:Scene3;
              var scene4:Scene4;
              var scene5:Scene5;
              var scene6:Scene6;
              var scene7:Scene7;
              var scene8:Scene8;
              var scene9:Scene9;
              var scene10:Scene10;
              public function Main()
                        title1 = new Title1();
                        scene1 = new Scene1();
                        scene2 = new Scene2();
                        scene3 = new Scene3();
                        scene4 = new Scene4();
                        scene5 = new Scene5();
                        scene6 = new Scene6();
                        scene7 = new Scene7();
                        scene8 = new Scene8();
                        scene9 = new Scene9();
                        scene10 = new Scene10();
                        addChild(title1);
                        title1.buttonStart.addEventListener(MouseEvent.CLICK,onButtonStartClick);
                        scene1.buttonWalkOutside.addEventListener(MouseEvent.CLICK,onButtonWalkOutsideC lick);
              //title
              function onButtonStartClick(event:MouseEvent):void
                        addChild(scene1);
                        removeChild(title1);
                        Scene1(parent).gotoAndPlay("frame1")
              //scene1
              function onButtonWalkOutsideClick(event:MouseEvent):void
                        addChild(scene2);
                        removeChild(scene1);
    So right now, I'm getting this error:
    TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::Stage@46534041 to Scene1.
              at Main/onButtonStartClick()
    Any help is greatly appreciated... I've been grinding at this all night.

    I had been trying a bunch of different methods after searching for clues on Google, so it probably doesn't make sense with the parent.
    I replaced the code with what you wrote, and I am given this error now:
    Main.as, Line 44
    1120: Access of undefined property scene1Text1.
    Is there somewhere I have to declare scene1Text1 in Main.as?

  • Playing different Movie Clips onRollover?

    I have several buttons that I would like to play different
    movie clips
    onrollover on the stage. So if button 1 is rolled over it
    plays a clip
    in the lower right corner and when rolled off it stops and if
    button 2
    is rolled over it does the same.
    How is this done?
    Thanks!

    This is the code I am currently using to play and stop a
    movieclip:
    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();
    1. How do I drag my movie clips onto the stage, but not have
    them
    display until the button is rolled over?
    2. Would this code just be applied for each button and
    modified from
    CLICK to OnRollover?
    Thanks!!!!
    kglad wrote:
    > assign a rollover listener to button 1 and in its
    listener function apply the play() method to your right corner
    movieclip. likewise for button 2.

  • GotoAndPlay specific frame in external swf from main swf

    I have a main swf that loads 2 external swfs.
    I click on button to see content of external swf #1 and see stuff. I do something that causes external swf to show other stuff (i.e. not at beginning state)
    In the main swf I click on button to see content of external swf #2. External swf #1 content is made invisible and I see content of external swf stuff.
    NOW, if I click on button to take me back to see external swf #1, I see it's content in current state. I want to force it to start over again at frame #1 which will reset content.
    However, no matter what I try, I can't seem to control which frame to go to in external swf using gotoAndplay.
    Here is code in frame #1 of main swf to load external swfs:
    //load academic movie
    var swfLoader1:Loader = new Loader();
    container1.addChild(swfLoader1);
    var url1:URLRequest = new URLRequest("academic.swf");
    swfLoader1.load(url1);
    //load wisdom movie
    var swfLoader3:Loader = new Loader();
    container3.addChild(swfLoader3);
    var url3:URLRequest = new URLRequest("wisdom.swf");
    swfLoader3.load(url3);
    Here is code in frame 2 of main swf that checks button to see where to go in external swf:
    //academic button clicked
    function academicClick(event:MouseEvent){
       container3.alpha = 0;
       container3.visible = false;
       container1.visible = true;
       container1.gotoAndPlay(1); //this is where I am trying to force it to start at frame 1
       container1.alpha = 1;
    I don't want to reload the external movie to force it to start over.
    Any help would be much appreciated.

    You can easily control this by making the external swf to load with your movieclip, The below is the code snippet that clear on accessing the specific frame on external swf.
    //Loading clips content
    var ldr:Loader;
    var mcExt:MovieClip;
    //Loading
    loadswf("external.swf");
    function loadswf(tmp:String):void{
        unloadSwf();
        ldr= new Loader();
        ldr.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, progressListener);
        ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, swfLoaded);
        ldr.load(new URLRequest(tmp));
        function progressListener (e:ProgressEvent):void{
            ploader.visible=true;
        function swfLoaded(e:Event):void {
            mcExt = e.target.content as MovieClip;
            ldr.contentLoaderInfo.removeEventListener(Event.COMPLETE, swfLoaded);
            mcExt.addEventListener(Event.ENTER_FRAME,onEnterfn);
            ploader.visible=false;
            addChild(mcExt);
    //UnLoading
    function unloadSwf():void{
        if (ldr!=null){
            ldr.unloadAndStop();
            removeChild(mcExt);
            mcExt=null;
    //Intervals (The part you work on the specific frame within the external swf
    function onEnterfn(e:Event):void{
        var num:int=mcExt.currentFrame;
        if (num==1) mcExt.play();
        if (num==9) {
                mcExt.skipmc.addEventListener(MouseEvent.CLICK,skipfn);
                function skipfn(e:MouseEvent):void{
                    mcExt.stop();
                    mcExt.removeEventListener(Event.ENTER_FRAME,onEnterfn);
                    gotoAndStop("help");
        if (num==mcExt.totalFrames){
            mcExt.removeEventListener(Event.ENTER_FRAME,onEnterfn);
            gotoAndStop("help");
    hope it solve

  • 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 internal movie clip at target

    This seems fairly simple, but i can't get it to work.
    I want to play a movieclip from the library when a button is
    clicked. But the LoadMovie is for SWF. The only way I can get it to
    work is have the button click cause - goto frame, which has the
    movie clip. But this gets complicated with various clips. Working
    in Flash 7-8.
    Thank you

    on the last frame of your movieclip attach:
    stop();
    this.dispatchEvent(new Event("finished"));
    right click your movieclip in the library, click linkage, tick export for actionscript and assign a class (eg, Starmove).
    you can then use:
    var minTime:uint = 1000;
    var maxTime:uint = 3000;
    var timer:Timer=new Timer(timeF(),0);
    timer.addEventListener(TimerEvent.TIMER,starF);
    timer.start();
    function starF(e:TimerEvent){
    var star:Starmove=new Starmove();
    addChild(star);
    star.x = Math.floor(Math.random()(stage.stageWidth-star.width));  // these two will probably need adjustment
    star.y = Math.floor(Math.random()(stage.stageHeight-star.height)); // ditto
    star.addEventListener("finished",removeStarF);
    timer.delay = timeF();
    function removeStarF(e:Event){
    removeChild(e.currentTarget);
    e.currentTarget.removeEventListener("finished",removeStarF);
    e.currentTarget=null;
    function timeF():uint{
    return minTime+Math.floor(Math.random()*(maxTime-minTime));

  • Moving the play head in the main timeline from a button in a movie clip

    I have a movie clip that loads and when it is done playing it has a close button that unloads the movie clip... I want to add code to this button that moves the play head to frame 20 of my main timline using actionScript 3.0

    Tried that but dose not work think its because I am loading the movie this way...
    Play button "playFinal"
    function lastQuestion(event:MouseEvent):void{
         var Info:final1 = new(final1);
         this.stage.addChild(Info);
         Info.x=511
         Info.y=340; }
    So I tried using the Name "Info"
    //example......    MovieClip(Info.root).gotoAndStop(20);
    And I tried the name of the clip in the library "final1"
    //example......    MovieClip(final1.root).gotoAndStop(20);
    Is it because im loading it with actions script instead of having it on the timeline?

  • Playing a Movie Clip onClick

    I created a movie clip and I want to place it on the stage on
    frame one
    and place a button on a different layer on frame 1. onClick I
    want the
    button to play the movieclip and I want another button to
    stop the
    movieclip onClick.
    What is the AS3 to do this?
    thanks!!!

    do you know any actionscript3? if not, you should read the
    introduction to as3 in the help files. if yes, show the code you've
    tried.

  • 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

  • Play 2 movie clips in sequence

    Hello everyone,
    I am looking for a script that can let me do this:
    If I click a button - 1 movie clip will play X number of frames, and then after it completes, a 2nd movie clip will play X number of frames. 
    It is important that I can do this in one script in the button. 
    Otherwise the easy way to do it would be add a command at the end of the 1st movie clip. Which I don't want to do because I am trying to create a conditional event thingy...
    Any help/suggestions would be appreciated.
    Thanks

    btn.onRelease=function(){
    mc1.play();
    mc1.onEnterFrame=function(){
    if(this._currentframe==this._totalframes){
    this.stop();
    delete this.onEnterFrame;
    mc2.play();
    mc2.onEnterFrame=function(){
    if(this._currentframe==this._totalframes){
    delete this.onEnterFrame;
    this.stop();

  • Dreamweaver CS4 How to play a movie clip by clicking an image

    Hi
    Can anyone recommend a DW Behaviour, Widget or simple piece of Javascript coding that would allow me to start (or start and stop) a movie clip by clicking an image.
    I have a web page created in DW CS4 which has 4 FLV video clips and I would like visitors to be able to start their clip of choice by clicking a small still from each movie stacked at the right side of the page.
    I've seen this done on many sites but don't know how complex it would be.
    Any help / advice much appreciated.
    Thanks
    George

    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();

Maybe you are looking for