in the 2.0 class objects - how to swap the depths of a clip

How do put you an object up? If it's just a clip, I could do a swapdepths, but if it's a clip which is part of an object YOU 2.0, how to exchange the depths of the entire object?

I create 2 objects (same class) each with a movieclip in their breast. The clip is created on a single level with getNextHighestDepth().

I have a button that tries to swapDepths of 2 objects, but I can't make it work. Can anyone help?


Here are the details:

1. create a symbol in the library called "someShape_mc" and put a form in it - a circle, a square, either - this symbol is exported for action script and received a class AS "ClassObject" 2.0 (I also put a dynamic text in the form field to display the current depth - it is called "depth_txt")

2. create a button called 'swap_btn' on the stage.

Frame 1 to the following actionscript code:

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 just the objects:
BottomObject.__LocalMovieClip.swapDepths (topObject.__LocalMovieClip);

Try it with the object as a movieclip
BottomObject.swapDepths (topObject);
trace ("he Swap?");

Try it with a method in the class...
BottomObject.swapIt (topObject.__LocalMovieClip);
BottomObject.swapIt (topObject);
trace ("nope... no permutation in progress...");
}

================================

Here is the AS file: 'ClassObject.as. '

ClassObject class 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 ("a form to" + __Depth);

__LocalMovieClip._x = x;
__LocalMovieClip._y = y;
__LocalMovieClip.depth_txt. Text = __Depth;

}

public void swapIt (targetMc) {}
__LocalMovieClip.swapDepths (targetMc);
__LocalMovieClip.depth_txt. Text = __LocalMovieClip.getDepth (); no difference.
trace ("tried to Exchange class...");
}
}


========================
So - the goal is to be 'down' class on the top of the object of 'top '. Button tries various methods of Exchange from the depths of clips – but it is not one that works. What Miss me?

TIA
Ferd

aHA! I got it! Thank you very much - I am not you! good eye!

Tags: Adobe Animate

Similar Questions

  • Change in the depths of video clips with button click

    Hi all

    I have a file work on that has 4 different video clips on a layer which, when clicked, will zoom in (made with the Tween span in the timeline panel).

    The question I have, is that when I click on one of them, they are arranged in a way that does not work for what I need. I click on one and it works, but it is hidden by the clip that is above in the hierarchy. Click on another, zooms, but is partially hidden by another.

    My question is: is he still in AS2 to code these so that when it is clicked on, it will be the first place of the heriarchy? While I can encode all like that so that whenever a user clicks on, it goes to the top, so it is not hidden?

    Thank you

    You can also use a number.  for example:

    {mc.onRelease = function ()}

    this.swapDepths (this._parent.getNextHighestDepth ());

    }

  • Attention impossible to bind to property 'somevar' on the 'Object' class object is not an IEventDispatcher?'

    Hi all

    How to fix under WARNING:

    Attention impossible to bind to property 'somevar' on the 'Object' class object is not an IEventDispatcher

    Thank you

    Sunil Rana

    Hi Paul,.

    I found the solution on the net & here's news

    Cast the data in your itemrenderer as an objectProxy.

    itemRender.mxml

    http://www.Adobe.com/2006/mxml '.

    verticalScrollPolicy = "off".

    horizontalScrollPolicy = "off".

    creationComplete = "init (); » >

    Import mx.utils.ObjectProxy;

    [Bindable]
    public var dataProxy:ObjectProxy;

    private function init (): void {}
    dataProxy = new ObjectProxy (data);
    }
    ]]>
        

    Thank you

    Sunil Rana

  • I teach online and all my classes have the same user name and password. Now that I clicked "remember me next time", I can connect only in one class. How to unlock my password. Carol in English

    I teach online and all my classes have the same user name and password. Now that I clicked "remember me next time", I can connect only in ONE class. How to unlock my login and my password, so that I can use it for all classes. Carol in English

    "Remember Me" for the site connections automatically when you return to the Web site is done with a Cookie the site in Firefox.

    Try to clear your Cookies for this Web site.

    Tools > Options-> life privacy - Cookies = the button show Cookies.

    You must use the custom settings for history at the top of this tab to see the View the Cookies button.

    Enter the domain name in the top search bar and all Cookies for this URL will be displayed. Unless you can figure out which is Cookie to "remember me", you will need to delete them all.

    Hold the {Ctrl} key while you click each Cookie in the small window. When this list is all highlighted, click the Cookie delete button at the bottom left.
    When you are finished click Close.

  • ActiveX in BradySoft (CodeSoft) - what method/class/object I would use to send data to the form variable to BradySoft?

    Can what method/class/object I use to send data to the form variable to BradySoft? I have a basic configuration of BradySoft label and I want to send it data of variable shape (a serial number) from Labview ActiveX. I joined guide Brady ActiveX programmers, but can't understand what to use for that.

    P.S. I would call Brady or TekLynx tech support on this issue, but they have a strict policy while BradySoft supports ActiveX, but does not provide technical support assistance programming with it. I thought I would try the Forums OR.

    Just an update. I could get this to work myself after a few days of playing with it (I suppose that the best way to learn!). I have attached a sample VI for anyone interested. Can we Kudo ourselves?

  • XML class object.

    Hello.
    I want to create DataGrid with itemReneder for each column.

    It is generated inline itemRenderer:
    DataGridColumn.itemRenderer = new ClassFactory (MyCustomClass);
    MyCustomClass - it manually generated class that contains some form elements (TextInput, Combox... e.t.c.)

    I want to consturct ItemRenderer dynamics. For this I need to create the class object and send it to itemRenderer:
    var component: DynamicFormClass = new DynamicFormClass();
    var newComponent: Class = component.someMethodWhichWillCreateForm (configData); -This request will display the elements of class that will generate the form that describes in configData
    DatagridColumn.itemRenderer = new ClassFactory (newComponent);

    This code is how I see the solvetion of this problem, but it does not work.
    I don't really know how it create answers how and will be very grateful for any decision.
    Thank you.


    Amy Blankenship Merci for the answer, this is not what I need. I found the answer on this question: is the substitution DataGrid ItemRenderer set, method.

  • El index sell me behind del web object, how I can visualizarlo siempre al frente?

    El index sell me behind del web object, how I can visualizarlo siempre al frente?

    Estoy insertando a web site object, en una diapositiva of Captivate. Compruebo, el index desplegable cuando, me object sale beneath del web. Esto supone Québec no se ve!

    In las demas slides esta al frente, pero con los objetos web no..

    All web objects are always on the top of the order of the stack.

  • Apple "final cut pro 7", high res Pro 422lt 1920 x 1080 (odd) clips, is this gradual?, no 1080 progressive setting sequence, how can I ensure that I have the best setting of the timeline for my clips

    Apple "final cut pro 7", high res Pro 422lt 1920 x 1080 (odd) clips, is this gradual?, no sequence definition 1080 progressive

    How can I make sure that I have the best setting of the timeline for my clips. I did all the settings of Mount clips but there is no progressive setting for 1080 p. Images originally dslr Nikon that I used mpeg streamclip to convert to prores. Thanks for your help!

    The frame for you size source of material is HDTV 1080i (16:9). That only sets the size of the image, not the domination of the field, it's what makes progressive or interlaced. The reason it's labels with the 'i' is that when FCP7 was abandoned by Apple, they have never updated the software in order to take account of 1080 p contents.

    To make your progressive sequence, set the dominant field to None.

    gerforce wrote:

    Images originally dslr Nikon that I used mpeg streamclip to convert to prores.

    In your screenshot of the properties of the element for your clip to the source, the material is interlaced. At the original camera file interlaced or progressive?

    Also, the fps footage was actually 30 original and 29.97 not standard?  30 images/s is very limited its use.

    MtD

  • How can we do a single element with the content of two clips

    How can we do a single element with the content of two clips

    You try to get a picture of image? In other words, that contained two visible clips at the same time? If you are, change the substantive item to you main plot and another tie on top using an edit connect to the battery. Select the top item. Activate the transform tool and resize and reposition the clamp if necessary.

    Russ

  • How to increase the duration of each clip in movie maker?

    How to increase the duration of each clip in movie maker?

    Windows Movie Maker or Windows LIVE Movie Maker?

    Which one?

    For Windows Live Movie Maker...

    Open WLMM > toolbar, click Edit > duration, click pointer to change the number of duration.

    For Windows Movie Maker, which I don't have (I use win 7 with WLMM)...

    Open WMM > tools > Options > advanced > default duration > duration photo...

  • How to swap the C90 of TC 7.0.2 to cmterm 7.0.2

    Hi all

    We want to register the C90 to 8.6 CUCM, so we downloaded the cmterm - s52000tc7_0_2.cop of cisco.com.

    One knows how to swap the codec C90 version of TC to the CUCM cmterm?

    Best regards

    Ben LAi

    Hi Ben

    cmterm-s52000tc_7_0_2 is just the software image that can be used when the upgrade version of CUCM.

    You can register you C90 with TC 7.0.2 version on it.

    create the device on unit C90 CUCM profile and set it to DN.

    SIP endpoint to configure:

    xConfiguration SIP URI 1 profile: "directorynumber (8001 whatever you assign in CUCM) @10.121.74.121.
    xConfiguration SIP DefaultTransport 1 profile: TCP
    * c xConfiguration SIP profile 1 TlsVerify: Off
    * c xConfiguration SIP profile Type 1: Cisco
    * c xConfiguration SIP profile 1 outgoing: Off
    * c xConfiguration SIP profile 1 Proxy Discovery 1: manual
    * c xConfiguration SIP Proxy 1 profile address 1: address IP of CUCM.

    It should work correctly.

  • How can I change the depth of the queue with powercli 5.5?

    Hello

    I want to put the queue on my 5.5 ESXi Deth, can anyone help me?

    After I try:

    PowerCli 4.1 connect to ESXi 5.5 = OK with this transaction: Set-VMHostModule-Options "ql2xmaxqdepth = 32.

    5.5 PowerCli connect to ESXi 5.5 = error with: Set-VMHostModule-Options "ql2xmaxqdepth = 32.

    How can I change the depth of the queue of my QLogic card?

    Thank you

    Philippe

    Try to use the Get-EsxCli interface, see 3 Re: length of the queue  

  • How do I change the duration of a clip of legends

    I have a clip of legends that starts at the 00:00:41:00 code (or 41 seconds). This is where my first legend appears. The overall time of the element ends when the audio and video clips end about 32 minutes. How extend the length of the file at the beginning then it starts to 00:00:00:00 of time code, give me space to add a new front legend of 41 seconds. I tried to change the time of the first legend, but it doesn't seem to work, I don't seem to be able to just drag the clip to start earlier. If move the clip, I put all my legends out of sequence.

    I thought I'd work with legends would have been much easier, it seems a problematic area. I also can't seem to be able to cut parts of the video and have trim first pro subtitles file keep my captions synchronized entries. If I cut the video, the legends time remain unchanged and is now out of sync.

    What I am doing wrong, what makes this process so tedious and difficult?

    Try it out - create a new native captioning CEA - 608, have the legend display the desired time, then place the caption in the order that you want to start displaying the legend.

  • How can I change the depth of Extrusion units?

    In the tutorial I'm following - and indeed many similar tutorials - I hit a wall when it comes to the "new 3D Extrusion of Selected Path," because where I'm supposed to change the depth of Extrusion to some nice number round like 50 or 30 or 20, no unit of measure specified or photo in the screenshots. In practice, however, I can get Photoshop to show me depth of Extrusion in inches or Pixels, depending on how I put my rules before Extrusion, and none who will give me something like '50' or '30 '. What Miss me?

    You can change the depth of Extrusion units in the section contact information of the properties panel.

  • How can I request correction of the color of a clip to multiple clips?

    Hey everybody,

    I have come to discover that I would like to request correction of the color of a clip to the multiple without clicking, the glide and punching in each frame by the clip. Does anyone know how? It would be a total time saver! Thanks in advance.

    Mike Diaz

    Select the item that has effects.

    right mouse button, click on "copy".

    Highlight all the other videos.

    right mouse button, click on 'Paste attributes' and Voila!

Maybe you are looking for

  • do I need to do? I do not use firefox.

    I installed the update that has been suggested to me by Windows Update. I also need to perform the steps in this article? I do not use firefox. I have only IE8. http://support.Microsoft.com/kb/963707 for those who want the truth revealed that open th

  • "Sent items" icon disappears

    I am posting this for my sister who is not gifted in computer science.  She uses Outlook Express, but is unable to tell me the version of Windows and Outllok Express, she uses.  My guess is she's using Win XP. His '' elements of Snet '' disappeared f

  • the HP bios password recovery

    Help, please. Need password generated for a hp mini 1030nr. After the failure of 3 attempts fatal error code as cnu9091fmj appears.

  • Impossible to access my e-mail address, either by BT, or Windows Mail, have chosen a new password but still no luck

    Have changed my log in details on BT to try to access my Yahoo and Windows mail, but can still access my mail.  Keeps put the connection box and when I enter the password, it says incorrect.  Driving me crazy.

  • consolidation of records of large files

    I had to do a data recovery, and now I have two copies of the same file.  Due to the accident, they are different.  We're 252GB with 68 subfolders, the other is 77GB with 440 subfolders.  To save space, I would like to consolidate, with the goal of e