problem with adding, click on picture - using the event...

I don't know where I did wrong, try to see if you find any mistake in the following code

The class unit extends Image

{

}

private var _team2:Array;

public void addTeam2(...units):void //addTeam2 gets 1 setting unit
{
for (var i: int = 0; i < units.length; i ++)

{

_team2.push (Units [i]);

_team2 [i] .addEventListener (MouseEvent.Click, selectFromTeam2);

}

}

private void selectFromTeam2(e:MouseEvent):void

{

Alert.Show (_team2 [i]. ToString() + "," + e.Target.ToString ());

}

This is the message I get from the alert:

Main0.mainCanvas.Canvas59.Unit43, Main0.mainCanvas.Canvas59.Unit43.FlexLoader44

What I'm really trying to do is just to compare between _team2 and my goal, but I found that they are different types and I don't know why, do you have an explanation for that?

Hello

I think you have to use event.currentTarget rather than just target.

Thank you.

Tags: Flex

Similar Questions

  • I can't see the pictures in my yahoo email, I did not have this problem with other browsers. I used the safe mode and still no success. Help, please.

    Question
    I can't see the pictures in my yahoo email, I did not have this problem with other browsers. I used the mode 5 firefox safe and always without success. Help, please

    To help other users find solutions, please come back to this Thread and connect you to the
    Forum with your user name and password:

    Click on 'resolved' beside the answer above that BETTER resolved your issue

    DO NOT CLICK on 'Solved It' next to this answer

  • Problem with Adobe Premiere elements 12 using the model of Scary Halloween

    I'm having a problem with Adobe Premiere elements 12 using model Scary Halloween themed Menu.  My problem is that the red line is default to the scenes.  I want to its default value for the game.  How can I do? Is this a bug?

    Side note: other model by default to play movie

    Thank you

    Jeffrey caban

    No bug. Just how scary the .psd for the Halloween model has been implemented.

    You must enter the .psd for the scary Halloween model and reorganize the

    Layer games. Do you know how? Otherwise, I'll give you very specific instructions on how to

    do this.

    You want the order of the layer sets look like

    This is what worked for me earlier to get the preview disc menu to open hand

    menu with the Red nail under the game.

    We will follow to your answer.

    RTA

  • On Firefox only, I get problems with a few Joomla sites using the JA_purity template. Error: has not been loaded because its MIME type "text/html", is not "text /".

    Hello

    I updated Firefox on my computer for 13.01. Now, he struggles to read about 2 sites - both are Joomla and based on the model of JA-purity. What happens is that it fails to load the CSS files to do with the side and the top of the Joomla site menus. The file comes up with this:

    because its MIME type "text/html", is not "text/css".
    Source file: http://extensions.joomla.org/
    Line: 0

    This error does not appear with other browsers and it displays perfectly in fact in all other browsers.

    I'm new on this but I read the following article and think it could be my problem

    https://developer.Mozilla.org/en/Incorrect_MIME_Type_for_CSS_Files

    Where Im stuck, it's that I did not fully understand what to make of this article, if I could get a step by step guide to fix this problem that would be greatly appreciated.

    I apologize in advance if the answer lies somewhere here - I have had a look and couldn't get out.

    Thank you
    Alex

    I don't see that the error and all style sheets seem to load.

    Reload Web pages, and ignore the cache.

    • Hold SHIFT and click reload.
    • Press 'Ctrl + F5' or 'Ctrl + Shift + R' (Windows, Linux)
    • Press 'Cmd + Shift + R' (MAC)

    Clear the cache and cookies from sites that cause problems.

    "Clear the Cache":

    • Tools > Options > advanced > network > storage (Cache) offline: 'clear now '.

    'Delete Cookies' sites causing problems:

    • Tools > Options > privacy > Cookies: "show the Cookies".
  • problem with checkbox custom when you use the loadVariablesNum

    I have several cutomized box that he can select or deselect and I have a button to determine which of the boxes is selected and through this button, I spent the variable to loadVariablesNum corresponding to which of the boxes is selected.

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

    the code in the button to determine which of the boxes is selected:

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

    If (chk1.mark1._visible = true) {}
    trace ("31");
    loadVariablesNum ("http://url?uid=" + _root.uid + "& years = 31", 2);
    }
    If (chk2.mark2._visible = true) {}
    trace ("32");
    loadVariablesNum ("http://url?uid=" + _root.uid + "& years = 32", 2);
    }
    If (chk3.mark3._visible = true) {}
    trace ("33");
    loadVariablesNum ("http://url?uid=" + _root.uid + "& years = 33", 2);
    }
    If (chk4.mark4._visible = true) {}
    trace ("34");
    loadVariablesNum ("http://url?uid=" + _root.uid + "& years = 34", 2);
    }
    If (chk5.mark5._visible = true) {}
    trace ("35");
    loadVariablesNum ("http://url?uid=" + _root.uid + "& years = 35", 2);
    }

    I'm assuming that you have a problem with it not working.  A problem with it is that when you make the comparison conditionals, you use == to see if things are equal, not =

    In addition, not a mistake, but to less treatment works... you must use "elsewhere" so that once the program finds a match it does not all the remaining conditions, which would make you currently.

    If (true chk1.mark1._visible == ) {}
    trace ("31");
    loadVariablesNum ("http://url?uid="+ _root.uid +"& years = 31", 2);
    } Else if (chk2.mark2._visible == true) {}
    trace ("32");
    loadVariablesNum ("http://url?uid="+ _root.uid +"& years = 32", 2);
    } ElseIf...

    In addition, the solution of the error can be simplified in your case because you are using Boolean values (true/false).  When a conditional tests something that he's just looking to see if the value it evaluates as true or false, so your conditional statements have not even the 'is true ".

    If {(chk1.mark1._visible)
    trace ("31");
    loadVariablesNum ("http://url?uid="+ _root.uid +"& years = 31", 2);
    } Else if (chk2.mark2._visible) {}
    trace ("32");
    loadVariablesNum ("http://url?uid="+ _root.uid +"& years = 32", 2);
    } ElseIf...

    One last thing... it seems that you have created unnecessarily box different symbols where you might have used the same as that for all of them.  I say this because to see how you have different brand # for each of them.   Just assign the same name to a different instance...

    If {(chk1.mark._visible)
    trace ("31");
    loadVariablesNum ("http://url?uid="+ _root.uid +"& years = 31", 2);
    } Else if (chk2.mark._visible) {}
    trace ("32");

    This example is used to emphasize the difference between symbols and instances.  The same symbol (such as a radio button or your craft boxes) can be reused multiple times by using the names of different instances for each instance.  You can then assign unique values to the properties of each instance

  • Problem with adding a new value to the default login Page

    I hope he's a simple guy, I added an element of the selection list to the standard login page (P101) to allow the user to select a FIELD as well as their username and password.
    When the next page appears and I am trying to retrieve the value which is held in the new domain, it has been deleted, but the values entered in the elements
    P101_USERNAME and P101_PASSWORD are always present.

    I can't understand why the values that held in points P101_USERNAME and P101_PASSWORD are always present, but P101_DOMAIN has been deleted.

    I tried to create value to the zero page and writing in the field of value using pl/sql and javascript, but as soon as the page is requested, the value is cleared.

    Any ideas how to get around this problem?

    Thanks in advance

    I guess that your login page contains a process like this:

    BEGIN
       wwv_flow_custom_auth_std.login (p_uname           => v ('P101_USERNAME'),
                                       p_password        => :p101_password,
                                       p_session_id      => v ('APP_SESSION'),
                                       p_flow_page       => :app_id || ':1'
                                      );
       :t_random_number := :p101_random_number; /* this is something I added to my code */
    END;
    

    Now, if you go to this page:

    http://Apex.Oracle.com/pls/OTN/f?p=31517:1

    Please note the random number assigned to you. Once you login, the same number will appear on page 1 (near the top).

    So, this is how you can solve your problem.

       :t_random_number
    

    is a part of the application.

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Opal-consulting.de/training
    http://Apex.Oracle.com/pls/OTN/f?p=31517:1
    -------------------------------------------------------------------

  • Problem with adding new storage to the CDV provider profile

    Hi all

    I have problem with adding new storage to the CDV provider profile.

    My ENV:

    VCD Version 5.5 latest

    vCenter 5.5

    VCDDB - SQL

    I created the environment with two profiles of storage for the first time and it's work well (the storage profile created before I joined the vCenter on the VCD)

    I created tags and he attributed to the data store and I see the new VM storage through the vSphere web client policy.

    I can also see VMS on the VCDDB the dbo.storage_profile_inv the new storage policy table and when I create new provider TDC I can't.

    What I'm trying:

    1 Refresh the storage via the VCD (right click on the attached vCenter) profile

    2. restart the inventory and the profile based on the vCenter servers

    3. restart the VCD and vCenter servers

    Help, please

    You can just follow KB 2075366.

  • After 3 years of use of this helmet and having no problems with it, now I can hear the sound in the right ear

    Hello, after 3 years of use of this helmet and having no problems with it, now I can hear the sound in the right ear... what should I do? Help, I don't want to say 'goodbye' to it already... Thank you

    It could be the plug on the computer that is the cause of the problem. Try another helmet or a pair of speakers in it.

    If you hear only on one side, who will tell you that is the question.

    If you hear from both sides, you must obtain a new helmet

    Software will fix either of the foregoing...

  • How to deal with a major project (perhaps using the approach Trail Daisy)?

    Hello

    My initial problem was that I needed the screen to pause so that the user can interact with the spry menus and interactive images. In other threads, I noticed that you added click boxes to prevent the screen movement. However, whenever I clicked on the spry menus or image maps, screen installs without giving me the opportunity to interact more on the screen. In addition, the screen gone white. I decided to use the timeline and each drag last less than 60 seconds. However, whenever I tried to do this for the entire project, it crushed, repetitive, the project became too big - it's 164 slides.

    I read in another thread that you can break up the project using the "Daisy track" indicated. When a single segment of the project is completed, you can run another swf file to open, and so on until they all open in the sequence. I wonder, how does it work exactly this approach and will still be able to use the menus spry, i.e. I will always be able to insert links to other parts of the project? This approach means that I have to create a web page to add the links of these separate swf files and this will also be my spry menus and design obsolete?

    Any help on this would be greatly appreicated.

    Thank you very much.

    Make sure all your break points are at least 1 second from the beginning or the end of a slide (just in case the blade is still fading in or out).

    You also mention that you use "spry menus" in your course of Captivate.  I have not heard of anyone done this before.  On the off chance that they can be the introduction of a weird behavior, you can try remove a copy of the project to see if it improves.

  • still no luck with highlighting and try to use the Edit with photoshop elements Editor

    still no luck with highlighting and try to use the Edit with photoshop elements Editor.

    2nd try still nothing.JPGYes, I clicked the change of use with photoshop elements, editor in Chief but still, don't put not to...

    still not working.JPGregion and I select view selected in organzier files. I don't understand what is happening. I never had this problem before and I have 12 for a long time.  How can I fix it?


    You can keep answers to the original discussion, or it's going to go very confusing - http://forums.adobe.com/thread/1438997?tstart=0.

    See you soon,.
    --
    Neale
    Insanity is hereditary, get you your children

    If this post or by post from another user solves the original problem, please mark as correct and/or useful messages accordingly. This helps other users with similar trouble getting answers to their questions more quickly. Thank you.

  • When you use the question mark, appears like a capital E with accent French and cannot use the quotes.

    Original title: I can't use my question mark (rises like a capital E with accent French and cannot use the quotes)

    I'm having a problem from time to time with my ability to use marks quotaion, brands etc. How can I treat it DEFINITIVELY the question.

    Thank you

    Hi golfnut11,

    1. you are using a laptop?

    2. you remember to make changes to the computer priro to this question?

    Step 1:

    If you use a laptop, check if the FN key is enabled. If so, then try to turn it off and check.

    Step 2:

    You can also try to check the keyboard on the screen and if the problem occurs or not.

    Check out the link:

    Type without using the keyboard (on-screen keyboard)

    http://Windows.Microsoft.com/en-us/Windows7/type-without-using-the-keyboard-on-screen-keyboard

    If you use a Microsoft keyboard, you can also consult the following article:

    Troubleshoot wired keyboards that do not or only the erroneous characters category
    http://support.Microsoft.com/kb/258826

    Hope this information is useful.

  • I have a problem with a card being inadmissible for the zoom on a phone.

    I have a problem with a card being inadmissible for the zoom on a phone. The Web site has been formatted for the phone using Muse. The plan should be saved in a way in Photoshop or y at - it a setting in the Muse who can fix this?

    Please provide more details, as if the card is integrated an image or a real map generated by widget.

    The generated plan must zoom in/out.

    Thank you

    Sanjit

  • I have problems with Lightroom. I just downloaded the creative cloud with LR and PS PS works fine, but does not open LR. It is stuck on the license screen and freezes. Please advise...

    I have problems with Lightroom. I just downloaded the creative cloud with LR and PS PS works fine, but does not open LR. It is stuck on the license screen and freezes. Please notify.

    reset your preferences-

    Acrobat: http://help.adobe.com/en_US/acrobat/X/pro/using/WS58a04a822e3e50102bd615109794195ff-7feb.w .html

    Adobe media encoder: https://forums.adobe.com/thread/1713540

    Legacy: http://helpx.adobe.com/after-effects/using/preferences.html

    Bridge: https://helpx.adobe.com/bridge/kb/troubleshoot-errors-freezes-bridge-windows.html

    Dreamweaver: https://helpx.adobe.com/dreamweaver/kb/restore-preferences-dreamweaver-cs6-cc.html

    Flash: http://helpx.adobe.com/flash/kb/re-create-preferences-flash-professional.html

    Illustrator: http://helpx.adobe.com/illustrator/using/setting-preferences.html

    InDesign: https://forums.adobe.com/thread/526990

    Lightroom: https://helpx.adobe.com/lightroom/help/setting-preferences-lightroom.html

    Muse (mac): https://forums.adobe.com/thread/1246022?tstart=0

    Photoshop: https://forums.adobe.com/thread/375776

    Photoshop elements: https://helpx.adobe.com/photoshop-elements/kb/preference-file-locations-photoshop-elements .html, http://www.photokaboom.com/photography/learn/Photoshop_Elements/troubleshooting/1_delete_p references_file.htm

    elements of first: https://helpx.adobe.com/photoshop-elements/kb/preference-file-locations-photoshop-elements .html

    First pro: http://www.mediacollege.com/adobe/premiere/pro/troubleshooter/trash-preferences.html

  • I installed a trial of Illustrator from Adobe on my macbook pro. I want to draw a picture using the custom trace button but can not. Does anyone have any ideas how I could track custom?

    I installed a trial of Illustrator from Adobe on my macbook pro. This is the release of 2014 of the adobe Illustrator. I want to draw a picture using the custom trace button.

    I start a new document. Then I place my scanned pencil/color pencil, drawing, in the document. I tried to scan and then placing it as jpeg, bitmap and a tiff file. I tried scanning and place then, in color and in black and white. The scan mode that I use is flat. Adobe Illustrator allows me to select the default button and one of the eleven preset buttons (e.g. photo high fidelity), but cannot me click on the record button custom. The custom trace button is gray while all other buttons are white.

    Does anyone have any ideas how I could track custom?

    Just it trace, and then change the options later. The follow-up is 'live', you can press the buttons and see what happens.

    See also the manual.

  • Problem with character set to UTF-16 THE

    Hello.
    There were difficulties with change of character set, using the convert () function
    The question is that in the list v$ nls_valid_values AL16UTF16LE character set does not appear, too much time the survey is conducted with success
    convert ([some-national-characters], 'CL8MSWIN1251', 'AL16UTF16LE').
    But to give input of data stored in a CLOB, there is an error "a character set is not supported.
    What are the possible ways of the decision of a problem?

    You can try using DBMS_LOB. SUBSTR to access LOB data as in the following example:

    SQL> select * from v$version;
    
    BANNER
    ----------------------------------------------------------------
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    
    SQL>
    SQL> declare
      2  v_i clob;
      3  v_o clob;
      4  begin
      5  v_i := 'a';
      6  v_o:=convert(dbms_lob.substr(v_i,1,1),'AL16UTF16LE', 'CL8MSWIN1251');
      7  end;
      8  /
    
    PL/SQL procedure successfully completed.
    

Maybe you are looking for