Check if it is a specific object

Hello!

I need to check if the event with a click: event.target is a specific object of a class, for example:

if (event.target == com.foo.Bar)

But it does not work. In the Inspector of my debugger I see this:

target = com.foo.Bar (@8dcdae1)

How can I check if the object (event.target) comes from a special class (com.foo.Bar)?

Best regards.

You write "is not" logic like this:

If (!) (Event.Target) is Bar))

Gordon Smith

Adobe Flex SDK team

Tags: Flex

Similar Questions

  • By clicking on a specific object in a picture

    Hello

    So I am currently working on a piece of code where I have 12 points (clips) on stage, gradually increasing their contact information. I want it so when you click on one, it moves its coordinate is back to zero. That's what I have so far:

    for (i = 0; i < 13; i ++) {}

    cArray [i] .addEventListener (MouseEvent.CLICK, blockEnemy);

    }

    function blockEnemy (e: MouseEvent): void {}

    for (i = 0; i < 13; i ++) {}

    trace ("eh...") It was surprisingly easy");

    trace (e.target.name);

    cArray [i] = 0 there;

    }

    }

    This is the function only, the rest of my code works very well. I'm not sure on how to move the specific object that was clicked back to zero. When the code runs like this, it moves all the table back to zero, and I understand why it does this, but don't know how to fix it.

    Any help is appreciated, thanks! ^-^

    * I should also mention that there is only a movieclip in the table.

    You said there were 12 video clips, then you said there was only a single movieclip. Do you mean that there are 12 copies of the same movieclip? Not that this affects the problem, I was wondering.

    I think you can do what you want simply to this:

    for (i = 0; i< 13;="" i++)="">

    cArray [i] .addEventListener (MouseEvent.CLICK, blockEnemy);

    }

    function blockEnemy (e: MouseEvent): void {}

    e.Target.y = 0

    }

  • Flash CC: access a specific object on the stage

    I'm writing the javaScript code to execute with Flash CC.

    How can I access a specific object on the stage? It has a name (square_sym), but I can not read the code. What should I do?

    TIA

    He needs an instance name.

    If there is not a button or a movieclip, right click on the object > click on convert to symbol > select movieclip > ok > in the properties panel, enter an instance name, for example square_mc.

    then on the timeline that contains the button or movieclip you can use:

    This.square_mc to reference the movieclip.  other chronologies, there are also pointers to reference the movieclip

  • How to remove blocks of stamps for a specific object cache

    Hello world

    is it possible to remove the blocks that belogns to a specific object (a table for ex) of the buffer cache.

    as you know, there is
    alter system flush buffer_cache;
    command, but it does a job for all to buffer cache. If you ask me why I want to than this, for reasons of tuning. I want to test some plsql codes when they are run as if they are running for the first time (reading the disc).

    PS: I use oracle 11g r2

    Melody to reduce I/O logic.

    That's all you need. Your willingness to 'scenario' will NEVER materialize in real time conditions, unless you resize the buffer cache to something really small, forcing them to always make each statement of physical i/o.

    This is how Oracle works. Design a database that is more suited to your taste, or learn to live with it.

    ---------
    Sybrand Bakker
    Senior Oracle DBA

  • Determine whether the instance of the object is of a specific object class.

    I was not able to find the answer in the documentation or in the forum. My terminology is perhaps a bit off (Java and c# background back to PL/SQL programming).

    The general question is: given an object instance how to determine if the type of the instance is of the same kind as a specific object class.

    In particular, I do a unit test and examine the returned object instance. The effective yield is described as follows

    -This data structure contains a pointer to an LDAP session
    SESSION OF SUBTYPE IS RAW (32);

    I expect an instance of DBMS_LDAP. SESSION. To confirm this, I propose that the returned pointer DEREF and see if it's a type of DBMS_LDAP. SESSION. When this is confirmed, then I can further the return of reference.

    Draft code is

    BEGIN
    IF DEREF ({RETURN$}) some_operator_which_compares_object_types DBMS_LDAP. SESSION
    THEN
    RETURN TRUE;
    ON THE OTHER
    RETURN FALSE;
    END IF;
    END;

    where some_operator_which_compares_object_types is what I need to know.

    Thank you for your help. And of course, the other way to do business and/or links to the correct location in the documentation are appreciated.

    Kind regards
    Bill

    I think you are looking for [IS OF | http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/conditions014.htm] condition.

    SQL> create or replace type mytype as object(a number);
      2  /
    
    Tipo creato.
    
    SQL> declare
      2  x mytype := mytype(1);
      3  begin
      4  if x is of (mytype)  then
      5  dbms_output.put_line('OK');
      6  end if;
      7  end;
      8  /
    OK
    
    Procedura PL/SQL completata correttamente.
    

    Max
    [My Italian blog Oracle | http://oracleitalia.wordpress.com/2009/12/29/estrarre-i-dati-in-formato-xml-da-sql/]

  • Find the angle of rotation of the anchored object, replace that specific object by letter

    I got indd file customer. General problem is that he described certain letters of the words.

    In fact, he described the letter e and that it rotates 180 °. It also makes with the letter c and there a rotation that anchored-178, 8250 ° oppose.

    Now, I tried to change this objects to the real letters. Problem is that I can't find the option for the rotation of an object in the Find/Replace dialog box, and also I can't fint in Grep. So, what are my options?

    Thanks in advance...

    PS. If there is a possibility to change one of them, I can change a second with finding anchored object and change it to specific letter...

    Looks like someone could not find the real schwa or o open on their keyboards

    Possible, but tricky.

    This Javascript will search history containing the text for items cursor which rotated 180 degrees and replace them with a question mark. Replace the question mark with the character really wanted in notation Unicode Javascript ("\u... ("-here character four-digit hexadecimal code).

    It really isn't a good way to check if it really is one that you should be replacing, so it does not blindly on all 180 degrees of rotation objects...

    (You can simply change the "180" to your another number to check the other characters).

    all_text = app.selection[0].parentStory;
    
    for (thingy=all_text.allPageItems.length-1; thingy>=0; thingy--)
    {
         alert (all_text.allPageItems[thingy].rotationAngle);
         if (all_text.allPageItems[thingy].rotationAngle == 180)
         {
              all_text.characters[all_text.allPageItems[thingy].parent.index].contents = "?";
         }
    }
    
  • Specific objective Lightroom Presets

    Can't seem to solve this problem of Lightroom since I use my new camera, a Sony A7ii. I used it with a native lens from Sony (a 24-70 f.4 FE) and a variety of lenses vintage (with adapters).

    That is the problem. After having played with and award of the basic presets for the camera/FE 24-70, the presets combo of same - as well as lens corrections - are applied to all photos, including those taken with other lenses. I tried to reverse this problem by removing the lens corrections and assign a new preset - thinking this would remove the lens corrections for all photos taken with the objectives other than the 24-70 FE. No luck. This made out lens correction presets on all future imports, including those taken with the EF 24-70.

    So what I am doing wrong? I know that in pre-selected preferences, there are options of specific camera and ISO specific presets. But what about the specific glasses?

    The default value of the profile of lens for lenses with adapter (not recognized) is how to associate the Sony lens profile you use (FE 24-70mm).

    Try this:

    (1) select a raw image file shot with that of the adapter mounted lenses and click on the "Reset" button at the bottom of the Panel parameters develop.

    (2) in the Panel next to "Setup" lens Corrections, click the two-headed arrow and select "Reset Lens default profile." 'Make' should now be set to "None" and "Setup" the value "Default".

    3) go to the menu develop > set default settings > click "Update to current settings".

    This should prevent a profile of lenses apply to unrecognized adapter lenses and your goal (s) Sony will be the profile of lens with your settings 'by default'. You can change the default settings of 100 of distortion and vignetting 100 for each objective independently with unique values.

  • Align a specific object in a group to a key object

    Hello

    I have two objects in a group as yellow and green box. I want to align this group box specifically yellow to a black box as a key object as shown in the second screenshot below. Advice and assistance is greatly appreciated. Thank you.

    penang_marathon2.jpg

    David,

    What about cheating and creating a transparent consideration or nostroke/nofill than green and add it to the group so that the yellow we'll be in the middle or Center, so it can just be aligned as if it was by itself (depending on the alignment, of course)?

    Or by aligning the yellow to black and then drag the green above him, smart guides are your friends, and the group then subsequently?

    Apart from this, it is difficult to see what alignment you are after.

  • Check the memory ballooning in specific cluster

    Hello

    Anyone can modify the script to extract the ball from memory on a specific cluster and create a report to csv format.

    $myCol = @)

    foreach ($vm in (Get-View - ViewType VirtualMachine |)) Where-Object '

    {$_. (({Summary.QuickStats.BalloonedMemory - only '0'})) {}

    $Details = "" | Select-Object VM, '

    SwappedMemory, BalloonedMemory

    $Details.VM = $vm. Name

    $Details.SwappedMemory = $vm. Summary.QuickStats.SwappedMemory

    $Details.BalloonedMemory = $vm. Summary.QuickStats.BalloonedMemory

    $myCol += $Details

    }

    $myCol

    It is a way to do this

    $myCol = @()
    
    $clusterName = "MyCluster"$cluster = Get-Cluster -Name $clusterName$vms = Get-View -Id (Get-View -Id $cluster.ExtensionData.Host | %{$_.VM})
    
    foreach($vm in $vms | Where-Object {$_.Summary.QuickStats.BalloonedMemory -ne "0"}){  $Details = "" | Select-Object VM, `  SwappedMemory ,BalloonedMemory
    
      $Details.VM = $vm.Name  $Details.SwappedMemory = $vm.Summary.QuickStats.SwappedMemory  $Details.BalloonedMemory = $vm.Summary.QuickStats.BalloonedMemory
    
      $myCol += $Details}$myCol | Export-Csv report.csv -NoTypeInformation -UseCulture
    
  • Check if a variable type is Object [] and only Object []!

    Hi all!

    Maybe that's a newbee question but a similar situation never happened to me before!

    I have a method that accepts an object [] parameter.
    But the peculiarity of the method, it's that I need to check if the type of the given parameter actually is Object [] only !

    Say that any other type of table must return false after checking... as a String [], [number] or something else...

    For what I know "* instanceof Object [] * ' always returns true , because all classified inheredit of the object (except the table of primitives, which actually cannot be passed as an argument here).
    So, how do I get false if the type of the given parameter is not exactly "* Object []?"

    Patcha wrote:
    (What is it?)

    A sound that I would express when I'm confronted with a question, I have not yet met before :) The lack of verbal contact, I am trying to communicate through the written word. Wrong, I might add.
    >

    private String method(Object[] o) {
         return o.getClass().getSimpleName();
    }
    
    System.out.println(method(new String[]));
    

    This would mean 'Object []' or 'String [] '? I'm not sure.

    Yes. But it was my first crack at it until I realized the best solution.
    >

    or check the class itself of course.

    array.getClass () .equals (Object [] .class); >
    This seems more comfrotable... I should test.

    I did, it works ;)

    But in fact, maybe I'll use another approach to logic in the mothod (which is not the one I posted as an example).
    So perhaps I should not more control of the object [].

    Excellent, if you can avoid having to carry out inspections of type I would certainly go for it.

  • How to check the values of the view object?

    Hi all

    I created a new object view by right-clicking my module of the application. Now when I try to retrieve values

    the attributes of the view object, I get null pointer exception. How can I check if the view has

    some values inside or not manually by using the select statement? I'm trying to find the view in my database to the database browser

    but he was not there. Kindly help me out in the present.

    Thank you
    Flavian.

    Published by: 887737 on October 19, 2011 12:53 AM

    Hello
    Make a right click on the application module (yourAM in the model project) and press Run, then you can check if your ViewObject works or not.
    Note:
    Typically create viewObject using based EO or query based how did you create viewObject
    See:

    http://download.Oracle.com/otn_hosted_doc/JDeveloper/1012/BC4J/intro/bc_avo.html
    http://www.adftips.com/2010/09/ADF-Model-creating-view-object-vo.html

  • Size of the specific object

    Hello everyone,

    Is it possible to create objects that are specific size, as you can do in Illustrator? I'm sure it's something obvious, but I can't remember what it is.

    All the shape tools are similar in the parameters with the exception of line and polygon tools. Simply click on the drop down arrow next to the little star (blob icon)

    in the toolbar options to access the options of geometry.

    MTSTUNER

  • Sound for incoming emails with the text of the specific object?

    I want emails coming to make an alert sound and some can't. I know that I can give senders the VIP list and have the phone makes a sound when their emails is available, but I want to base this decision on a specific string in the subject/body of the email, don't not from which it comes. Is this possible with iOS?

    NO.

  • JavaScript in a PDF file that checks the value of a specific field and then make the right calculation.

    Hi guys!

    Sorry for my English is not my mother tongue.

    This is my first time writing here, I just discover the great possibilities of Javascript in PDF files and I'm very excited about it!

    I have no experience with Javascript, that's what I would do:

    Basically, I need to calculate how many litres of gas is needed to do a specific job in agriculture.

    I have a table that looks like this:

    Seed: 120 litres/Km

    Weeding: 20 litres/Km

    Fertilize: 140 litres/Km

    I have 3 fields in the pdf file: OPERATION / KM / NECESSARYGASOLINE

    I need something like this:

    Seed = 120;

    Weed = 20;

    Fertilize = 140;

    IF the OPERATION is 'Seeds' then NECESSARYGASOLINE = 120 * KM;

    OTHERWISE, if the OPERATION is 'Weed' then NECESSARYGASOLINE = 20 * KM;

    OTHERWISE, if the OPERATION is "Fertilizer" then NECESSARYGASOLINE = 140 * KM;

    Is it possible to translate it in Javascript?

    Thank you very much for the help! It would be really wonderful!

    Yes, it is possible. Use the following syntax:

    If (organic == 'Yes' & culture == "Wheat")

  • Creating a table of specific objects

    Hello

    Take a look at the following example...

    Class shape

    {

    box: box private var;

    }

    Now what I want is, be the subject of the box of type ArrayCollection collection, in a way, so that the person using the class Shape would be limited to provide the value of the class, in the form of collection ArrayCollection of objects only box type.

    How should I do?

    I do not know if I understood the question, but the ArrayElementType metadata tag can be useful.

    [ArrayElementType("Box")]public var boxes:Array;
    

    http://livedocs.Adobe.com/Flex/3/HTML/Help.HTML?content=metadata_3.html

    Let me know if that helps...

    Ben Edwards

Maybe you are looking for