Targeting Multiple Movie Clips

Hi everyone,
I'm fairly new to ActionScript so I would really appreciate
any help I can receive.
Right, I have a Flash file which contains a movie clip with
an instance called, 'contentHold_mc'. Inside this movie clip are 4
individual movie clips with instances entitled, 'content1_mc',
'content2_mc', 'content3_mc' and 'content4_mc'. I know these are
not the best names for instances, but this is just for simplicty's
sake. At present all movie clips run at the same time. I want them
to run sequentially. On the last frame of the instance,
'content1_mc', I want to stop the instance from playing and start
playing the instance, 'content2_mc'. On the final frame on
'content3_mc', I want to stop the instance from playing and start
playing the instance, 'content3_mc', and so on until 'content4_mc'
finishes playing. I have tried to use the tellTarget function
without success and anyway, I believe this is now deprecated.
Would anybody be able to provide me some guidance please as
to how I can achieve the previous using the 'dot' notation?
I have tried the using the code found at the bottom of this
message in the final frame of the movie clip instance that I want
to play first ('content1_mc'), however get a compiler error because
of the preceding two full stops '..'
Thank you in advance for any help I may receive with this
query.

Put a stop(); command at the first frame of each of the
clips. On the last frame of the first clip put:
stop();
_parent.contentHold_mc.content2_mc.play();
repeat as needed for each movie clip.
Tell the first clip to play.

Similar Messages

  • HitTest for multiple Movie Clip at the same time

    I have a movie it is a triangle.I duplicate it and I want to hitTest on the first triangle movie clip and I added 3 different line movie clips on the 3 side of triangle.I tried to write a code something like that.
    if(firstTriangle_mc.hitTestObject(line1_mc,line2_mc,line_3mc){
    trace("Ok");
    but I've got error.I think it is not allowed hitTestObject for multiple Movie Clips.So is there anyone have an opinion about it?What should I do?

    Here is another test for multiple movie clips for hitTestPoint but only the first work the others don't
    uc_mc.addEventListener(Event.ENTER_FRAME,hitle);
    function hitle(e:Event) {
    if (uc_mc.hitTestPoint(cub1,cub1Y,true)&&(cub2,cub2Y,true)&&(cub3,cub3Y,true)) {
      uc_mc.alpha=0.5;
    }else{
      uc_mc.alpha=1;
    The code above doesn't work.What should I do?

  • Multiple movie clips in variable

    Is it possible to have multiple movie clips inside one variable? I want to be able to just use var._totalframes instead of mc1._totalframes, mc2._totalframes, etc... Or is there another way I can avoid copying and pasting dozens of movie clips over and over? Thanks.

    You can use the bracket notation in a loop to process multiple similarly named objects such as you described...
    for(i=1; i<someNum; i++){
         something += this["mc"+ i]._totalframes // not clear on your intent
    I can't be sure I am answerng your question when you mention copying and pasting movieclips.

  • Multiple movie clips within a button

    I'm having trouble with working a movie clip played one after another within a button. Can anybody help? or is there a simpler way of getting multiple movie clips to play?
    for my project, when you hover over the button and vines grow out. currently, i have one working in a button but i can't seem to get other vines to work.

    use a movieclip (or sprite) button.  you can then control the child movieclips with actionscript.

  • Single droptarget for multiple movie clips

    I have a movie clip which i use as a drop target. And I have four additional movie clips which can be dragged and dropped into the droptarget movie clip. But when I place a movie clip into a droptarget and I drop the second one too, the droptarget for the second one becomes the first movie clip but not the actual droptarget movie clip.
    Please suggest.

    Thank you for the reply. Can you give me an idea what the below code does?
    mainContainer is a movie clip. mc1, mc2 are three movie clips
    mainContainer.addChild( mc1 );
         and while dropping mc2
    mc2._droptarget - what this will refer to?

  • Multiple Preloaders for Multiple Movie Clips

    Designed in Flash 8, the site's timeline is all in Scene 1
    and is comprised of an introduction, which contains a short video,
    and 6 movie clip categories that the user selects to view. Since I
    want the intro to play as soon as possible, I'd like to limit the
    first preloader to just the video in the intro and not
    _root.getBytesTotal. Then, as the viewer watches this short video,
    the rest of Scene 1 movie clips will keep on loading. After the
    intro, the viewer will choose which of the 6 categories to view.
    These categories are identified with buttons which play the
    particular movie clip. Since I don't know the order of the
    categories they will select, I thought there should be a separate
    preloader for each category. Hopefully, after they view a category,
    the rest of the categories will have loaded and the loading time
    will be nil. The design for the preloader is comprised of a status
    bar and a percent loaded. Is there a way to limit the
    _root.GetBytesTotal to specific frames? I know I could break these
    categories up into separate SWF files but then I loose the
    advantage of one loading while another is being viewed.

    MovieClipLoader is a built in class of functions that will
    allows you to easily load Media (swfs/jpgs) from external sources.
    This will create a MCL object
    var mcl:MovieClipLoader = new MovieClipLoader
    We want the MCL object to receive events for any movie that
    is loaded into the main timeline
    mcl.addListener(this);
    Ok. now we have a movie clip loader that is able to recieve
    events. Since we want to show the progressive download and want to
    do something with that content after it loads, we need to declare
    two event handlers onLoadProgress and onLoadInit. onLoadProgress is
    pretty straight forward. onLoadInit executes it's action as soon
    all of the AS on frame 1 of its time has finished loading. In this
    case, we want two different things to happen. 1st, load the first
    clip and show it.... 2nd, load all remaining clips into the buffer.
    But first, lets declare those next...
    function onLoadProgress( target:MovieClip,
    bytesLoaded:Number, bytesTotal:Number):Void {
    // standard preloader code goes here
    function onLoadInit( target:MovieClip ):Void {
    // display the clip - this will be as easy as just calling
    our loadClip function for the mcl...more on that in a minute
    // If you want something special to happen, i.e. movie fades
    in or a mask is applied to it, you'd do that here.
    Now all we need to do is call the loadClip member function
    for the MovieClipLoader. Just replace the two parameters with the
    location of the swf and then the name of the instance you want it
    to load into
    mcl.loadClip( "myswf.swf", targetMovieClip );
    The other movie clips are now a breeze as well. For each
    button, just add an on(release) or onRelease = function (depending
    on your situation) to just call that mcl.loadClip() line from up
    above. Just change the movie you want loaded.
    Let me know if you need more help...

  • Target a movie clip inside a movie clip

    When I go to the symbol editing mode on the first movie clip, I drag the instance of my 2nd movie clip to the stage. I then am duplicating my work, (it is over lapping) not sure what I am doing wrong here? and I am finding that my child movie clip is taking on the parent movie clip properties. How do I stop this from happening? I thought they are to remain independent? Any help is greatly appreciated. TY.

    Will the child timeline be independent of the parent timeline. My pend_mc is the child and has taken on the hand_mc properties. Also why is there brackets around some and not the others? Thank you so much for your time.

  • Scripting Download Progress for Multiple Movie Clips?

    I'd like to insert script in the example below that would indicate the download progress of two successive movie clips on a page. Any suggestions would be much appreciated. Thank you.
    import fl.video.FLVPlayback;
    import fl.video.*;
    explainer.source="movie1.flv"
    explainer.addEventListener(VideoEvent.COMPLETE, f);
    explainer.autoPlay= true;
    explainer.volume=1.00;
    function f(e:Event){
    var myVideo:FLVPlayback = new FLVPlayback();
    myVideo.source = "movie2.flv";
    myVideo.addEventListener(VideoEvent.COMPLETE, myHomePage);
    myVideo.autoPlay=true;
    myVideo.volume=1.00;
    myVideo.skin="SkinUnderPlaySeekStop.swf";
    myVideo.skinAutoHide=true;
    myVideo.skinBackgroundColor=0x000000;
    myVideo.skinBackgroundAlpha=0.1;
    myVideo.height=405;
    myVideo.width=720;
    myVideo.x=141.2;
    myVideo.y=115.4;
    stage.addChild(myVideo);
    var urlRequest=new URLRequest("ATRMAIN.html");
    function myHomePage(eventObject:VideoEvent):void
    { navigateToURL(urlRequest, '_self');}

    the flvplayback component has bytesLoaded and bytesTotal properties.

  • 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

  • Multiple Movie clips and rollovers

    Hi, I need some help. I am putting together a flash file with
    3 movieclips. I have three movie clips I made - one for each of the
    3 big circles. When they roll over the other circles are supposed
    to disappear under the circle that they have their mouse on. I
    placed all 3 movie clips on the first scene, but when they roll
    over one of the circles the other circle movie clips stay there
    while the other one runs on the mouse over. I need the other ones
    to disappear. You can view what I have so far:
    http://www.feeco.com/Portals/0/encap.swf.
    If you need to see my fla file I can email it to you. Thanks!
    Stephanie

    use:
    stop();
    yourplaybutton.addEventListener(MouseEvent.CLICK,playF);   // replace yourplaybutton with the name of your play button.
    function playF(e:MouseEvent):void{
    play();
    /* Click to Go to Frame and Play
    Clicking on the specified symbol instance moves the playhead to the specified frame in the timeline and continues playback from that frame.
    Can be used on the main timeline or on movie clip timelines.
    Instructions:
    1. Replace the number 5 in the code below with the frame number you would like the playhead to move to when the symbol instance is clicked.
    button_19.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndPlayFromFrame_15);
    function fl_ClickToGoToAndPlayFromFrame_15(event:MouseEvent):void
        gotoAndPlay(2);
    /* Click to Go to Next Frame and Stop
    Clicking on the specified symbol instance moves the playhead to the next frame and stops the movie.
    button_20.addEventListener(MouseEvent.CLICK, fl_ClickToGoToNextFrame_6);
    function fl_ClickToGoToNextFrame_6(event:MouseEvent):void
        nextFrame();
    I also have added a keyframe to the end of my actions to stop(); this does not appear here with this code but on a separte screen but under the same actions folder the stop works just as I want to the last movie clip stops at the end
    Just can not figure out how to get the play to not start over from begining but to continue.

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

  • How to combine multiple movie clips from iphone 4 in iphoto 09

    I have multiple videos taken from iphone 4 downloaded to iphoto 09. How can i combine them all into one movie?

    We, as you know, are only users - we can not answer any "why" questions - only Apple knows why - we can sometimes answer How to questions - How to is use iMovie
    LN

  • Targeting a movie clip inside a movie clip inside another movie clip with a twist

    Thanks to ned. Im able to link to a movieclip inside a movieclip.
    Unfortunately one of the movieclips now are a scrollbar and scroll.  Now the actionscript isnt working?
    Has anyone wany ideas? Please
    cal.onPress = function() {
    gotoAndPlay(2);
    message1.contentMain.message.total = unit1;
    Thanks

    I wish i could say it wasnt named message 1 but it is.  The code works without a scroll bar.
    As soon as i put the target in a scrollbar it doesnt work?
    This is my code for the scrollbar if thats the problem? maybe
    scrolling = function () {
    var scrollHeight:Number = scrollTrack._height;
    var contentHeight:Number = contentMain._height;
    var scrollFaceHeight:Number = scrollFace._height;
    var maskHeight:Number = maskedView._height;
    var initPosition:Number = scrollFace._y=scrollTrack._y;
    var initContentPos:Number = contentMain._y;
    var finalContentPos:Number = maskHeight-contentHeight+initContentPos;
    var left:Number = scrollTrack._x;
    var top:Number = scrollTrack._y;
    var right:Number = scrollTrack._x;
    var bottom:Number = scrollTrack._height-scrollFaceHeight+scrollTrack._y;
    var dy:Number = 0;
    var speed:Number = 10;
    var moveVal:Number = (contentHeight-maskHeight)/(scrollHeight-scrollFaceHeight);
    scrollFace.onPress = function() {
      var currPos:Number = this._y;
      startDrag(this, false, left, top, right, bottom);
      this.onMouseMove = function() {
       dy = Math.abs(initPosition-this._y);
       contentMain._y = Math.round(dy*-1*moveVal+initContentPos);
    scrollFace.onMouseUp = function() {
      stopDrag();
      delete this.onMouseMove;
    btnUp.onPress = function() {
      this.onEnterFrame = function() {
       if (contentMain._y+speed<maskedView._y) {
        if (scrollFace._y<=top) {
         scrollFace._y = top;
        } else {
         scrollFace._y -= speed/moveVal;
        contentMain._y += speed;
       } else {
        scrollFace._y = top;
        contentMain._y = maskedView._y;
        delete this.onEnterFrame;
    btnUp.onDragOut = function() {
      delete this.onEnterFrame;
    btnUp.onRelease = function() {
      delete this.onEnterFrame;
    btnDown.onPress = function() {
      this.onEnterFrame = function() {
       if (contentMain._y-speed>finalContentPos) {
        if (scrollFace._y>=bottom) {
         scrollFace._y = bottom;
        } else {
         scrollFace._y += speed/moveVal;
        contentMain._y -= speed;
       } else {
        scrollFace._y = bottom;
        contentMain._y = finalContentPos;
        delete this.onEnterFrame;
    btnDown.onRelease = function() {
      delete this.onEnterFrame;
    btnDown.onDragOut = function() {
      delete this.onEnterFrame;
    if (contentHeight<maskHeight) {
      scrollFace._visible = false;
      btnUp.enabled = false;
      btnDown.enabled = false;
    } else {
      scrollFace._visible = true;
      btnUp.enabled = true;
      btnDown.enabled = true;
    scrolling();

  • Tweening properties of multiple movie clips

    My problem is that all of these movieclips are acting as one
    massive movieclip. when you rollover any one of them, they all
    change their alpha property. what do i need to change in this code
    to make each clip work independently with onRollover and onRollout?
    I want to be able to rollover any one of them and just have that
    particular movieclip react.
    thanks for your help!

    Thanks!! that works perfectly!!

  • Need help loading multiple movie clips.

    Hello forum members,
    I've run into a bit of an irritating problem and perhaps
    someone can clue me in to the answer.
    I'm creating a SWF which uses loadMovie (I've also tried
    creating a MovieClipLoader instance and using instance.loadClip) to
    bring in 2 other SWFs.
    See below AS in first couple frames of main movie's
    time-line:
    First movie:
    this.createEmptyMovieClip("mcToolbar", 10);
    with (mcToolbar)
    _x=8;
    _y=68;
    loadMovie("toolbar.swf",mcToolbar);
    Second movie:
    this.createEmptyMovieClip("mcWindow", 11);
    with (mcToolbar)
    _x=500;
    _y=60;
    loadMovie("textwindow.swf",mcWindow);
    This works great when opening up my main SWF in Flash Player
    and when viewing the movie in the published HTML web page.
    However, I'm using FlashObject to load my main movie to get
    around that annoying "Click to activate this control" thing.
    When viewing this version of the web page with my main SWF
    being loaded, I see the SWF load, then the first loadMovie
    loads....THEN the first loadMovie disappears and the second
    loadMovie loads and appears at the wrong X and Y coordinates.
    Any ideas?

    Ok, I know replying to my own post is odd on some forums, but
    anyhow:
    I've done some further testing and find that FlashObject
    isn't the problem.
    Looking at the AS code above, it is clear that the SWFs to be
    loaded must be in the same folder as the HTML web-page.
    However, my intent is that these small SWFs that are being
    loaded in by the main SWF will be shared by many other movies,
    therefore I'd like to stick them (the physical SWF files) closer to
    the root of the site (e.g. SiteFoler->flash).
    I see that my problem rears its ugly head when I try to
    reference these movies in my main flash movie as follows:
    First movie:
    this.createEmptyMovieClip("mcToolbar", 10);
    with (mcToolbar)
    _x=8;
    _y=68;
    loadMovie("../../../flash/toolbar.swf",mcToolbar);
    Second movie:
    this.createEmptyMovieClip("mcWindow", 11);
    with (mcToolbar)
    _x=500;
    _y=60;
    loadMovie("../../../flash/textwindow.swf",mcWindow);
    In the example above, my HTML page is 3 folders deep whereas
    the movies I'm loading in are 1 folder deep in the folder labeled
    "flash".
    By doing it in this manner, I get the problems I described
    above (first movie loads then disappears and second movie loads in
    wrong position).
    Any ideas as to why the physical location of the SWFs being
    pulled in is causing this problem? I'd like to try to avoid copying
    the SWFs to each place their being refrenced from as that could be
    a major maintenance headace.
    Thanks,
    Ben

Maybe you are looking for

  • Word Doc to PDF

    Hi friends Can any one tell me how i can convert a word doc to pdf using java. My actual problem is I need to convert doc to pdf without the user interaction. Here iam creating doc from xml and xsl and the i need to make the copy of word doc in pdf.

  • Need to reinstall CS5 Extended on new Win8 laptop.

    Originally purchased CS5 Extended license for a Macbook, however it recently met its demise.  Would like to reinstall it on a Windows 8.1 laptop.  I have a valid license key from Adobe. I thought I found an Adobe site with CS5 Extended install files

  • Keeping custom templates and configurations on different drive

    What I'm trying to do is keep one set of DVDSP layouts/templates/etc on a partition that all of our editors/graphics artists can access instead of adding 8gb or more on each station. I figured out how to link each station to the stock palette element

  • LWAPP ap speed and duplex

    Is it possible to set the ap speed and duplex once it has joined a controller as there is nowhere on the wlc to do this. Is there a command available after I give the ap a username and passsword with config ap username <username> password <password>

  • MAC Pro Lion OSX 8

    My operationing system, the new Lion OSX 8 is not being supported by my Cisco Connect folder. I am unable to open it now that this update has been added to my computer. Please help.