Movieclip help

I have many movieclips nested inside a movieclip. Is there a
way to "stop()" and "play()" everything at once besides writing out
the code for each nested movie.

replace the 'mc' in the code with 'movie1', but you will have
to do this where you want it to happen in your file.
OR you can write a function to call to do so, but I don't
know enough about the structure of your document to tell you where
to write this, but let's try this ... on the main timeline in frame
1, place the following code, then you can 'call' to the function
using the last line below (don't put them on the first frame, they
will go 'where' you want this to happen) and passing a series of
parameters to the function:
btw - this is AS2 code. Also, do you have 'instance names' on
all of your clips?

Similar Messages

  • RollOver Movieclip help

    Hi guys.
    I have got a movieclip and inside is one shape tween. (instanceName = myMovie)
    I have also got a button, (instanceName = myBtn)
    when i rollover the button i want the movieclip to play the shapetween. Im using this code:
    myBtn.onRollover = function(){
    myMovie.play();
    All the code, buttons, and movieclip are on the smae layer and the same key frame.
    However i keep getting this error:
    Description: 1119: Access of possibly undefined property onRollover through a reference with static type flash.display:SimpleButton.
    Source: myBtn.onRollover = function(){
    What am i doing wrong? Thanks for any help, its much appreciated =)

    well not sure the logic train on that...unless i see the file....but what i was saying was put a stop action on the timeline of the movie clip.....when i coded in as2 i use to make a top layer named actions and put my actions there......
    then in the code that triggers the animation to play.....would go something like
    myBtn.onRollover = function(){
    myMovie.gotoAndPlay(1);
    i havent used as2 in forever ever so i'm kinda losing it......may do a test project and see

  • Label Name and MovieClip Help

    Hello guys I am wondering if you help me. I'm a beginner at Flash and not sure if this can be done.
    Basically. On my stage in have two MovieClips. MC_1 and MC_2. When i put the mouse over MC_1 I want it to play a 'label'
    that is inside the MC_2 AND a label that is in MC_1. We can call the label name for MC_2 "lidopen" and the label name for MC_1 "stars."
    Also if I take the mouse off, I want it to go back to normal, and if i click down I want it to play a new .swf file called "123.swf"
    I hope you understand me, and thanks for your help in advanced =)

    Here is some code that will go in the timeline that contains the two movieclips...
    MC_1.onRollover = function(){
         MC_1.gotoAndPlay("stars");
         MC_2.gotoAndPlay("lidopen");
    MC_1.onRollout = function(){
         MC_1.gotoAndStop(1);   // I assumed 1, so change if needed
         MC_2.gotoAndStop(1);
    MC_1.onPress = function(){
         // do something with 123.swf
    I am not clear on your intentions as far as playing 123.swf, so I haven't attempted to code that.  IF you are loading it into the same file, then you might use MovieClipLoader.loadClip or loadMovie, or if you are opening a new web page you would use getURL.

  • StageWebViewBridge from inside MovieClip [HELP]

    I'm trying to implement stageWebViewBridge from inside of a movieclip ..   It's generating this issue because stage is null.     Does anyone know how to implement this inside a movieclip ?
    Error: StageWebViewDisk.initialize( stage ) :: You must provide a valid stage instance
    // this is our main view
    var view:StageWebViewBridge;
    //**** STAGE WEBVIEW BRIDGE
    /* init the disk filesystem */
    StageWebViewDisk.addEventListener(StageWebviewDiskEvent.END_DISK_PARSING, onInit );
    StageWebViewDisk.setDebugMode( true );
    StageWebViewDisk.initialize(stage);

    well your a smart *** now arnt you   Haha..
    I missed 1 painful word in that line of code thanks heeps..

  • Help please!  I need code for a button to stop a movieclip, when both are in a nested animation.

    I'm working on a project that has a button and a movieclip, which we want the button to stop, both nested in a movieclip on the main timeline.
    The button instance = muteBtn
    The clip to stop instance = backmusic
    The movieclip they are nested in = ecard
    There's also a preloader that works just fine on the main timeline.
    I've seen a wide variety of ways to stop a streaming MP3 and they all look way too complicated for my current Flash knowledge level.  As far as I know, if the MP3 is in a movieclip, stopping that clip will also stop the MP3.  If that's just dead wrong and what I'm trying to do will never work, please just let me know so I can struggle in another direction.
    What I'd prefer though would be the coding to make this button work.  I've tried a wide variety of ways to code something that seems like it should be so simple, and keep getting the error "Access of undefined property muteBtn".  I'm assuming this means it can't find the muteBtn in the nested layer.  How do I better define the muteBtn?  Do I then need to add something else that more clearly defines where the clip I want it to stop is since it is nested too?  PLEASE HELP ME!! Thank you in advance!
    Some of what I've tried:
    function endMusic(e:Event):void {
        ecard.backmusic.stop();
    or
    function endMusic(e:Event):void {
        backmusic.stop();
    with...
    muteBtn.addEventListener(MouseEvent.CLICK, endMusic);

    When you target objects, you need to consider the path to the object based on where you are trying to target from.  So if your code is in the main timeline and your button is inside a movieclip, then you need to target the button via the movieclip...
       movieclipName.muteBtn.addEventListener(MouseEvent.CLICK, endMusic);
    As far as stopping a moiveclip resulting in stopping a sound from playing, it is not likely to work.  To stop a sound you need to target the sound to stop it.

  • PLEASE HELP - Simple movieclip click to URL is NOT working... Why???

    I've tried over 4 tutorials to make my movieclip link to a URL. It's just not working for some reason...
    Here is my code.
    ondemand.addEventListener(MouseEvent.CLICK,goThere);
    function goThere(e:MouseEvent){
    var request:URLRequest = new URLRequest("www.money.net");
    navigateToURL(request);
    ondemand.buttonMode = true;
    ondemand.useHandCursor = true;
    stop();
    ondemand is a movieclip instance with a PNG image of text.
    This should work!! There are no compilation errors...
    No mouse cursor change on hover... just like nothing is there.
    Please help...   

    I am overall confused by your description of what you have, especially when you get to doubleclicking the movie and assigning code in it.
    In any case, you need to assign the name (the same name) to every instance of a tweened object. The lack of a name in earlier frames will be inherited by instances in subsequent frames
    I'm confused about your mention of 3 instances being in the library.  Just for clarity, an instance is a library symbol (or an object) that you place on the stage.  If you place two of the same objects on the stage, then you have 2 instances.  Items in the library are instance-wanna-bes.  If you have three different symbols in the library, and you are tweening them as if they were the same, your tween can't possibly work.

  • Movieclip button AS 2.0 help

    I have a movieclip button with up-over and out states
    plays fine but in the over state I need to have two more buttons
    1 button for each icon
    I need to make the hit state in one area with room for two I would guess invisible hit state only buttonds on top of the icons?
    how do I get two separate working buttons in there?
    any help?

    OK, after looking around I see what I need to do is have Nested Movieclips in a drop down menu.
    The drop down menu I made is here
    http://www.mediafire.com/?lynnkzjhkjt
    I think I may have been unclear in what I need to do but when you open the fla you see that the movieclip in the over state needs to have two separate buttons (or movieclips) acting as buttons so I can go to another frame. the mc/buttons shpuld have the hit states or target the two icons.
    I have tried everything as I did see some things for AS 3.0 but not for 2.0
    anybody?

  • Help with AS3, loading multiple files into a movieclip in specific order in scrollbar

    Hello! I am in need of some advice. We are trying to build a site with these features:
    Our site will be built in Actionscript 3.
    1. A navigation menu that, when a button is clicked, will scroll the site quickly to a specific Y position using swfaddress.
    2. The entire site is controlled by a flash scroll bar, which will be scrolling a single movieclip.
        2A. The movieclip will load content corresponding to the navigation categories, all which is organized into zipped files (using this to extract the contents of each section, example: about.zip for the about         section of the site)
        2B. The movieclip will load multiple zipped files one by one that correspond to the navigation, in order, making the site appear to be very tall.
    **What we are in need of is understanding how to load multiple zipped files into a movie clip, in a specific order, and having them scroll between one another through the navigation. The separate navigation categories can be in movieclips instead of zipped files if that is easier.
    Here is a reference of something that works like this: http://swfc-shanghai.com/#/about/

    Hello kglad! I have set aside the idea of using zipped files, and am now just using multiple external swfs that I'd like to load into the movieclip in a specific order. Any thoughts?
    I'm new to AS3, and I'm  attempting to create a scrolling movieclip that will load multiple  external files, in order, into that movieclip. I'm using XML as well. At  this point, nothing is loading into my movieclip (contentMain) and it's  a bit frustrating! Thank you for your help!
    Current error: 1180: Call to a possibly undefined method load.
    AS3:
    //XML Loader
    var myXML:XML = new XML();
    myXML.ignoreWhite = true;
    myXML.load ("master.xml");
    myXML.onLoad =function(sucess) {
       if (sucess) {
    contentMain.loadAll();{
         load("1_Overview.swf")
         load("2_Webcam.swf")
         load("3_Twounion.swf")
         load("4_Oneunion.swf")
         load("5_Retail.swf")
         load("6_Nearby.swf")
         load("7_Courtyard.swf")
         load("8_Map.swf")
         load("9_Conference.swf")
         load("10_News.swf")
         load("11_Sustainability.swf")
         load("12_Contact.swf")
    addEventListener("complete",onLoad)
    onLoad();{
    //load all
         }else {
             trace("ERROR LOADING XML");

  • I trouble with listeners on a movieclip. does anybody can help me?

    I have been working with this for two days and i cant make it
    work.......I
    am going crazy....
    Ok i have this code if someone can help... i will appreciate
    that A LOT.
    The thing is if i compile the program everything works well,
    if i upload it
    or test it on slow connection y doesnt even do the onStart
    event... I show
    you:
    I have this code.
    firstRoom = random(3);
    SetPic("sideA_mc", picorder['id'+firstRoom+'A'], -1, -1, 0,
    0, 5);
    _root.loadingFirst++;
    SetPic("sideB_mc", picorder['id'+firstRoom+'B'], -1, -1, 0,
    0, 5);
    _root.loadingFirst++;
    previously I have:
    var listener = new Object();
    listener.onLoadError = function(target_mc:MovieClip,
    errorCode:String,
    httpStatus:Number) {
    trace(">> loadListener.onLoadError()");
    trace(">> ==========================");
    trace(">> errorCode: "+errorCode);
    trace(">> httpStatus: "+httpStatus);
    listener.onLoadStart = function(mc:MovieClip) {
    trace("STARTLOADING:"+mc);
    listener.onLoadComplete = function(mc:MovieClip) {
    listener.onLoadInit = function(mc:MovieClip) {
    var mcLoader:MovieClipLoader = new MovieClipLoader();
    mcLoader.addListener(this.listener);
    function SetPic(Sprite, fichero:String, StartX:Number,
    StartY:Number,
    SizeX:Number, SizeY:Number, Align) {
    mcLoader.loadClip(fichero, Sprite);
    _root.loading_mc._visible = 1;
    trace("SetPic");
    Can you spot the problem????
    THANKS!!!! ! ! ! !

    Hello chapin1951
    Check out the article below as it explains what the image that you see on your iPod and how to fix it if it does not go away.
    Disk Scan Icon appears when iPod is turned on
    http://support.apple.com/kb/TS1891
    Thanks for using Apple Support Communities.
    Regards,
    -Norm G. 

  • Typeof == "movieclip" ...some weird issue (please  help)

    my movieclips (mc1, mc2, mc3, mc4, mc5, click) are this (mainMap.map.pan) deep. so when i am defining my movieclips i != "click" ie, should not be "click" movieclip inside mainMap.map.pan, however when i am tracing on rollover, it output "click" movieclip, please someone help me picking all other movieclips other than "click" from my mainMap.map.pan
    (all i am trying to do is, when one rollover on any of the mc1, mc2, etc, in my toolTipMC should display information as per the XML elements.)
    mc = mainMap.map.pan;
    for (i in mc) {
        if (typeof (mc[i]) == "movieclip" && i != "click") {
            myBtn = mc[i];
            myBtn._alpha = 100;
            this.useHandCursor = false;
            myBtn.txt = titles[i];
            myBtn.txt2 = details[i];
            myBtn.img = images[i];
            myBtn.onRollOver = function() {
                if (miniMap._visible) {
                    this.useHandCursor = false;
                    toolTipMC._x = point.x;
                    toolTipMC._y = point.y;
                    toolTipMC._visible = true;
                   trace(i); //for some reasons it is still giving me "click"
                    toolTipMC.img.imgHolder.loadMovie(this.img);
                    toolTipMC.tip.text = titles[this.txt2];
                    toolTipMC.detail.text = details[this.txt];
                }else{
                    this.useHandCursor = false;
                //myBtn._alpha=100;
                //myBtn.setRGB(0x003366);

    becaues i is not "click" when that conditional resolves to true.  and that value of i is unrelated to the value of i when you click your button.
    try the following if you still don't understand:
    mc = mainMap.map.pan;
    for (i in mc) {
        if (typeof (mc[i]) == "movieclip" && i != "click") {
            myBtn = mc[i];
            myBtn._alpha = 100;
            this.useHandCursor = false;
            myBtn.txt = titles[i];
            myBtn.txt2 = details[i];
            myBtn.img = images[i];
    // save the value of i when this executes;
    myBtn.ivar = i;
            myBtn.onRollOver = function() {
                if (miniMap._visible) {
                    this.useHandCursor = false;
                    toolTipMC._x = point.x;
                    toolTipMC._y = point.y;
                    toolTipMC._visible = true;
       trace("value of i when loop was running: "+this.ivar+" :: value of i after loop has long finished: "+i);
                    toolTipMC.img.imgHolder.loadMovie(this.img);
                    toolTipMC.tip.text = titles[this.txt2];
                    toolTipMC.detail.text = details[this.txt];
                }else{
                    this.useHandCursor = false;
                //myBtn._alpha=100;
                //myBtn.setRGB(0x003366);
    p.s.  mark this thread as answered, if you can.

  • Help with scroll/throw a movieclip

    hey guys,
    I'm not an expert coder by any means and this is for a proof of concept. I have a large movieclip called "main" that contains sub movieclips of pictures. Now the code I have put in below allows me to drag and throw the main moviecilp like a regular parallax web page. Due to the size of the photos and child movieclips it's a little choppy, only when I flick the movieclip. So can you guys see any way to clean this code up? I've looked at reducing the size of the child mcs but I still get a stutter if someone flicks it quick. Or do you wizards know any other code snippets that will do what I need in a more concise and effective manner? Listen, any help is greatly appreciately. BTW i'm using the throwprops plug in by greensock.
    main.CFbandEIGHTEEN.CFbandEIGHTEENbutton.addEventListener(MouseEvent.CLICK, CFbandEIGHTEENbutton);
    var bounds: Rectangle = new Rectangle(0, 0, 1280.15, 720);
    var blitMask: BlitMask = new BlitMask(main, bounds.x, bounds.y, bounds.width, bounds.height, false);
    blitMask.bitmapMode = false; // allows me to click on the child movieclips
    var t1: uint, t2: uint, y1: Number, y2: Number, yOverlap: Number, yOffset: Number;
    blitMask.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
    function mouseDownHandler(event: MouseEvent): void {
      TweenLite.killTweensOf(main);
      y1 = y2 = main.y;
      yOffset = this.mouseY - main.y;
      yOverlap = Math.max(0, main.height - bounds.height);
      t1 = t2 = getTimer();
      main.stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
      main.stage.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
    function mouseMoveHandler(event: MouseEvent): void {
      var y: Number = this.mouseY - yOffset;
      //if main's position exceeds the bounds, make it drag only half as far with each mouse movement (like iPhone/iPad behavior)
      if (y > bounds.top) {
      main.y = (y + bounds.top) * 0.5;
      } else if (y < bounds.top - yOverlap) {
      main.y = (y + bounds.top - yOverlap) * 0.5;
      } else {
      main.y = y;
      blitMask.update();
      var t: uint = getTimer();
      //if the frame rate is too high, we won't be able to track the velocity as well, so only update the values 20 times per second
      if (t - t2 > 50) {
      y2 = y1;
      t2 = t1;
      y1 = main.y;
      t1 = t;
      event.updateAfterEvent();
    function mouseUpHandler(event: MouseEvent): void {
      main.stage.removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
      main.stage.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
      var time: Number = (getTimer() - t2) / 1000;
      var yVelocity: Number = (main.y - y2) / time;
      ThrowPropsPlugin.to(main, {
      throwProps: {
      y: {
      velocity: yVelocity,
      max: bounds.top,
      min: bounds.top - yOverlap,
      resistance: 50
      onUpdate: blitMask.update,
      ease: Strong.easeOut
      }, 2, 0.3, 0.5);

    anyone?

  • Public var for code in main Fla movieClip plz help!

    Hi there,
    I've made a basic memory game where you have to match up shapes and pictures. but now Im trying to get it to be slightly more complex.
    I have a set of shapes and each shape has a different color. What im trying to achieve is for all the shapes to come up as one color.
    The colors are nested inside each movieClip of the shape.
    first level got 6 cards all the same movieclip but different instence name.
    the problem is that each card comes up with a different color:
    Code in Class:
    public static var curFrame = Math.floor(Math.random() * 6) + 1;
    Code in Fla on the key frame of each shape inside each movie clip:
    trace("***************shape1********************"+memC.curFrame)
    Shape1.gotoAndStop(memC.curFrame);
    And this in the first key frame:
    stop();
    var memC: memory_Control = new memory_Control
    Basically:
    Movieclips (6 cards) - in each there are 8 different shapes - each shape has 5 key frames for different colors.
    If you can help ill rly appriciate it
    thx pavel

    while(!answer.equalsIgnoreCase("q"));

  • Need help with duplicating Movieclips!!!

    Hi! I have a movie where I want to call in a movieclip from
    the library (circleMC) and duplicate it 20 times horizontally and
    15 times vertically and offsetting the new duplicates by 20 pixels
    in both directions to fill the stage.
    Also it would be neat if I could set a slight time delay
    between the duplications.
    So far I have the following script but this doesn't
    duplicates the clip in the y direction:
    count = 1;
    while (count<20) {
    _root.circleMc.duplicateMovieClip("circleDup"+count, count);
    setProperty("circleDup"+count, _x, count*20);
    count++;
    Can somebody help with this issue? thank you in advance for
    any help, Attila

    Hi,
    you could use something like this:
    var count:Number = 1;
    function duplicate(){
    _root.attachMovie("circleMC","mc"+count,count,{_x:count%20*20,_y:count%15*20});
    count++;
    if (count == 20) clearInterval(intervalID);
    var intervalID:Number = setInterval(duplicate,100);
    The library symbol must have the linkage ID 'circleMC'
    (rightclick on the MC in the library > linkage > export for
    AS). The attachMovie method can have an initObject parameter where
    you can set the _x and _y properties. The MC gets attached with
    those properties. To have it delayed, put it all in a setInterval.
    hth,
    blemmo

  • Help with movieclips

    Hi,
    I use Flash cc for interactive music education content and I need help with this:
    Let´s say I have several sets of movieclips in my library. Each movieclip contains audio and animation (two bars). What I want to do is put several buttons on the stage so the user can click two of them to choose which movieclips are goinge to be loaded from the library and then click PLAY and listen and see the first movieclip and immediately after that will listen and see the second movie clip. Like choosing the pieces (bars) of a song and then playing the song.
    The problem is that the ammount of combinations is so huge that I need to find how to do it this way.

    Here's the skeleton of what you're after. Filling it in will be left as an exercise to the reader, but basically...
    Have a Queue area onstage that shows the current queue of loaded items to play. Show the list of possible movieclips below it and each one clicked in that area adds it to the queue. A click on a movieclip in the queue area deletes it from the queue. There's a play button somewhere beside the queue.
    Programming-wise, you will have an array (let's say it's called queueArray). Each movieclip will need a unique instance name, and as it is clicked you will Array.push it onto the queueArray (or delete it of the queueArray if they click it when it's already on there). When they click play, it simply plays queueArray[0] and then queueArray[1].

  • Actionscript 2 help needed on rotating movieclip

    I need help with the "stopping" of a movieclip rotation.  I think this would be easy for you Flash gurus but impossible for me.
    Here is the description.  The code below shows a movieclip rotating after mouse click but i want it to stop in place after 60 degrees.  Basically I need it to rotate 60 degrees after every mouse click and stop.  The "trace" function is there so i know something will happen when it rotates a certain degree.  Right now it rotates continually after the mouse click.
    mc.onRelease=function(){
         mc.onEnterFrame=function(){
              mc._rotation=mc._rotation+=10;
              if(mc._rotation==60){
              trace("HIT");
    As a bonus i would like the rotation of every 60 degrees to ease in and out.  Thank you in advance for any help you can give me.

    When the _rotation value reaches the 60 degree mark, you need to delete the onEnterFrame delete mc.onEnterFrame;.
    There is only one position where the _rotation value will == 60, so if the intention is to stop it at every 60 degrees, then you'll need to change the conditional to be...
    if(mc._rotation%60==0){
    So....
    mc.onRelease = function(){
         mc.onEnterFrame = function(){
              mc._rotation = mc._rotation+=10;
              if(mc._rotation%60==0){
                 trace(mc._rotation);
                 delete mc.onEnterFrame;
    If you want to have easing, I suggest looking into using Actionscript tweening.  With steps of 10 there's little room to ease.

Maybe you are looking for

  • How to change SQL data source in rule file

    <p>Hi there,</p><p> </p><p>I use many rule files to load dimension and data with EssbaseSQL interface. (100-200 rule files!).</p><p>When need to cahnge information for data sources,  do Ihave to change it always with EAS interactively ?</p><p>Is ther

  • Photo Booth Backgrounds

    After installing 10.5.2, I've not been able to get a "moving" background for Photo Booth. It simply immediately says "Background Detected." It also leaves the shadow of the cut-out person still there. Could it have anything to do with my new camera?

  • Preview - Set view Thumbnails as default

    Is it possible to open a document in Preview and have it open to show thumbnails as the default instead of Content Only?

  • Can't locate Geo/Gpx.pm in @INC apache

    Though there are many queries flowing around asking the same question. But here the error is thrown by apache instead of Perl. I am trying to create an XML Response for the client on Mac OS X Mavericks and have written the perl script as follows: #!/

  • PLEASE help with JavaScript parsing of WSDL return

    Can someone help with parsing return WSDL data? My return WSDL data is a concatenated string of alias names (firstname middlename lastname generation) delininated with an "@": 7433|ALIAS|John|W|Smith| @7432|ALIAS|Johnny| |Smith| @7430|ALIAS|JJ| |Smit