Changing depths of movie clips with button clicks

Hello all,
I've got a file on working on that has 4 different movie clips on one layer that, when clicked, will zoom in (made with tweens in the timeline).
The issue I'm having, is that when I click one of them, they are arranged in a way that won't work for what I need. I click one, and it works, but it is hidden by the movie clip that is on top of it in the heirarchy. Click another, zooms in, but is partially hidden by another one.
My question is: Is there anyway in AS2 to code these so that when one is clicked, it will the top spot in the heriarchy? So that I can code them all like this so that whenever one is clicked, it goes to the top so it is not hidden?
Thanks

Correct me if I'm wrong, but isn't that just used to swap 2 movie clips?
Or is there a number I can input instead of the movie clip name that will change all of them?

Similar Messages

  • 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.

  • Changing depths of movie clips

    Hi Everyone,
    I have 8 square movie clips in two rows of 4, all on the same
    layer. When
    you click on them they become draggable. The problem is that,
    depending on
    where they are located within the layer, sometimes a dragging
    movie clip
    appears beneath the other 7 movie clips. Is there a way to
    make the selected
    movie clip that is being dragged, appear above or on top of
    the other seven,
    no matter which one is selected and being dragged?
    Thanks for any insight,
    Doug

    "kglad" <[email protected]> wrote in message
    news:ghrojd$ssl$[email protected]..
    > use the swapDepths() method of movieclips to move the
    clicked movieclip to
    > the topmost depth.
    Thanks kglad =
    on (press) {
    this.swapDepths(_root.getNextHighestDepth());
    startDrag("", true);

  • Menu made in movie clip - with sub-section we can click on to go to another frame

    I would like some help about that:
    I want to do a menu made all in movie clip (NO button). In
    this menu, when we click on one of the part (sub-section) of the
    button (which is a mc), we must go to another frame in the main
    scene.
    It is working for the roll-over and mousedown for my button
    (with the _up, _over and _down labels). But it's not working then
    to put, i don't know, another movie clip inside with alpha 0 to
    make another onRelease and then gotoAndStop(20); ...
    Here is the code I have in the main scene (first frame):
    stop();
    mon_clip_mc.onRelease = function() {
    //this._root.gotoAndStop(20);
    And here is the code I have in the first frame of the movie
    clip of the button:
    stop();
    I'd really appreciate some help! Thanx

    lalapinerouge,
    as far as I can see with your method for buttons, is that it
    only reads 1 button inside mon_clip_mc..
    I cant figure out why, i've tested it over, made new fla's
    with your method, and i still cant get it to work, nor do I
    understand why..
    I need to study abit more.
    Maybe someone in the Forum will have a look at this topic,
    and know what's going on with your method.
    In the mean time, heres a submenu I made for a site a while
    ago. This doesnt use timeline actionscript, ( because i was a
    newbie then ) =)
    if you have a look through the whole FLA, ( it's quite abit)
    you can get an Idea of how i do my movie clip buttons, till this
    day, i still use the same method, only i use mainly timeline
    actionscript..
    the main point to notice is that EVERY button ( even submenu
    ) is it's own movieclip...no button in there holds multiple sub
    buttons inside... This gives you complete control of each button,
    and endless possibilities for animation, tweens, and anything extra
    you would want to add to a button.
    Sorry I couldnt help you figure out your problem fully. Im
    still going to mess around with it abit more to see if i can figure
    it out..
    Hope you can addopt some useful info from this FLA.
    HERE

  • Movie clips as buttons

    Hi all having a bit of difficulty with a project,
    Iam using movie clips as buttons, the only function they
    perform is loading in external swf files into a blank movie clip.
    The script I have used for this is as follows:
    on (release) {
    loadMovie("folio.swf", "_level0.holder");

    Hi joakimpilo, im not to sure im following your question
    correctly but here goes...
    I am assuming b1, b2, b3 and b4 are your MC buttons and you
    want these to load in information.
    This is what I do for similar situations,
    on your main timeline have an MC named holder that you will
    load external swf files into when you click a certain button. It is
    important that you take a note of the size so you can create the
    external swf at the same size, so when they load in they fit
    correctly.
    then in the buttonMC have a top layer that contains a simple
    box that covers the entire area of the MC. this kind of acts as a
    hit area so if you have animated the MC for a roll over effect make
    sure the button covers the area you need. I then apply the script
    to this button as follows (still in the buttonMC, not on main
    timeline)
    on (release) {
    loadMovie("yourexternalmovie.swf", "_level0.holder");
    "yourexternalmovie.swf" is the name of the external movie
    holding the informatiion you want loaded in to the "holder" MC.
    This is created in an entirely different flash document. Make sure
    and remember the name of these external files and just apply to
    each button.
    It is also very important to keep all the swf files in the
    same folder as the main flash file so it can see them to import.
    Hope that makes some sort of sense, and is actually what your
    looking for.

  • How to detect when 2 movie clips have been clicked?

    Hello:
    I'd like to know how can I detect when 2 movie clips have been clicked (irregardles of the order).
    What I have is this:
    In my main timeline I have 2 independent movie clips (mc_him and mc_her) each in it's own layer that, when clicked, play an internal animation without moving my main playhead anywhere. What I need to do is, once they are both clicked (as I said, it doesen't matter in what order), a button that sends me to another section of my movie has to appear. It really doesen't matter if the button shows by enabling it with alpha or by sending me to a specific frame where my button lies. What I need to detect is both clicks so that the button shows up.
    How can I achieve this?
    Thank you very much.

    btn1.onRelease=function(){
    // do whatever
    this.clicked = true;
    checkBothClickedF();
    btn2.onRelease=function(){
    // do whatever
    this.clicked = true;
    checkBothClickedF();
    function checkBothClickedF():Void{
    if(btn1.clicked&&btn2.clicked){
    // do something. both clicked
    // reset both clicked properties?

  • Movie Clips as buttons – ignoring my stop actions and event listeners

    Ok, so I think I am hear with the proper linked files to show you guys! Pretty much learning everything, so forgive my ignorance thus far!
    Anyway, I am just trying to figure out movie clips as buttons, and have been following along on Lynda.com – however, I seem to be doing these things right, but when i test my movie, the button just loops regardless of rollovers or stop actions.
    You can check this address www.midnyc.com to see the failed anim, and you should be able to import it as well. Here is my coding:
    function rollover (e:EVENT){
        myBtn.gotoAndPlay ("in");
    myBtn.addEventListener (MouseEvent.MOUSE_OVER, rollover);
    function rollout (e:EVENT){
        myBtn.gotoAndPlay ("out");
    myBtn.addEventListener (MouseEvent.MOUSE_OUT, rollout);
    thank you in advance for your help. And to KGLAD, thanks for recommending how to post a bit better! Since I never had links etc... sorry about that.

    Do you get any kind of error messages?  Normally if there's a coding error, movieclips and other things go haywire.
    For you event handler functions, try specifying the event that matches the listener event...
    function rollout (e:MouseEvent){
    I think "EVENT" would be wrong anyways... "Event" would be correct

  • 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...

  • 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

  • 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.

  • 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

  • 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.

  • 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?

  • Loading movie clip to stage with button click AS3

    I'm trying to figure out how to load a movie clip to the stage with a button click and have the movieclip close again using a close button. Does anyone have a step by step on how to do this or links to some tutorials.
    Below is an example of what I'm trying to do.

    Alrighty I changed the publish settings to as3. I'm still getting two errors:
    Scene 1
    1046: Type was not found or was not a compile-time constant: Popup1Btn.
    Scene 1, Layer 'as', Frame 1, Line 3
    1061: Call to a possibly undefined method addEventListener through a reference with static type Class.
    So my setup on my main timeline is I have an actionscript layer with this code now:
    var popup1:Popup1
    Popup1Btn.addEventListener(MouseEvent.CLICK,addF);
    ClosePopup1.addEventListener(MouseEvent.CLICK,closeF);
    function addF(e:MouseEvent):void{
    popup1=new Popup1();
    addChild(popup1);
    function closeF(e:MouseEvent):void{
    removeChild(popup1);
    popup1=null;
    On the stage I have a button with the isntance/AS linkage name Popup1Btn. Inside my Popup1 MC I have a box with text and then a button with the instance/linkage name ClosePopup1 to close the popup.
    What am I missing?

  • How to change the movie clip a button links to???

    I am working on a website in Flash that had already been
    designed by someone else. There are a number of buttons across the
    website that are linked to the same symbol. Those buttons link to
    movie clips, in the button's actions, that pop up as small windows
    providing more information in regards to the button clicked. The
    problem is that I cannot figure out how to properly change the link
    association between button and movie clip.
    Here is the action script for one of the buttons:
    on (release) {
    _root.scrHEIGHT=100
    _root.scroller.scroller.gotoAndStop(2);
    _root.scroller._x = 100;
    _root.scroller._y = 150.7;
    _root.TM_title = "About Chris Smith";
    _root.READ = 3;
    When I change the number after "root.READ =" it will change
    it to another movie clip but I how do I know what that association
    is based on? For instance if I make a duplicate movie clip how can
    I make the above script link to it? Also, what exactly does that
    last line in the above script mean? When I tested various numbers,
    like 3 and 6, they would link to the same movie clip.
    Please help! This is driving me crazy!
    Thanks!!!

    Hi,
    buttons can be defined with static icon/text, or dynamically via a variable (containing @08\Qtooltip@text for example). You choose the pushbutton type when you define your button using the screen painter. For the dynamic definition, you must tick the "output only" checkbox, enter a global variable name, that you'll fill in your program, preferably using ICON_CREATE function module.
    BR
    Sandra

Maybe you are looking for

  • Is Album Artwork Free?

    I have quite a few songs/CDs that I don't have album artwork for. I've run across the "Get Album Artwork" feature in iTunes, but I want to know if it's free. I have an account and I just don't want to see any unexpected charges on my credit card. Are

  • InDesign Crashing on Mac 10.8.2 and 10.8.3

    Hello Please find the crash report here. http://pastebin.com/RuWs8cWL Updated OS but no change. There are other machines that have the same application but only this one has that problem.

  • Moved back to entourage.....standard edition....

    Hi, i have discovered that sending attachments on Exchange using the web services does not work with files above 5mb (while my company goes up to 20mb). Both Mail and Entourage web service edition won't work. I reverted back to std Entourage and that

  • Photoshop Elements 11 Disc won't mount on Mac

    Photoshop Elements 11 disc wont mount.  Spins a few times then ejects.  This is my second disc.  Other discs work fine in the drive?  I can install a downloaded trial version which works ok.  Can I simply apply my purchase code from my disc to the tr

  • Hp pavilion g6 notebook PC. No sound from speakers or headphones

    Hi, I just did all the recommended updates for my computer this week due to it working so slowly. It started working like new again with one problem, I now have absolutely no sound. A big problem for me since I use this laptop as a TV and love listen