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

Similar Messages

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

  • Setting depth of movie clips

    I have 4 movie clips on the stage. They are named logo1,
    logo2, logo3, logo4. I have them set out cascading. So the only
    clip that is fully visible is the front clip but the top of the
    other clips can still be seen. When a user clicks on one of the
    back clips i want it to appear in front of the clip that is
    currently at the front.
    Can someone help me out?
    Thanks.

    You can use swapDepths() (look it up in the Help Reference
    for more info - it's a movieclip method). Putting something like
    this in each clips onPress handler, or whatever you are using....
    this.swapDepths(this._parent.getNextHighestDepth()-1);
    However, if you have components, something, I think
    "focusManger" is created at the highest possible non-reserved depth
    and things can get kinda funny... can't remember all the details
    exactly.

  • AE How to Change the color of a movie clip?

    I have a movie clip of a White Show Avalanche. How can I change the color from White to another earthly color. I would like to post 2 images, one still of the white avalanche and one still image of the color or look I am after. Can you post or attach images to this thread? If so how?
    I am not just trying to change the Hue/Saturation.

    To elaborate on Ko's post: In RGB space, White is presented by full values of 1 (or 255, if you like that better) for Red, Green and Blue. Since there's no differential between the individual components, there's nothing to shift the Hue. Hence you will have to find alternate ways of recoloring your stuff.
    A simplistic way would e.g. be using effects such as Tint, Tritone or Colorama based on the Luminance. A more elaborate way would be cutting up the whole thing in multiple pieces (debris, shadows, waves, edges) and color correct each part individually. In any case you will very likely have to work with multiple instances of your layer and apply some masking here and there.
    Mylenium

  • As 2.0 class objects- how to swap depths of a movie clip

    How do you bring an object to the top? if it's just a movie
    clip, I could do a swapdepths, but if it's a movieclip that's part
    of an AS 2.0 object, how do you swap depths of the whole object?
    I create 2 objects (same class) which each have a movieclip
    within them. The movie clip is created on a unique level with
    getNextHighestDepth().
    I have a button which tries to swapDepths of the 2 objects,
    but I can't get it to work. Can anyone help?
    here's the detail:
    1. create a symbol in the library called "someShape_mc" and
    put some shape in it - a circle, a square, whatever - this symbol
    is exported for action script, and has an AS 2.0 Class of
    "ClassObject" ( I also put a dynamic text field in the shape to
    display the current depth - it's called "depth_txt")
    2. create a button called "swap_btn" on the stage.
    Frame 1 has the following actionscript:
    var BottomObject:ClassObject = new ClassObject(this,100,150);
    var topObject:ClassObject = new ClassObject(this,110,160);
    // for the button add this:
    Swap_btn.onRelease=function() {
    // try it with the full path:
    _root.BottomObject.__LocalMovieClip.swapDepths(_root.topObject.__LocalMovieClip);
    // try it with with just the objects:
    BottomObject.__LocalMovieClip.swapDepths(topObject.__LocalMovieClip);
    // try it with the object as a movieclip
    BottomObject.swapDepths(topObject);
    trace("Did it Swap?");
    // try it with a method in the class....
    BottomObject.swapIt(topObject.__LocalMovieClip);
    BottomObject.swapIt(topObject);
    trace("nope... no swapping going on...");
    ================================
    here's the AS file: "ClassObject.as"
    class ClassObject extends MovieClip{
    var __LocalMovieClip;
    var __Depth;
    function ClassObject(passedIn_mc:MovieClip,x:Number,y:Number)
    __Depth = passedIn_mc.getNextHighestDepth();
    __LocalMovieClip =
    passedIn_mc.attachMovie("someShape_mc","__LocalMovieClip",__Depth);
    trace("made a shape at " + __Depth);
    __LocalMovieClip._x = x;
    __LocalMovieClip._y = y;
    __LocalMovieClip.depth_txt.text = __Depth;
    public function swapIt(targetMc) {
    __LocalMovieClip.swapDepths(targetMc);
    __LocalMovieClip.depth_txt.text =
    __LocalMovieClip.getDepth(); // no difference.
    trace("Tried to swap from within the class...");
    ========================
    so- the goal is to bring the "bottom" Class object on top of
    the "top" object. The button tries various methods of swapping the
    depths of the movie clips - but there is not one that works. What
    am I missing?
    tia
    ferd

    Thank you for your response - and here I have included the
    code I reworked to show how it works, and doesn't work. you're
    right about not needing the extra containers, but this example is
    part of a bigger thing...
    I'm confused - it works ONLY if I attach the movie outside
    the class, even though the "attachment" occurs, I'm thinking, at
    the same scope level, that is, _root.holder_mc, in both examples.
    it seems that the advantage of having a class is defeated
    since I have to do the extra coding for each object that will be
    created. It's like the class can only have a reference to the
    movieclip outside itself, and not have a clip INSIDE that is fully
    functioning. am I right about this? Is there someplace good I can
    learn more about class objects and movieclip usage?
    also, my class object IS a movieclip, but " this.getDepth() "
    is meaningless inside the class object. hmmm...
    This one works..... attaching the movies at the root level
    (to a holder_mc)
    // Frame 1
    tmp1 =
    holder_mc.attachMovie("someShape_mc","tmp1",holder_mc.getNextHighestDepth());
    var BottomObject:ClassObject3 = new
    ClassObject3(tmp1,100,150);
    tmp2 =
    holder_mc.attachMovie("someShape_mc","tmp2",holder_mc.getNextHighestDepth());
    var topObject:ClassObject3 = new ClassObject3(tmp2,110,160);
    // for the button add this:
    Swap_btn.onRelease=function() {
    BottomObject.swapIt(topObject);
    trace("clicked button");
    // ClassObject3.as
    class ClassObject3 extends MovieClip{
    var __LocalMovieClip:MovieClip;
    function
    ClassObject3(passedInMovieClip:MovieClip,x:Number,y:Number) {
    trace(" this class object is at ["+this.getDepth()+"]");
    __LocalMovieClip = passedInMovieClip;
    __LocalMovieClip._x = x;
    __LocalMovieClip._y = y;
    public function swapIt(targetMc:MovieClip):Void {
    trace("do the swap in the class");
    trace("===========================");
    trace("target type :" + typeof(targetMc));
    trace("__LocalMovieClip type :" + typeof(__LocalMovieClip));
    __LocalMovieClip.swapDepths(targetMc.__LocalMovieClip);
    This one does NOT work..... attaching the movies within the
    class object...
    // Frame 1
    var BottomObject:ClassObject2 = new
    ClassObject2(holder_mc,100,150);
    var topObject:ClassObject2 = new
    ClassObject2(holder_mc,110,160);
    // for the button add this:
    Swap_btn.onRelease=function() {
    BottomObject.swapIt(topObject);
    trace("clicked button");
    // ClassObject2.as
    class ClassObject2 extends MovieClip{
    var __LocalMovieClip:MovieClip;
    function
    ClassObject2(passedInMovieClip:MovieClip,x:Number,y:Number) {
    __LocalMovieClip =
    passedInMovieClip.attachMovie("someShape_mc","stuff1",passedInMovieClip.getNextHighestDep th());
    __LocalMovieClip._x = x;
    __LocalMovieClip._y = y;
    public function swapIt(targetMc:MovieClip):Void {
    trace("do the swap in the class");
    trace("===========================");
    trace("target type :" + typeof(targetMc));
    trace("__LocalMovieClip type :" + typeof(__LocalMovieClip));
    __LocalMovieClip.swapDepths(targetMc.__LocalMovieClip);

  • Can I change the registration point of a movie clip?

    I'm loading a movie clip dynamically and its registration
    point defaults to top-left corner. I need to change it to the
    center, is this possible? if so, how?
    Thank you

    Thank you. I tried that and it didn't work too. Please check
    this code:
    loader.loadClip(_global.image_url+this["image1"], image1);
    DynamicRegistration.initialize(image1);
    image1.setRegistration( 20, 20);
    What is wrong with it?

  • Movie clips change across documents

    Does anyone know why this happens?
    This is my usual workflow for creating various sized web banners.
    1. Create a 300 x 250
    2. Get it approved
    3. When approved, duplicate the document and resize it for 160 x 600, 728 x 90 etc etc and reposition / change movie clips to fit the new sizes
    A problem keeps occuring that if I modify a movie clip in one document those changes can affect other documents even if they are closed.
    I haven't created any Project files so essentially the documents aren't linked to each other so why do they change?
    Thanks
    Paul

    If you don't have anything marked as runtime sharing that is the only thing that would modify the symbols. Once you duplicate a .fla file it does not have a magical connection to the others. I would just audit your process and make sure you are modifying what you actually intend to modify.
    Are you modifying any external assets outside of the FLA that maybe they are all still pointing to?

  • Changing movie clip alpha with a button

    Hello all
    I need a freindly nudge in the right direction.
    I need to change the alpha properties of a movie clip with a
    button press, but if the alpha cannot go below 20.
    I have the first part ok but just cannot figure out how to
    limit the alpha change so that it does not go below 20.
    Thanks

    Ok everything works but now there is a new problem.
    if I push the increase button past the alpha == 100 the alpha
    does not change but to decrease it will not change until it gets
    back down to the 100% point.
    Example:
    it takes 4 button presses on decrease to get to 20% alpha and
    4button presses on increase to get back to 100%
    If I press increase 3 more times past 100% then I need to
    press decrease 3 times to get back down to 100% and the 4th
    decrease button will cause an alpha change.

  • I phone 5 movie clips do not download to my mac. Do I need to change something in settings?

    My iPhone 5 does not download my movie clips to iPhoto on my mac.  Do I need to change something in settings?

    There are 9 different versions of iPhoto and they run on 10 different versions of the Operating System. The tricks and tips for dealing with issues vary depending on the version of iPhoto and the version of the OS. So to get help you need to give as much information as you can. Include things like:
    - What version of iPhoto.
    - What version of the Operating System.
    - Details. As full a description of the problem as you can. For example, if you have a problem with exporting, then explain by describing how you are trying to export, and so on.
    - History: Is this going on long? Has anything been installed or deleted? - Are there error messages?
    - What steps have you tried already to solve the issue.
    - Anything unusual about your set up? Or how you use iPhoto?
    Anything else you can think of that might help someone understand the problem you have.

  • 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

  • Time line change with Movie Clip!

    Help, I want a movie clip to interact with another to change the scene.
    this is my code on the "Door":
    onClipEvent(enterframe) {
         if (_root.char.hitTest(this)) {
              _root.gotoAndStop("Game2", 1);
    Game2 is my next scene name.
    but it is not working!
    Why is that!
    the other movie clip's instance is "char":

    Take the code off of the object and place it in the main timeline, modifying it as shown...
    this.onEnterFrame = function(){
         if (char.hitTest(Door)) {   // replace "Door" with the instance name you gave it
               delete this.onEnterFrame;
               gotoAndStop("Game2", 1);

  • Playing any movie clip or youtube crashes computer, problem has only been happening for 6 months, what has been changed?

    running Windows XP 3 newish computer with lots of memory and hard drive space. Used to be fine, could play any clip or movie then suddenly about 6 months ago it started crashing when any movie clip played. I believe its an update in Firefox that caused the problem as it started happening after an UPDATE automatically loaded. Have been trying to resolve but noone I ask for help from responds including Mozilla.

    running Windows XP 3 newish computer with lots of memory and hard drive space. Used to be fine, could play any clip or movie then suddenly about 6 months ago it started crashing when any movie clip played. I believe its an update in Firefox that caused the problem as it started happening after an UPDATE automatically loaded. Have been trying to resolve but noone I ask for help from responds including Mozilla.

  • Trying to change text in a movie clip

    i'm trying to replace text in a dynamic text field within a movie clip, and it seems as if it's treating it like static text. Is there a way around this?
    theBtn1.addEventListener(MouseEvent.CLICK, adjustText1);
    theBtn2.addEventListener(MouseEvent.CLICK, adjustText2);
    function adjustText1(e:MouseEvent):void
        textField1.text = "Foo"; // this works
    function adjustText2(e:MouseEvent):void
        theMC.getChildByName("textField2").text = "Bar"; // this doesn't
    It throws this error:
    1119: Access of possibly undefined property text through a reference with static type flash.display:DisplayObject.

    You don't need to use the "getChildByName" function.
    Try:
    theMC.textField2.text = "Bar";

  • Movie clip needs to change alpha of another movie clip

    In frame 3 of my Flash animation, I make a graph animate
    using a mask. At the end of that animation I want a button in frame
    3 whose alpha is set to 0 to become visible so it can be clicked.
    So, within the movie clip of the graph, on the last frame I
    have:
    mc_temp.alpha = 1;
    stop();
    But I get an error stating "Access of an undefined property
    mc_temp"
    The button (set as a movie clip) is named "mc_temp". I don't
    understand why I can't call it directly from the timeline of a
    movie clip.

    because its not on the movieclip's timeline. if your graph
    movieclip is on the same timeline as mc_temp, try:
    MovieClip(this.parent).mc_temp

  • Making a button rollover change a movie clip's frame

    Hi again everyone,
    I knew how to do this in AS2 but now I am having problems
    with making a button on the stage goto a frame in a movie clip on
    the stage.
    I've attached a sample of my code below, hopefully you'll see
    the error and be able to point it out to me?
    I have a movie clip on the stage that has different
    information in different frames. I want to make it so that when
    someone rolls over the button, the movie clip fades in and goes to
    the correct frame to display the information.
    With this setup the way it is below, I keep getting "Warning:
    3590: void used where a Boolean value was expected. The expression
    will be type coerced to Boolean.
    I know where the problem is happening, "function
    XXX(event:MouseEvent):void {navigateToURL(XXXweb)}"
    How can I write this differently and eliminate this problem?
    Thanks,
    Jeremiah

    I'll give that a shot, thanks!
    A follow up question to that one, is there a way to make it
    so that I can have one rolled over function applied to several
    buttons / frames in the movie clip? This movie clip has 50+ frames
    in it and if I could reduce my coding, it would make life a lot
    easier.
    Thanks,
    Jeremiah

Maybe you are looking for