Try to make a variable with loop for

Try to retrieve an instance of movieClip in my library and set it on stage and clickable menu do, (list drop-down/dropup)).
Can someone help me with what I'm doing wrong?

var MenuItem1:Array = new Array ("text1", "text2", "Text3", "text4");
CreateM (MenuItem1.length);
function CreateM(Menu1:Number):void
{

for (var i: Number = 0; i < MenuItem1.length; i ++)
{

var cela ["M1" + i]: TextField = new TextField();
var cela ["M2" + i]: takki = new takki();
This ["M2" + i] there = this ["M2" + i] there-(i*50) + (stage.stageHeight - this ["M2" + i] .height);
This ["M1" + i] .text = MenuItem1 [i];
This ["M1" + i] there = this ["M1" + i] there-(i*20) + (stage.stageHeight - this ["M1" + i] .height);

addChild (this ["M2" + i]);
addChild (this ["M1" + i]);

This ["m2" + i] .addEventListener (MouseEvent.MOUSE_OVER, clicking);
}
}

function clicking(event:MouseEvent):void

{

trace ("I am clicking on the button" & & this ["M2"]);

}

Try something like this:

var MenuItem1:Array = new Array ("text1", "text2", "Text3", "text4");
CreateM (MenuItem1.length);

function CreateM(Menu1:Number):void
{
for (var i: Number = 0; i
This ["M1" + i] = new TextField();
This ["M2" + i] = new takki();
This ["M2" + i] there = this ["M2" + i] there-(i*50) + (stage.stageHeight - this ["M2" + i] .height);
This ["M1" + i] .text = MenuItem1 [i];
   
This ["M1" + i] there = this ["M1" + i] there-(i*20) + (stage.stageHeight - this ["M1" + i] .height);
   
addChild (this ["M2" + i]);
addChild (this ["M1" + i]);

This ["m2" + i] .addEventListener (MouseEvent.Click, clicking);
}
}

function clicking(event:MouseEvent):void {}
trace ("I am clicking on the button" & event.target.name);
}

Remember that you have to work with the positioning and the TextFields overlap takkis, that the click is possible only in a minor fraction of the takkis.

Tags: Adobe Animate

Similar Questions

  • Table row with loop for each group to set the variable.

    HI: There is probably a simple answer for this, but I don't the have not found...

    I have a single row table to move through a group to set a variable containing a sum running. I'm not display the amount in the table but when I saw the report, I see that the table is expanding (add lines) for each loop.

    The only line table has 3 columns.

    1st column
    <? for-each: AC_GROUP? >

    2nd column
    <? xdoxslt:set_variable ($_XDOCTX, 'xAmtVar', xdoxslt:get_variable($_XDOCTX,'xAmtVar') + CURRENT_AMOUNT)? >

    3rd column
    <? end foreach? >

    Can I use <? for each group? > or something else. My requirement is to set the value of the variable with the total running, but because the loop is adding lines for each value he travels (though not displayed), it's also affecting other areas of the presentation of the page.

    Hope it makes sense. Thanks in advance.

    You can do it many ways.

    No need to loop
    You can create a variable and specify the amount of the sum directly to that.

    
    

    or

    loop through, then add as you do.

    
    

    give any space or enter characters in a word between them, just put it in a single form field will be

    But as I said, I'd definitely go with the first option.

  • move the MCs with loop for?

    I am trying to find a way to move video clips with a for loop

    I have 10 points called t1d-dt10, and I want to be able to put them all to y = 200.

    I understand that I can put i = 1; i < 11; i ++

    as

    for (i = 1; i < 11; i ++) {}

    DT i._y plus 200 ;}

    or

    for (i = 1; i < 11; i ++) {}

    String("DT"+i)._y = 200 ;}

    but the rest is a mess, and does not, work or glitches. I still have to find a loop help file for the movement of several video clips.

    If you just want to immediately change the positions of the bodies, then using a for loop works fine, you just use the notation of support [] to have the strings to be interpreted as the name of the instances...

    for (i = 1; i<>

    This ["dt" + i] ._y = 200;

    }

  • Problem with loop "for".

    Hi all

    How can I solve this problem

    Disable indexing on the right side of the loop for.

    Consider using shift registers.

  • Do nothing in the case structure with loop For

    Hello

    I am trying to extract data from my signal (0.3 0.4 0.6...). I want to extract values greater than 0.5 and put it in a table. If I use a loop For which I can determine each index of my data to be compared and it happened in the structure of the case. In the 'Real' box, I wanted the value to extract outside the loop For. And I want to "do nothing" if my value falls within the box 'False. ' However, it displays error, saying "' Tunnel: lack of assignment to the tunnel '."

    I tried to select 'Default', but it does not work since I use a Boolean comparison. I tried to use the registry to shift, but in vain too.

    Someone could guide me on this to extract only a value greater than 0.5 and index them?

    For example "0.6 0.7 0.8; 3 4 7 index.

    Satisfaction will be given.

    Here you have

  • Whenever I try to make my project with the media encoder, it crashes. Can anyone help?

    Exactly what the title says.

    If I try to make in Adobe Premiere or send it to the Media Encoder, the project blocks everything to halfway through the rendering process. He always seems to crash at the same point in the process. Similarly, the program crashed a few times while I was working on the project, but I've always been able to recover and pick up from where I had left. Everybody knows such a question and know how to fix?

    Hi Matt,

    Ann has a valid point. If it crashes at the same place every time, she can be the media on the timeline at this particular point, or may be the effects. (if requested) Give it a shot and let us know.

    In addition, this could help:

    Go to file > project settings > General and change the "Video Renderer" to "only Mercury playback engine software. Click 'OK' and select "Remove the Previews". Then export them again.

    Thank you

    Regalo

  • Make a Menu with options for audio different paired with different video

    Hello

    I was wondering if someone could provide assistance for the creation of a DVD menu with yet. I want to create a DVD menu that gives the user a selection option of the video background (choice of 3 or 4 videos) and then he would go to another menu of Option that would allow them to choose the sound to play while observing that chosen video (to choose among 4 different audio options).

    The idea is that someone can put it in the DVD and Menu guide them through the viewing experience. First, they could choose to look at the type of video as river ocean (a) (b) (c) whatever and then also have an option to choose which sounds to hear everything by watching this video named (one) guitar classical music (b) (c) any other audio

    I would like to then the selected VIDEO and AUDIO selected to be paid in loop/repeat mode to run continuously.

    I would REALLY appreciate help if someone could let me know how to do, or to provide a model if they have one, or a tutorial on how to do it using Adobe Encore.

    Thanks a lot for your time!

    Marc

    Basically, what you want to do, it's four (for example) have a calendar on your main/menu selection screen. This will lead to an Audio selection Menu, allowing the user to choose the Audio main or additional. I forgot the number of additional possibilities of Audio tracks on a timeline, but I think that you can have up to eight (8), but you may wish to check this. This ARTICLE link should provide you with this info. Choose the button will link to the timeline proper w / the selected Audio track. Note: Make sure that your Audio is EXACTLY, or very slightly more short, as your video. End action of timeline will connect on itself.

    Be sure to set the distance of appropriate title to your Menu, so that the user can exit the loop, without having to stop and then start again. Not sure if you do not want to get to the Menu selection screen or Audio selection Menu, but it's your decision. You can even choose to do Menu principal w / instructions and only one button, to go to the scene selection Menu.

    Good luck

    Hunt

  • Hi, I have lightroom 6 and try to make a pano with "merge &gt; Panorama Photo" 5 photos is grayed out, how can I make it work? Can anyone help?

    Hi, I have lightroom 6 and trying to do my first pano with "merge > Panorama Photo" 5 photos is grayed out, how can I make it work? Can anyone help?

    Hi Lili,

    Make sure that your program is updated to 6.5.1: keeping up-to-date for Lightroom

    and your GPU is supported: Adobe Lightroom GPU troubleshooting and FAQ

    Concerning

    Claes

  • In BULK COLLECT with loop for?

    Let's say I have a table with a column number and a date column.

    I also have a query using a number and a date as a parameter. I want to run this query for each row in the table (using the column date and number of lines as parameters). If my thinking is looping through the rows and the query parameters for each line. It becomes a large number of queries select. Is it possible to use bulk collect here? All the examples I've seen where he uses a predefined cursor. Also, I don't know how to fix this problem without a cursor.

    Here's the query I want to do for each line:
    select * from reading_values rv, 
        (select * from 
           (select id, datereading
                  from readings,
                  where datereading < p_date and pointid = p_id
                  order by datereading desc)
           where rownum <= 1) t
         where rv.reading_id = t.id

    After reading your initial statement 3 times I simply add a third table to select it. I call this tableX colb and two columns cola (number) (date).

    select rv.*, r.*, row_number() over (partition by r.pointid  order by r.datereading desc) rn
    from reading_values rv
    join readings r on rv.reading_id = r.id
    join tableX x on x.colA = r.pointid and  r.datereading < x.colB
    order by  r.pointid, datereading desc
    

    You can restrict which to return only one row for each data point by using the column rn I already added.

    select * /* probably need sinlge column names here to avoid duplications */
    from (
       select rv.*, r.*, row_number() over (partition by r.pointid  order by r.datereading desc) rn
       from reading_values rv
       join readings r on rv.reading_id = r.id
       join tableX x on x.colA = r.pointid and  r.datereading < x.colB
    )
    where rn = 1
    order by pointid, datereading desc
    

    Published by: Sven w. on June 23, 2010 16:47

  • Try to make a knockout with the text.

    Admittedly, I am an amature illustrator user. I only used it for a week now. I have experience in photoshop, so the learning curve was ok.

    I want to create a vector logo, so I can't use photoshop. I know how to do what I want to do in photoshop, but not in illustrator.  I do a KB on a letter text combine together among all objects so I have a single vector file with transparency at the appropriate places.

    logo.jpg

    There are 6 items in this chart: clean, green, text on text in bottom right, left, down the arrow on the 'g' and an another 'g' (in white behind the Green, making it appear like a knockout).

    Visually, it works as long as you have a white background since the rear 'g' is white. There is a white line around this 'g', creating the effect of masking. What I tried to do for the last 2 days, is to combine all these elements into a single object with transparent white. I'm frustrated.

    Type-> vectorize your g and your n, (if you haven't already done so)

    Select the 'g' and the object-> Path-> Outline Stroke.  This will leave you with a group that contains your line (now a composite path) and your filling.

    Separating them.

    Put your race described above your N in the layers panel. (not necessary, but if this isn't the next step is different)

    Choose your race stated and your n and the palette of Pathfinder, "exclude" (top row, far right)

    This will give you a group that contains your cut shapes.  Disassociate.  Remove the indicated time. Profits.

  • Try to make a tutorial, audio loops, destroy.

    I try to do a video by splitting the different clips and then remove the errors, but the audio removed clips is still, help?

    Looks like you need to download a free audio editing software and edit your audio files to exactly the required length. Then put your tutorial. Do a Bing search on "audio editing software.
    B Eddie

  • Try to make a hyperlink with AS3 button Arcade

    Hi all

    I don't really know anything about ActionScript. I just finished a tut on it, but that is all. I'm doing a hyperlink of a classic arcade button, but the code I found just apparently AS2.

    My question can someone help me create this button for my website?

    Hello

    Here is the code AS3 to navigate to adobe.com (whose instance name is "myButton") button, click

    myButton.addEventListener (MouseEvent.CLICK, gotoPageFunction);

    function gotoPageFunction(event: MouseEvent) {}

    var request: URLRequest = new URLRequest ("http://www.adobe.com");

    navigateToURL (request, "_blank");

    }

    Thank you!

    PS: Please mark this message as answered if it is a help to you

  • How can I report a number of variable with a precision of 127 type?

    I try to declare a variable with precision - like for example V_NUM NUMBER (1,127).

    According to oracle, it should be possible-

    http://docs.Oracle.com/CD/E11882_01/server.112/e41084/sql_elements001.htm#SQLRF30020

    2

    NUMBER[ (p [, s]) ]

    Number having precision p and scale s . Precision p may vary from 1 to 38. Wide s can vary from-84 to 127. Precision and scale are in decimal digits. A NUMBER value requires 1 to 22 bytes.

    but after the execution of the present

    declare

    Number V_NUM (1 127);

    Start

    V_NUM: = 1.2333333333333333333333234343435;

    DBMS_OUTPUT. PUT_LINE (V_NUM);

    end;

    /

    I got error (I know that p must be greater, then s - but I can't figured an example for this case s = 127)

    Error starting line: 1 at the controls.

    declare

    Number V_NUM (1 127);

    Start

    V_NUM: = 1.2333333333333333333333234343435;

    DBMS_OUTPUT. PUT_LINE (V_NUM);

    end;

    Error report-

    ORA-06502: PL/SQL: digital error or value: number too high accuracy

    ORA-06512: at line 4 level

    06502 00000 - "PL/SQL: digital error or the value of %s.

    * Cause: A digital arithmetic error, String, conversion or coercion

    has occurred. For example, this error occurs if an attempt is made to

    assign the NULL value to a variable declared NOT NULL, or if a

    attempt to assign an integer greater than 99 to a variable

    NUMBER (2) declared.

    * Action: Change the data, how it is handled, or how it is so declared

    that values do not violate the constraints.

    Is it possible to reach my goal?

    Ok. I found this ;)

    Thank you

  • Assign variables with a loop for

    Hi all

    I'm variable loading for a quiz of xml using Ajax:

    $.ajax({)

    type: 'GET ',.

    URL: "loadVars.xml",

    data type: "xml."

    success: {function (xml)}

    The data that I get are the following:

    word1 = $(xml).find('word1').text ();

    word1distracter1 = $(xml).find('word1distracter1').text ();

    word1distracter2 = $(xml).find('word1distracter2').text ();

    word1distracter3 = $(xml).find('word1distracter3').text ();

    There are about 20 words and I want to use a loop for assign variables on both sides of the equation.

    for (var i = 1; i < 20; i ++) {}

    What's the syntax? I tried:

    "word" + i =

    eval("word'+i) =

    etc.

    Any help much appreciated.

    OK found!

    window ["word" + i] = $(xml).find("word"+i).text ();

  • Variable effects with Loop function.

    I need to create a code that take the following strings:

    
    "Scale"
    "Position"
    "Side"
    
    
    
    
    
    
    
    
    
    
    
    

    And each of them, put in a copy of this code:

    thisComp.effect(!!!STRING HERE!!!)("Layer").name;
    
    
    
    
    
    
    
    
    
    

    And after that, the three variables, each one, receive a complete code.

    
    var a;
    var b;
    var c;
    
    
    
    
    
    
    
    
    
    
    
    

    The result would be this:

    
    var a = thisComp.effect("Scale")("Layer").name;
    var b = thisComp.effect("Position")("Layer").name;
    var c = thisComp.effect("Side")("Layer").name;
    
    
    
    
    
    
    
    
    
    
    
    
    

    I try to do it like this:

    var strings = ["Scale", "Position", "Side"];

    var val = function (a, b, c) {}

    for (var i= 0; I <channels.length; i ++) {}

    effectof the var = thisComp.effect () ('Layer') .namestrings[i];

    Val (effect);

    }

    }

    But don't have experience with functions and loops For.


    And not whether it is the right way to do it.

    I need to do this because my code becomes too long for many repetitions.

    I think for this, will have to use loop and the function.

    Thank you.

    You might have better luck if you describe what it is you are trying to do, rather than how you try to do, because it is not obvious (to me at least) exactly what your code is supposed to accomplish.

    Dan

Maybe you are looking for

  • Spectrum 13 2016 HP: CompatibleHi Docking Station

    Hello I need to know what dock is compatible for my spectrum of hp. If zbook dock is compatible for my crush 3 and USB - c? I need a dock that can do two output screen. is love at first sight dell 3 compatible dock?

  • NVIDIA driver causes my computer to freeze

    I have a HP Media Center PC 7360n. It is a windows XP model.  It freezes or crashes sometimes unless I have disable the video driver.  If I uninstall the driver and restart, the computer is fairly stable, as long as I don't change the video settings.

  • The satellite C670D-109 need recovery disk

    HelloI need recovery disk for my laptop because my hard drive crashed and I had to replace it with a new one. How can I do? Drive recovery hard file I was able to save her...

  • does not recognize the memory stick or mp3 player

    Can anyone help? I am trying to use an mp3 player, but when I click on it in my computer, that a message appears saying that the disk in drive g is not formatted do format you it now. The same thing seems whem I plug in my memory stick. When I tried

  • Installation of East Asian languages files

    When I inserted my Microsoft Office XP Professional disk in my computer to install the files for East Asian languages, my computer still says I need to insert the disc. I can't find a way to install the files without the disc, despite the search the