How to make reference to the cantainer object

Is there a way to refer to the object and other assets based on the position of the target

var movies:Array = new Array({btn:btn_1,url:"cico.swf"},{btn:btn_2,url:"ianEastwood.swf"});

for (var g:Number = 0; g< btns.length; g++) {
     movies[g].btn.addEventListener(MouseEvent.CLICK, menuClick);
}

function menuClick(evt:MouseEvent):void {
  eg.      trace(  (evt.target).container Object()    );
     
     
  eg.     trace(    ( (evt.target).cantainer  Object() ).url   );



Ultimately this is what i want
var ind:Number = movies.indexOf(the object in the array);
trace (ind); // should be a number 



}


No object btn consists in movies.  It contains objects that contain objects btn.

use:

function menuClick(evt:MouseEvent):void {}

for (var i: uint = 0; i<>

{if (movies [i]. BTN is evt.currentTarget)}

trace (i);

breaking

}

}

}

Tags: Adobe Animate

Similar Questions

  • How to make reference to the start state?

    Hello!

    I have two States in my Application: Start (State of Base) and connected (defined by myself).

    When I put the Application.application.setCurrentState ("logged") I put the State connected, but if I try:

    Application.application.setCurrentState ("start") that it does not work.

    How can I make reference to the start state?

    Thank you very much

    Hello

    To refer to the use of the base state:

    currentState = ";

    Kind regards

    Ivan Alexander PMP

    SR Application engineer.

    FlexAppsStore.com

  • Apex 4.0: In the form of table: how to make reference to the elements?

    Hello
    I have a tabular layout with a certain query. A column in the query (say comm, is not displayed. This column is required in the table

    When a new row is added in the form of tables, I want to add a (complex) value for this column hidden by default.

    I want to add a process (before submitting) to the page.
    How can I make reference to this particular point?


    : P23_COMM: =...

    does not work. It is a column in the query, not a page element.

    Any help appreciated.
    Sincere friendships Erik

    Loop over the hidden PK table, identification of the new line (by finding with PK NULL table th eone) and assign the hidden item corresponding

    Assumung 01 is the primary key column table (use firebug to check this) and 05 is the hidden field

    BEGIN
      FOR i IN 1..APEX_APPLICATION.G_F01.COUNT
      LOOP
         --Identify new rows
          IF ( APEX_APPLICATION.G_F01(i) IS NULL ) THEN
              APEX_APPLICATION.G_F05(i)  := 
          END IF;
      END LOOP;
    END;
    
  • How can I make reference to the parent object of a checkbox?

    I have a checkbox called P105_CBX, with 10 boxes. I have an onClick = "RunThisFunction (this) ' in the attributes of elements in HTML form for this object." When I click on one of the boxes, this function is triggered. An alert at the top of this function tells me that the argument passed to this function is something like P105_CBX_2, which indicates how box has been checked.

    I would LIKE to pass just the name parent of the object checkbox, P105_CBX, as the argument to this function, instead of the name of the box that was checked and I cannot quite understand how. I tried arguments such as this.container this.parentNode, this.parent, this.parents (), this.closest ('ul') and I've yet to find the magic word. After two hours of searching on Google, I'm turning to the experts.

    Thank you!

    Published by: Mark T. 17 March 2012 09:14

    Hello

    I couldn't reproduce your behavior. Maybe this is related to your prob? http://seanmonstar.com/post/707125202/parentNode-misbehavior-in-IE, but more likely, you have already seen it.

    In your code, you may also like to try the function $x_UpTill: http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21676/javascript_api.htm#CHDEGGGI

    function RunThisFunction (cbx) {}
    Alert ($x_UpTill(cbx,_'FIELDSET').id);
    }

  • How to make reference to a function object in a conditional statement?

    I currently have a conditional which looks like this:

    {if(!closeFunction)}
    this.removeEventListener (CloseEvent.CLOSE, closePopUp);
    }

    closeFunction is a: type of function and it works correctly, but I have this error warning?


    3553: function value used when the Object type is expected.  Maybe the parentheses () are missing after this function reference.

    Is there a better way to check if this feature is enabled or not?

    Try

    If (closeFunction is nothing)

    Gordon Smith

    Adobe Flex SDK team

  • How to make reference to the multidimensional array element?

    What should I change in the next statement in the dbms_output to display 'Ken' and avoid the error?

    Thank you
    -Ken
    create or replace type kja_person_name_rec as object
    ( pena_id number(10)
    , pers_id number(10)
    , pnty_cd varchar2(10)
    , first_nm varchar2(100)
    , family_nm varchar2(100)
    );
    /
     
    Type created
    create or replace type kja_person_name_tbl as table of kja_person_name_rec not null;
    /
     
    Type created
    create or replace type kja_person_rec as object
    ( pers_id number(10)
    , birth_dt date
    , person_names kja_person_name_tbl
    );
    /
     
    Type created
    create or replace type kja_person_tbl as table of kja_person_rec not null;
    /
     
    Type created
    declare
      l_person_name  kja_person_name_rec;
      l_person_names kja_person_name_tbl;
      l_person       kja_person_rec;
      l_persons      kja_person_tbl;
    begin
      l_person_name  := kja_person_name_rec( 1, 1, 'LEGAL', 'Ken', 'Anderson');
      l_person_names := kja_person_name_tbl( l_person_name);
      l_person       := kja_person_rec( 1, to_date( '1955-SEP-22', 'YYYY-MON-DD'), l_person_names);
      l_persons      := kja_person_tbl( l_person);
     
      dbms_output.put_line( 'l_persons(1).first_nm = '|| l_persons(1).person_names.first_nm);
    end;
    /
     
    declare
      l_person_name  kja_person_name_rec;
      l_person_names kja_person_name_tbl;
      l_person       kja_person_rec;
      l_persons      kja_person_tbl;
    begin
      l_person_name  := kja_person_name_rec( 1, 1, 'LEGAL', 'Ken', 'Anderson');
      l_person_names := kja_person_name_tbl( l_person_name);
      l_person       := kja_person_rec( 1, to_date( '1955-SEP-22', 'YYYY-MON-DD'), l_person_names);
      l_persons      := kja_person_tbl( l_person);
    
      dbms_output.put_line( 'l_persons(1).first_nm = '|| l_persons(1).person_names.first_nm);
    end;
     
    ORA-06550: line 13, column 80:
    PLS-00302: component 'FIRST_NM' must be declared
    ORA-06550: line 13, column 3:
    PL/SQL: Statement ignored
     
    SQL> 

    Hello

    Ken Anderson says:
    What should I change in the next statement in the dbms_output to display 'Ken' and avoid the error?

    Thank you
    -Ken

    create or replace type kja_person_name_rec as object
    ( pena_id number(10)
    , pers_id number(10)
    , pnty_cd varchar2(10)
    , first_nm varchar2(100)
    , family_nm varchar2(100)
    );
    /
    
    Type created
    create or replace type kja_person_name_tbl as table of kja_person_name_rec not null;
    /
    
    Type created
    create or replace type kja_person_rec as object
    ( pers_id number(10)
    , birth_dt date
    , person_names kja_person_name_tbl
    );
    /
    
    Type created
    create or replace type kja_person_tbl as table of kja_person_rec not null;
    /
    
    Type created
    declare
    l_person_name  kja_person_name_rec;
    l_person_names kja_person_name_tbl;
    l_person       kja_person_rec;
    l_persons      kja_person_tbl;
    begin
    l_person_name  := kja_person_name_rec( 1, 1, 'LEGAL', 'Ken', 'Anderson');
    l_person_names := kja_person_name_tbl( l_person_name);
    l_person       := kja_person_rec( 1, to_date( '1955-SEP-22', 'YYYY-MON-DD'), l_person_names);
    l_persons      := kja_person_tbl( l_person);
    
    dbms_output.put_line( 'l_persons(1).first_nm = '|| l_persons(1).person_names.first_nm);
    end;
    /
    
    declare
    l_person_name  kja_person_name_rec;
    l_person_names kja_person_name_tbl;
    l_person       kja_person_rec;
    l_persons      kja_person_tbl;
    begin
    l_person_name  := kja_person_name_rec( 1, 1, 'LEGAL', 'Ken', 'Anderson');
    l_person_names := kja_person_name_tbl( l_person_name);
    l_person       := kja_person_rec( 1, to_date( '1955-SEP-22', 'YYYY-MON-DD'), l_person_names);
    l_persons      := kja_person_tbl( l_person);
    
    dbms_output.put_line( 'l_persons(1).first_nm = '|| l_persons(1).person_names.first_nm);
    end;
    
    ORA-06550: line 13, column 80:
    PLS-00302: component 'FIRST_NM' must be declared
    ORA-06550: line 13, column 3:
    PL/SQL: Statement ignored
    
    SQL> 
    

    L_persons (1) .person_names is a kja_person_name_tbl. Kja_person_name_tbls is not first_nms; only kja_person_name_recs do.
    Near the end, instead of

       dbms_output.put_line( 'l_persons(1).first_nm = '|| l_persons(1).person_names.first_nm);
    

    Try

    dbms_output.put_line( 'l_persons(1).first_nm = '|| l_persons(1).person_names(1).first_nm);
    --                                                                   added  ^^^
    
  • How to make reference to the external SWF file using if statement?

    I have a main swf file that loads several external SWF file when the user clicks a menu button. Now I want to target a specific swf file to Add an extra library child or of another swf when this specific swf file is loaded. How should I do? What should I put in the stated case?

    ///////////////////////////////////////////////////////////

    var newswf:URLRequest = new URLRequest (".") ("/ swf /" + event.target.name + ".swf");

    Loader.Load (newswf);

    addChild (loader); dynamically load SWFs

    If (newswf == ".") ("/ SWF/pubResCHETNA.swf ') //error here

    {

    FC.buttonMode = true;

    FC.addEventListener (MouseEvent.CLICK, full screen);

    }

    function fullScreen(e:MouseEvent):void

    {

    var loaderF:Loader = new Loader();

    loaderF.load (new URLRequest ("PopupFullscreen.swf"));

    addChild (loaderF);

    }

    ////////////////////////////////////////////////////////

    The State must be newswf.url == the path. However I store event.target.name as a variable and use it in the State. You use "." for your path so the condition probably will always fail.

    --

    Kenneth Kawamoto

    http://www.materiaprima.co.UK/

  • How to make connections on the outputs of the letter of wsn 3202?

    GOOG morning engineers,

    How to make connections on the outputs of the letter of wsn 3202?

    Sorry, I'm very confused by your response.

    You must not something on the power set by program, just connect a power supply to DIO power and mass of DIO.  Then your DIO lines should be able to output values.

    In addition, I think that you may need to configure the output line.  This would be by the project.  I don't remember what it is, but it should be in some menu properties (probably for the specific line of DIO).

  • I downloaded OS Yosemite and threw it on my photoshop 3 - How to make it to the top?

    I downloaded OS Yosemite and threw it on my photoshop 3 - How to make it to the top?

    Assuming you mean ps cs3,

    Downloadalbe installation files available:

    Download and installation help links Adobe

    Help download and installation to Prodesigntools links can be found on the most linked pages.  They are essential; especially steps 1, 2 and 3.  If you click on a link that does not have these listed steps, open a second window by using the link to Lightroom 3 to see these "important Instructions".

    window using the Lightroom 3 link to see these "important Instructions".

  • How to make reference to a column name in the form report

    Hello
    How can I make reference to a column name in the form report. My problem is that "I have a form report that I have the column name when using click on the column name, it must get to the next page with the corresponding values of the column".

    Here, I realized that when I click on the name of the column (in page 1) it brings me to the next page (page 2). but in the next page (P2) I want to display (display only) the corresponding values of the column (page 1) selected, but the values are not editable and shouldn't be in the text box must be in display area.

    So, how can I write a SQL to display single source field. That is to say, how can I consult report form (page 1) in name column.

    Hello

    If you use the link in the column when you click on the need of the column value, you need to navigate to the next page and all the data accordingly select value here.

    Modify the report form and see the top of the page and click on report attribute.

    So now you have the attributes of the columns is to say what are the columns are available in the reports form.

    Click on change column what you need Ie the column when you click on its passage to the next page this column, for example, as mentioned in the previous post "Empname".

    Check the link column and give perspective of values according to your need and click on apply chages.

    Thank you & best regards
    Srikkanth.M

  • How to make reference to a column name in the domain constraint

    When specify us a constraint check (for SQL Server) in a field, we need to enter an expression in the syntax, for example

    Len (Phone) > 7

    Later, the Modeler will exactly this expression in the SQL code. But it would be wrong as a constraint to refer to a column name in the table (which would not be 'phone').
    So, how to make the data name Modeler to a real column in the constraint domain?

    Hello

    Use the % COLUMN as a placeholder column name - len (%COLUMN%) > 7

    Philippe

  • How to wrap text around the anchored object (image)

    I quickly started to get account that I am not the mental giant I had previously thought!

    Having recently made the switch to InDesign, I fight to pick up some of the different methodologies, and more still, the different jargon.

    I read the section guide from Adobe on this request, and I feel none the wiser is. I'm sorry to you guys with what is probably a very trivial question for users over three years, but let's go even of evil.

    I am trying to anchor the image object in a block of text, with the image of the text wrapping. While it seems to be in my ability to insert the object and to wrap the text, I have real problems to anchor this object in the right place.

    What I'm trying to look like this: -.

    Screen Shot 2015-12-31 at 1.14.52 PM.png

    Can anyone please help me, a simple "idjit" way how to do this?

    Any help is greatly appreciated.

    See you soon... Scotty

    If the image is placed on the page:

    Drag the symbol at the top right in a paragraph before that the first line is ignored when the text is wrapped.

    I suggest to save all the settings (wrapping text, the position of an object of anchroed, etc.) in the Styles of an object as it makes it easier to do global settings later.

  • How to make boxes to the letters for my alias iCloud in Mac Mail

    How to make mailboxes mailbox for my alias iCloud in Mac Mail?

    I have just set up my e-mail address of iCloud for the first time.  I had an Apple account for many years, but had not hitherto iCloud email address.  After that, Mac Mail automatically created an Inbox and an Outbox called, "iCloud" in the Mac Mail.

    Following the instructions I found online from Apple, I created an alias.  I would like to create the mailbox for the alias. How can I do this?

    Because it cannot be changed or deleted, I won't use my "main" iCloud address email for anything whatsoever.  Everything will be done by one or two aliases.

    Thank you for helping.

    You can create a folder for iCloud in the same way, when you create folders for any of your e-mail accounts. However, I suspect that you hope to create an Inbox specially for your alias addresses, which you can not do so. Aliases are aliases for your primary address, they are not different addresses, as such mail to your iCloud address and it's aliases are all moving in the same Inbox.

    What you can do is create a folder for mail addressed to your alias and create a rule to move relevant mail in the Inbox in this folder.

  • Adding dynamic menuitems - how to make menuitem contextin the Run() method

    Hello

    I'm moving the name of the MenuItem to a routine that I call you inside the method public void run() I'm assocating with all the menu items. I get a compiler error complaining that I can't use the local variable objWorkflowStep.mstrName because it is not a constant.  Is there anyway to get the reference to context or menuitem in the run() method?

    menu. Add (new MenuItem (objWorkflowStep.mstrName, intOrdinal += 100, 10))
    {
    public void run()
    {
    UiApplication.getUiApplication (.pushScreen)
    (DoWorkflowTransitionScreen) new
    mobjAppointment,
    objWorkflowStep.mstrName));
    }
    });

    Thank you

    Hello

    Thanks for the help but that will not work either.

    The problem is that I add the multiple of these menuitems in a LOOP, all with the SAME sub main() {}. When the run() method is called it is unclear what alleged menuitem.

    I think I came up with a brute force solution. I'm going to flatten the loop, hard-code the Menu # as a parameter to my DoWork (...) function called within the run() function and store this menu # as a member of the objWorkflowStep object. This way my DoWork() function can loop through the vector of WorkflowStep objects and find the WorkflowStep with the id of the menu.

  • How to make part of the video in black and white and the other part in color

    Hello

    So I want to make this black and white video, but keep what inside the rearview mirror in color,

    I used the black and white masked effect around the mirror, but the only problem is that the camera then moves the mask b & w started out where I need it.

    can someone help me please on how to keep track on the edges of the mirror through the video clip of 30 seconds or more

    Thank you

    Screen Shot 2016-03-25 at 3.36.21 PM.png

    You don't say which version of the body you use, but in the newer versions, you use these tools to have body follow the matte for you:

    More info here:

    Masking and tracking in Premiere Pro

    MtD

Maybe you are looking for