If two objects are the same resource in the library, how can I check it?

Seen as below in the code, I created two objects of an object in the library. When you click it, the trace says

object sample_mc for both. So, how can I check it in the code if several objects are of the same resource of the library...


var a1:MovieClip = new sample_mc();
var a2:MovieClip = new sample_mc();
var arr:Array = new Array();
addChild (a1);
addChild (a2);
A1.x = 50;
A1.y = 50;
A2.x = 150;
A2.y = 50;

A1.addEventListener (MouseEvent.Click, f_achil);
A2.addEventListener (MouseEvent.Click, f_achil);


function f_achil(event:MouseEvent):void {}
trace (Event.Target);
If (arr. Length < 2) {}
arr.push (Event.currentTarget) ;}
trace ("arr:" + arr);
{if(arr[0]==arr[1])}
trace ("OK") ;}
}

Yes! But there is a work around to get the class name using the getQualifiedClassName . Now you get success. under the rocks of code for you:

If (getQualifiedClassName (Object(arr[0])) == getQualifiedClassName (Object(arr[1])))
trace ("OK");

It will now compare with your class name at last. Cast object is optional.

Tags: Adobe Animate

Similar Questions

  • I lost all my Muse Widgets in the library, how can I get back them?

    I lost all my Muse Widgets in the library, how can I get back them?

    Wait, so you mean the real Widgets in the Widgets Panel?

    Not the library where you can store your own stuff (users also tend to call these widgets...)?

    Could you give the name of this widget that you have installed, which seems to have caused harm?

    I think the best solution is to go to the Adobe CC , this Panel application where you can manage all Adobe applications. Uninstall Museand re-install it.

  • Two objects with the same name

    Hi all

    In my production database, there is a materialized view and a table with the same name. The two objects have the same number and type of columns.

    Record from user_object table

    OBJECT_NAMESUBOBJECT_NAMEOBJECT_IDDATA_OBJECT_IDOBJECT_TYPECREATEDLAST_DDL_TIMETIMESTAMPSTATUSTEMPORARYGENERATEDSECONDARYNAMESPACEEDITION_NAME
    TEST_OBJ151373151373TABLE22/06/201222/06/20122012-06 - 22:15:39:30VALIDNNN1
    TEST_OBJ152287MATERIALIZED VIEW22/06/201208/03/20122012-06 - 22:16:08:46VALIDNNN19

    I have another mode to normal display, TEST_NORMAL_VIEW, which selects the data of TEST_OBJ.

    Then, on which table data select. Please give some input on this subject.

    Kind regards

    Matondo

    A materialized view has 2 objects internally for her

    1. the materialized view (it is more of a model)

    2. the table that stores the actual data.

    So when you create a materialized view, you can see 2 objects created by querying the USER_OBJECTS.

    See this

    SQL> create materialized view my_test_mv as select * from emp;
    
    Materialized view created.
    
    SQL> select object_type, object_name, data_object_id from user_objects where object_name = 'MY_TEST_MV';
    
    OBJECT_TYPE        OBJECT_NAME          DATA_OBJECT_ID
    ------------------- -------------------- --------------
    TABLE              MY_TEST_MV                  1638964
    MATERIALIZED VIEW  MY_TEST_MV
    

    Now, you may notice that DATA_OBJECT_ID has null for the MV. DATA_OBJECT_ID is the Segment where the data is stored. As MV object is just a model and does not have data to null.

    The user has no direct access to the MY_TEST_MV table. See this

    SQL> drop table my_test_mv;
    drop table my_test_mv
               *
    ERROR at line 1:
    ORA-12083: must use DROP MATERIALIZED VIEW to drop "KARTHICK"."MY_TEST_MV"
    

    Also, you can associate an existing table to a materialized using the clause ON TABLE PREDEFINED view.

    Here is an example

    SQL> drop materialized view my_test_mv;
    
    Materialized view dropped.
    
    SQL> create table my_test_mv_new as select * from emp;
    
    Table created.
    
    SQL> select object_type, object_name, data_object_id from user_objects where object_name = 'MY_TEST_MV_NEW';
    
    OBJECT_TYPE         OBJECT_NAME          DATA_OBJECT_ID
    ------------------- -------------------- --------------
    TABLE               MY_TEST_MV_NEW              1638967
    
    SQL> create materialized view my_test_mv_new on prebuilt table as select * from emp;
    
    Materialized view created.
    
    SQL> select object_type, object_name, data_object_id from user_objects where object_name = 'MY_TEST_MV_NEW';
    
    OBJECT_TYPE         OBJECT_NAME          DATA_OBJECT_ID
    ------------------- -------------------- --------------
    TABLE               MY_TEST_MV_NEW              1638967
    MATERIALIZED VIEW   MY_TEST_MV_NEW
    
    SQL>
    

    Once you associate a Table with a MV direct Table access is limited. You can directly access only the MV.

  • How I would compare if two indexes are the same?

    I like to compare if two indexes of two users are the same. Is it possible to to that. I need similer to query below:

    to select (2 * (select count (*) from (select * of XPKTBL_A CROSS, select * from XPKTBL_A)) - (select count (*) in XPKTBL_A) - (select count (*) in XPKTBL_A)) WHEN 0 THEN "Index are the same" ELSE 'Indices are different' END 'Result' from DUAL;

    UserA:

    create table TBL_A (FIELD_A1 number not null,

    FIELD_A2 varchar2 (50).

    Date of FIELD_A3,

    FIELD_A4 number (5.2) default 0,

    FIELD_A5 varchar2 (10) not null

    );

    create a unique index XPKTBL_A on TBL_A (FIELD_A1);

    UserB:

    create table TBL_A (FIELD_A1 number not null,

    FIELD_A2 varchar2 (20).

    FIELD_A4 number (5.2) not null,

    FIELD_A5 varchar2 (10),

    FIELD_A6 number (2) not null

    );

    create a unique index XPKTBL_A on TBL_A (FIELD_A1, FIELD_A6);

    Thanks for the reply Lalit and sorry for the late reply... I got my answer already.

  • How to find the data in two tables are the same?

    Hi people,

    Suppose we have table emp01, have 10 records and create another emp02 as table

    create the table emp02 in select * from emp01;

    now both the table has the same data.

    How to find a 'data' in the two tables are the same?

    Hello

    SELECT *
    FROM emp01
    MINUS
    SELECT *
    FROM emp02
    UNION
    SELECT *
    FROM emp02
    MINUS
    SELECT *
    FROM emp01
    

    You can also compare resultset hash to select * in emp01 and select * from emp02 by using dbms_sqlhash.

    Best regards
    Nikolai

  • How do I know if the two tables are the same in the data they contain

    Hello

    How will I know if the two tables are the same in the data they contain?

    Hello

    Please check this thread [compare all columns | http://forums.oracle.com/forums/thread.jspa?messageID=3166309�].

    Kind regards

  • How can I check for dates that are the same for today.

    If I have a bunch of dates in a datetime colum. How can I check for dates that are the same for today.
    "For example, this value of days would be ' #dateFormat (now (),"mm dd yyyy") #

    The best I could come up with was:

    Select * from data where data.userID =
    2635 AND
    "Convert (varchar, dateAdded, 101) = ' #dateFormat (now (),"mm dd yyyy") #


    How can I get this to work smart peeople :)

    It is best to make the comparison on the datetime values. One technique is to get the current date at midnight. Then add one day to get tomorrow's date. In your sql query finds all values is greater than or equal to today and less than tomorrow.

    One solution is to do everything in MS SQL

    WHERE the dateAdded > = convert (datetime, convert (varchar, getdate(), 112), 112)
    AND dateAdded = dateAdd (d, 1, convert (datetime, convert (varchar, getdate(), 112), 112))

    Another option could be to use CF to calculate dates:


    WHERE the dateAdded > =.
    AND dateAdded<>

  • Another computer has the same IP address as mine, how can I change this?

    Another computer has the same IP address as mine, how can I change this?

    Original title: IP address

    Hi John,.

    Please go to the Microsoft Community Forum.

    IP (Internet Protocol) address for the other two computer cannot be the same.

    Internet Protocol (IP) addresses are unique numeric identifiers that are required for each device that connects to the Internet. Them are a common shared resource that must be managed carefully in order to ensure the continued growth and stability of the Internet. Most of the Internet is currently treated with IP version 4 (IPv4) addresses. IPv6 addresses are also in use, but not yet to the same extent. IPv6 is a newer protocol, offering a much larger than IPv4 address pool

    However, you can try to reset TCP/IP on your computer.

    Check out the link provided and check if the problem persists.

    How to reset the Protocol Internet (TCP/IP)

    Keep us updated on the status of the issue.

    In the case where you face problems more when working with Windows keep us updated on the Community Forum Microsoft.

  • Add a child to an object in the library?

    If I have a video clip in the library, how I use addChild() to bring to the stage?

    Should there be one on a previous frame before hand? If so it would make sense, because then I could give it an instance name. But is it possible to call to him, without putting it on the stage and in him giving an instance name?

    Normally, when I see used addChild() a form is created directly in actionscript, where the form, color, position, and scale are defined and then addChild is used at the end of the to put on the stage.   But I don't know how to do this with an object already in the library.

    I tried setting export for Actionscript in the symbol settings with as link name Place, but I get this error:

    Error 1067: Implicit coercion of a value of type class to a type unrelated to flash.display:DisplayObject

    If I don't get the previous error, I get this one:

    Error 1046: Type was not found or was not a compilation constant

    He alternates errors.

    My code on frame 1:

    place: place of var = new square();

    addChild (square);

    First, rename the name of link or 'Square' class names should be starting with capital letters so that they can be differentiated eassily in code.  Then change the code to be...

    place: place of var = new Square();

    addChild (square);

    part of the problem you had, is that you try to name a variable of the same name as the class name.  That will produce an error

  • How can I return a normal dynamic object from the library (cloud symbol) to a smart object

    I only change my dynamic in Illustrator (via double klick) object when it is not in the library.

    Unfortunately, I did not know that from the beginning and now I have a few documents where all the objects are in the library and can't do em to open in Illustrator.

    When you paste from Illustrator into Photoshop, you can choose how to paste, but there is also a checkbox "add to my current library.

    Maybe this has been verified.

    But you can always change them when you open the library in Illustrator and double-click on it.

  • The effects of top 3 (flame, frame photo and tree) are grayed out in photoshop CC2015. How can I activate them?  Thank you!

    The effects of top 3 (flame, frame photo and tree) are grayed out in photoshop CC2015. How can I activate them?

    Well, I have a full card on my Mac, I do not have access to the 3D features, so I mounted make flame, frame and tree on my Windows 7 Dell.

    First created a new empty file, then 3D > new mesh layer > 3D postcard workspace if requested.

    Then I went to the filter > make > Frame and try the command again. Frame, fire and trees is active and is more gray.

    Then on the Dell, I went into Photoshop preferences > sync and transferred all settings.  (you can install Photoshop on both machines)

    On my Mac, I went into Preferences > settings sync and uploaded everything and rendering filters have been activated on the Mac and they work well.

    The point is that you should be able to activate the filters of rendering on your Mac. Otherwise install Photoshop CC 2015 2015 on a second computer, activate the filters it and sync the two as explained above.

  • my user name and password are saved on my webmail site. How can I remove them so they don't pop up when I go on the site?

    my user name and password are saved on my webmail site. How can I remove them so they don't pop up when I go on the site? I use cox.net webmail. Cox tell me it's a firefox issue. So, here I am. Can you help me?

    Hey, Julien

    Go to Tools-> options and on the Security tab click on passwords saved. This will give you a list of sites that you have saved a password. Just found your site and delete this entry.

    There are a lot of useful information in this article on the Firefox Password Manager. He should answer any other questions you might have.

    You can also delete cookies from this site in order to make the site you not forget if you have created a remember me cookie.

    • Tools > Options > privacy > Cookies: "show the Cookies".

    Hope this helps!

  • How can I check if the Satellite Pro A300-1 GR drivers are up to date

    Hello!
    How can I check easily at any time if the drivers of my Satellite Pro A300 - GR 1 are updated? I already thank you for your support.

    Hello

    On the Toshiba driver European page you will always find the number pilot s versions and you can compare it with the s version of the driver installed on your laptop.

    In addition the [Toshiba Tempro | http://eu.computers.toshiba-europe.com/innovation/generic/TEMPO_RELEASE/] application keep you abreast of software updates and the latest Toshiba driver as soon as they come out on the European driver Toshiba page.

    But just a hint; If your laptop works without problem, then I would not change anything in the operating system. I'm always that notice; never change a running system ;)

    Good bye

  • Windows Media player on my machine does not run some AVI files. How can I check what the problem with AVI files. Files are running in other utilities of free ware

    Windows Media player on my machine does not run some AVI files. How can I check what the problem with AVI files. Files are running in other utilities free ware. Also, windows Explorer does not display dimension and other video related information for the file. Y at - it a tool that can indicate what exactly is the problem with the file.

    Ritu

    Hello

    1. you get any error message?

    2. don't you make changes to the computer before the show?

    Please follow the steps from the link below.

    http://support.Microsoft.com/kb/279242

  • How can I check to see if my system and components are compatible with VISTA, given that the counsel is no longer available and my office will take too many changes to make it compatible with WIN 7?

    I am running WINDOWS XP on my desktop and would like it ungrade to WINDOWS VISTA, but I don't know if all my devices are compatible with WINDOWS VISTA! I would like to upgrade my desktop computer for WIN 7, but it would take too many changes, so I'm going to update my laptop for WIN 7 and I have another laptop running WIN XP! So basically I want to have at least one of the three operating systems (XP, VISTA and WIN 7) on my different computers! WIN XP on my laptop older, WINDOWS VISTA on my desktop (currently in XP) and WINDOWS 7 on my laptop latest (running VISTA)! I just want to know how to find out if there is a way to see if all my components on my desktop are compatible with WINDOWS VISTA, but the Advisor WINDOWS VISTA is no longer available? I used the WIN 7 Advisor to check what is required for me to upgrade my desktop PC to WIN 7 but there are too many changes that need to be done! I also used the WIN 7 Advisor on my new laptop and it has only a few changes that need to be done and that is why I want to upgrade my laptop to WINDOWS 7 and my desktop for WINDOWS Vista!

    Hello

    I already gave you advice available to upgrade to Vista in your other thread earlier in this forum

    http://answers.Microsoft.com/en-us/Windows/Forum/windows_vista-windows_install/how-can-i-check-to-see-if-my-system-and-components/7e626228-5572-E011-8dfc-68b599b31bf5

    You should check with the manufacturers of hardware and program

    and use the Vista Compatibility Center

    http://www.Microsoft.com/Windows/compatibility/Windows-Vista/

    and read the vista system requirements

    http://Windows.Microsoft.com/en-us/Windows-Vista/products/system-requirements

Maybe you are looking for

  • No sound on E7100S

    I have just completed an installation of W2k on an old Toshiba E7100s machine We use 2000 due to compatibility problems with some old software werun. Everything works fine except that I have no sound. In the Device Manager I have athe device is disab

  • system recovery

    I preformed a system recovery, a few days ago and after that he did all the updates for the computer the computer restarted as it was supposed to, but the message 'we could not finish the updates by undoing the changes' come and now my computer 9 stu

  • my computer has been out sporadically, the monitor only has no signal and goes to sleep

    I have a PC who recently acted squirrels.  It start partially, completely, or run for hours and then stop.  Once it turns off it won't do it again.  If I unplug it I try to run the next day and it worked but only for limited periods.

  • Wireless driver for Pavilion dv6

    I recently reformatted my computer laptop and then install new drivers from the HP website, I can't seem to get the driver for the wireless card to install correctly. I tried each one listed. I'm on Windows 7 Ultimate (64 bit), and these are the "net

  • Problem I have TO solve with the query: PREV calculation to the current record

    Hi allMy version of db:Oracle Database 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit ProductionI have the problem to solve with a request (MUST BE a SELECT statement), but I do not understand how... I tried with the analytical function but... n