variable in a movieclip name

Hello, being a beginner I am still getting the syntax rules ACEs... could someone help, please?

1. I have a variable called "num" that has a different value (1 to 6) the chronology of the scene repeats itself every time

NUM = Number (random (6) + 1);

2 here, I would like to use the "num" value in a movieclip name (number of 'container' must change according to the value of "num")

unevariable = 1 _mc.cont 1 _txt container;

How can I use the value 'no' inside the names of movieclip ( 1 in the example above replacement)?


:

Tags: Adobe Animate

Similar Questions

  • movieClip name inside the Variable

    What is the problem with this part of my code?

    I am trying to use a variable (which will eventually be linked to a table, but not baby in AS3) to House a movieClip name and then use this variable in tweens, filters and others.

    //

    glowColor var = "0xFFFFFF";

    var glowAlpha is. 75;

    var glowBlurX = 25;

    var glowBlurY = 25;

    var glowStrength = 2;

    var glowQuality = 2;

    var glowInner = false;

    var glowKnockout = false;

    //

    var mcName = "mcUnitedStates."


    mcWorldMapBottom.this [mcName] .filters = [new GlowFilter (glowColor, glowAlpha, glowBlurX, glowBlurY, glowStrength, glowQuality, glowInner, glo wKnockout)];

    I get an error:
    1084: syntax error: expecting identifier before that.

    You don't want to throw a he in the middle.  I don't know what the rest of the script implies, but it may be that just you:

    mcWorldMapBottom [mcName] .filters =...

  • How can I insert a Fileglobals Variable in a stage name

    Hello everyone,

    I'm curious to know, is it possible to insert a FileGlobals variable in a step name, be it Action, Pass/Fail, limit digital test or what you have.  An example would be "paragraph 1.0 running # {variable} execution" were variable would be an incremental number, whether it's a loop for or any other type of senario.  Thanks in advance for any information you can offer.

    Kind regards

    Scott

    Hi jigg,.

    Thanks for the reply.

    I tried and I thank you.  It does exactly what I was hoping to do.  Thank you very much.

    Kind regards

    Scott

  • Using variables such as table names. Ideas for alternative designs

    Hello

    I am the design of an application that uses synonyms to pull information from the 'client' DBs via links from DB. Synonyms are created with a DB_ID in name (example: CUSTOMER_100, CUSTOMER_200... where the 100 and 200 are DB IDs of 2 separate DBs customer.)

    I have a procedure that selects data in the synonym based on what DB_ID is passed to the procedure. I want to be able to perform this procedure for any entered DB_ID. I know now I can't use variable for the table names names and using EXECUTE IMMEDIATE does not seem suitable for what I'm trying to do.

    Does anyone have suggestions or re-design options, I could use to achieve this generic procedure which will select a certain synonym based on the information of DB input parameters? Thank you.

    CREATE or REPLACE PROCEDURE CUSTOMER_TEST (p_host IN VARCHAR2, p_db_name IN VARCHAR2, p_schema in VARCHAR)

    IS

    v_hostname VARCHAR2 (50): = UPPER (p_host);

    v_instance VARCHAR2 (50): = UPPER (p_db_name);

    v_schema VARCHAR2 (50): = UPPER (p_schema);

    v_db_id NUMBER;

    v_synonym VARCHAR2 (50);

    CURSOR insert_customer

    IS

    SELECT

    c.customer_fname,

    c.customer_lname

    OF v_synonym_name c;

    BEGIN

    -MADE BASED ON INPUT PARAMETERS DB_ID

    Select d.db_id

    in v_db_id

    of t_mv_db_accounts ac.

    t_mv_db_instances I,.

    t_mv_dbs d,

    t_mv_hosts h

    where ac.db_ID = d.db_ID

    and i.db_ID = d.db_ID

    and i.HOST_ID = h.host_id

    and upper (H.HOST_NAME) = v_hostname

    and upper (D.DB_NAME) = v_instance

    and upper (Ac.ACCOUNT_NAME) = v_schema;

    -ADD DB_ID TO NAME SYNOYNM

    v_synonym: = 'CUSTOMER_ | v_db_id;

    FOR cust_rec IN insert_customer

    LOOP

    INSERT INTO CUSTOMER_RESULTS (First_Name, Last_Name)

    VALUES (cust_rec.customer_fname, cust_rec.customer_lname);

    END LOOP;

    COMMIT;

    END;

    /

    RGS,

    Rob

    EXECUTE IMMEDIATE ' INSERT IN CUSTOMER_RESULTS (First_Name, Last_Name) SELECT customer_fname, customer_lname FROM ' | v_synonym;

  • Statements of target event JavaScript mouse: [MovieClip (name = null)]

    I'm trying to get the name of the object that ended the mouse
    I have:

    function myFunc(e) {
    alert (e.target);
    }
    this.myObject.addEventListener("mouseover", myFunc.bind(this));
    

    instead of return myObject returns [MovieClip(name=null)]
    I disabled mouseChildren myObject

    Yes, canvas mode does not have the property name for a reason any. This has been discussed here:

    Animate CC/Createjs properties of the clips/instances/bitmaps are null

  • How to use a value in a variable as a table name in a query?

    I fetch a value in a variable like:

    < select application_short_name in the fnd_application l_appl_nm where application_id =: p_appl_id >

    Now, I need to use the value retrieved in the variable "l_appl_nm" as a name of partition table in the following query.

    Anyone can guide me please on this concept.

    Expected answers as soon as possible!

    Create dynamic SQL statements with your variable, and then run this SQL with the "EXECUTE IMMEDIATE" command.

    Thank you

    Lokesh

  • using the variable as a field name in a query

    Oracle 10G


    Hi all

    I have a table like:

    TEST_MSL
    CID NUMBER (10),
    TEST_1 VARCHAR2,
    TEST_2 VARCHAR2

    Now, I want to use a procedure such as:

    create or replace procedure TEST
    (VARIABLE_1 IN VARCHAR2) Possible values (TEST_1, TEST_2)
    as
    BEGIN

    declare
    cursor c1 is
    Select the CID
    where VARIABLE_1 = 'BLAH '.

    My problem is:

    How can I use this variable as a domain name?

    Kind regards

    Menk Slot

    Published by: Menk slot on June 3, 2010 10:46

    If you know that there are only two possibilities so preferable to use as static SQL statements

    procedure test(v_cloumn_name varchar2) IS
    IF v_column_name='TEST_1' THEN
    SELECT CID INTO var where TEST_1='BLABLA';
    ELSE
    SELECT CID INTO var where TEST_2='BLABLA';
    END;
    

    Otherwise, use Ref cursour as

    declare
    v_sql_stm varchar2(200);
    refcur sys_refcursor;
    begin
    v_sql_stm:='SELECT CID FROM TEST_MSL WHERE '||v_cloumn_name||' = ''BLABLA''';
    open refcur for v_sql_stm;
    
  • MovieClip name variable

    I have only one scene with MovieClips using secondary scenes. Inside the image, I have a MovieClip that contains the Menu "buttons"(MovieClips agissant comme deles de boutons). "»

    Since the Menu buttons, I'm trying to access frame labels inside of the "slips" who live at the same level as the MovieClip Menu. Menu and Slide 1,2,3 are all brothers and sisters.

    I'll put 'Slovak' in the Menu when the user clicks on a button I would like to pass the path of the slide label.

    I can get things hardcoded a name of coding, but I can't understand how to move the stored variable.

    For more convenience, the value of the Slovak var is a string containing the exact name of the slide.

    Here's the code to work:

    MovieClip (this.parent.getChildByName ("Slide3")) .gotoAndPlay ("slide_out");

    I need:

    MovieClip (this.parent.getChildByName (VARIABLE VALUE)) .gotoAndPlay ("slide_out");

    How can I pass the variable here?

    Thanks in advance.

    I don't understand what the problem is. To use a variable instead of a string, you just put the name of the variable in place of the string.

    MovieClip (this.parent.getChildByName (Slovak)) .gotoAndPlay ("slide_out");

  • Create Variables based on the name of the Instance

    I have a class called distributor that I use on several different items in my project. They are all objects in two positions (circuit-breakers and switches) where I hide or show the chart of alternatives for the object. What I want to do is instead of using my variable "distributor", I wish it were a dynamic variable that changes based on the name of the instance of the object in question. I use the "this.posOne.visible = true;" given that an instance name of a clip inside the object that corresponds to posOne and posTwo. I guess that there is a way to make a this.instanceName or something to that effect, but I'm not sure. If I put the name of the instance of the circuit breaker to "cb1", I would like to than the variable to change to "cb1". This way I can use the same code for all my electrical appliances, but are able to trace their individual to simulate the flow of current on the drawing.

    "the package classes.comps.

    {

    import flash.events.MouseEvent;

    import flash.display. *;

    public class distributor extends MovieClip

    {

    public var twopos:Boolean = true;

    public void twoPosition()

    {

    the constructor code

    addEventListener (MouseEvent.MOUSE_DOWN, twoPosClick);

    buttonMode = true;

    }

    function twoPosClick(evt:MouseEvent):void

    {

    If (twopos)

    {

    this.posOne.visible = false;

    this.posTwo.visible = true;

    twopos = false;

    }

    on the other

    {

    this.posOne.visible = true;

    this.posTwo.visible = false;

    twopos = true;

    }

    }

    }

    }"

    because, from what I know, all your symbols have kid instances posOne and posTwo and they all work the same, none of them do need their own class.  they can all have the same base class (for example, TwoClass):

    :

    package {}

    import flash.display.MovieClip;

    import flash.events.MouseEvent;

    SerializableAttribute public class TwoClass extends MovieClip {}

    public void TwoClass() {}

    each of your symbols has a posOne and a posTwo instance.

    I don't know which instance reflects what should be the initial state of each symbol, but if it is posTwo, use the following.  If the initial state is posOne, use this.posTwo.visible = false in the constructor.

    this.posOne.visible = false;

    each sybmol must have a mouse to the bottom of the headset with active mode button

    this.addEventListener (MouseEvent.MOUSE_DOWN, posTwoClick);

    this.buttonMode = true;

    }

    private void posTwoClick(e:MouseEvent):void {}

    the following two lines of code to toggle the visible property of the posOne and posTwo.

    this.posOne.visible =! this.posOne.visible;

    this.posTwo.visible =! this.posTwo.visible;

    }

    because you want the 'position' to be accessible outside the class, getPositionF is public and returns a string that reflects if posOne or posTwo is visible (or if this symbol is "off" or "on").

    public function getPositionF (): String {}

    {if (this.posOne.visible)}

    Return this.posOne.name;  or, the return of 'off '.

    } else {}

    Return this.posTwo.name;  or, back "on".

    }

    }

    }

    }

  • attachMovie using variable target and source names

    I have frequently used the names of variables for the target, but is it not possible to do this:

    holder.attachMovie (["mcButton" + i], ['zone' + i + '_btn'], this.getNextHighestDepth () * 200, {_x: arrBtnX [i], FLF: arrBtnY [i]});

    I can't make it work and I was not able to find an example.  It does work without the square brackets either.

    Thank you

    Marion

    If trace (btnHldr ["box" + i + "_btn"] ._x) is set during each loop, btnHldr ['box' + i + '_btn'] exists, at least, in each loop.

    the fact that you don't see all the btnHldr ['box' + i + "_btn"], means either:

    1. they are not visible for a variety of reasons or,

    2. you're crushing your depths and movieclips previously created are deleted.

    to debug, use:

    trace (btnHldr ["box" + i + "_btn"] .getDepth ())

    in your loop for to see what you're doing.

  • Dynamically create a movieclip name

    I have a series of small clips (about 100 of them, cannot be created when running) already exists in my main movie.
    These were name of A1 A100. I have to refer to one of these clips according to a calculated value to run from 1 to 100. I don't want to use a switch & case statement, because there would be too many of them.
    How do I create a movieclip variable in AS and assign one of the existing movieclips as the real object?
    For example, I tried:
    var MCobj:MovieClip = 'A' + calculatedNumber;
    But this does not create a valid reference to the existing MC. Any ideas?
    Thank you

    use array notation to help solve your chain in a flash movieclip:

  • read the value of the variable knowing only one name

    Is there a way to read a variable value of knowing only the label name? I have 11 Labview and am to read a text file with a list of variable labels and try to read the value without having to create a structure of matter of hundreds of variables.

    Are we willing?

  • How to use a variable as a column name in a select statement

    Hello, I am using

    Oracle Database 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production

    PL/SQL Release 11.2.0.3.0 - Production

    I have a procedure looking for groups that have not been updated for the current month. The columns are month_01, month_02, month_03 etc. I'm becoming if I can automate every month, but I need to be able to use a variable as the name of the column for the month. Can someone help me with this?

    Example of Table

    CREATE TABLE TEST_TABLE
    (
      IDENTITY_CODE      NUMBER(10),
      YEAR_S             NUMBER(5),
      MONTH_01           NUMBER(18,2),
      MONTH_02           NUMBER(18,2),
      MONTH_03           NUMBER(18,2),
      MONTH_04           NUMBER(18,2),
      MONTH_05           NUMBER(18,2),
      MONTH_06           NUMBER(18,2),
      MONTH_07           NUMBER(18,2),
      MONTH_08           NUMBER(18,2),
      MONTH_09           NUMBER(18,2),
      MONTH_10           NUMBER(18,2),
      MONTH_11           NUMBER(18,2),
      MONTH_12           NUMBER(18,2) 
    );
    INSERT ALL
    INTO TEST_TABLE VALUES(640,2015,124,123,125,126,127,128,547,888,987,567,145,685)
    INTO TEST_TABLE VALUES(098,2015,587,874,0,587,652,222,444,777,885,999,657,547)
    INTO TEST_TABLE VALUES(608,2015,587,874,687,587,652,222,444,787,885,999,657,547)
    select 1 from dual;
     

    Here's my current procedure

    CREATE OR REPLACE PROCEDURE RRM_EMAIL_NOTIFICATION IS
    
    v_output VARCHAR2(10000);
    v_message VARCHAR2(1000);
    v_date date;
    cursor v_check is 
    SELECT *
      FROM (SELECT '640' AS ds FROM DUAL
            UNION ALL
            SELECT '098' AS ds FROM DUAL
            UNION ALL
            SELECT '608' AS ds FROM DUAL
            UNION ALL
            SELECT '618' AS ds FROM DUAL
            UNION ALL
            SELECT '617' AS ds FROM DUAL
            UNION ALL
            SELECT '614' AS ds FROM DUAL
            UNION ALL
            SELECT '610' AS ds FROM DUAL
            UNION ALL
            SELECT '616' AS ds FROM DUAL
            UNION ALL
            SELECT '643' AS ds FROM DUAL)
    WHERE LPAD (ds, 3, '0') NOT IN
              (SELECT DISTINCT (SUBSTR (IDENTITY_CODE, 2, 3)) AS Blah_Blah_Blah
                 FROM TEST_TABLE
                WHERE     month_03 <> 0
                      AND year_s = 2015
                      AND (   SUBSTR (IDENTITY_CODE, 2, 3) = '640'
                           OR SUBSTR (IDENTITY_CODE, 2, 3) = '098'
                           OR SUBSTR (IDENTITY_CODE, 2, 3) = '608'
                           OR SUBSTR (IDENTITY_CODE, 2, 3) = '618'
                           OR SUBSTR (IDENTITY_CODE, 2, 3) = '617'
                           OR SUBSTR (IDENTITY_CODE, 2, 3) = '614'
                           OR SUBSTR (IDENTITY_CODE, 2, 3) = '610'
                           OR SUBSTR (IDENTITY_CODE, 2, 3) = '616'
                           OR SUBSTR (IDENTITY_CODE, 2, 3) = '643'));
    
    BEGIN
    v_date := SYSDATE;
    open v_check;
    loop 
    fetch v_check into v_output;
    exit when v_check%NOTFOUND;
    v_message := v_message || chr(13) || v_output;
    END LOOP;
    close v_check;
       
    send_mail('The RRM one-time initiatives that have not been processed for '||v_date|| ' are ' || chr(13) ||v_message,'[email protected]','RRM ONETIMES NOT PROCESSED FOR ' || v_date);
       
    END RRM_EMAIL_NOTIFICATION;
     

    I need to be able to substitute the name e.g. MONTH_01 with a variable column so that it will be MONTH_ | "" some months "

    A variable can be created as v_month: = 'month_ | TO_CHAR (T_DATE, 'MM')

    If I'm not mistaken that should come out as month_03 for March

    The output should be in an email as follows:

    Capture.JPG

    Something like:

    CREATE OR REPLACE PROCEDURE RRM_EMAIL_NOTIFICATION IS

    v_output VARCHAR2 (10000);

    v_message VARCHAR2 (1000);

    date of T_DATE;

    v_check SYS_REFCURSOR;

    BEGIN

    T_DATE: = SYSDATE;

    Open the v_check FOR

    Q' {}

    SELECT *.

    FROM (SELECT '640' DS DUAL FROM

    UNION ALL

    SELECT '098' LIKE ds FROM DUAL

    UNION ALL

    SELECT '608' LIKE ds FROM DUAL

    UNION ALL

    SELECT '618' LIKE ds FROM DUAL

    UNION ALL

    SELECT '617' LIKE ds FROM DUAL

    UNION ALL

    SELECT '614' LIKE ds FROM DUAL

    UNION ALL

    SELECT '610' LIKE ds FROM DUAL

    UNION ALL

    SELECT '616' LIKE ds FROM DUAL

    UNION ALL

    SELECT '643' DS DUAL FROM)

    WHERE LPAD (ds, 3, '0') NOT IN

    (SELECT DISTINCT (SUBSTR (IDENTITY_CODE, 2, 3)) AS Blah_Blah_Blah

    FROM TEST_TABLE

    {WHERE month_}' | TO_CHAR (T_DATE, 'MM') | Q'{ <> 0

    AND year_s = 2015

    AND SUBSTR (IDENTITY_CODE, 2, 3))

    '640'

    '098'

    , ' 608 "

    '618'

    '617'

    '614'

    '610'

    '616'

    '643')

    )

    }';

    loop

    extract the v_check in v_output;

    When the output v_check % NOTFOUND;

    v_message: = v_message | Chr (13) | v_output;

    END LOOP;

    close v_check;

    send_mail ("one-time initiatives the RRM that haven't been treated for ' |") T_DATE | «are» | Chr (13) | v_message,' [email protected]',' ONETIMES UNPROCESSED for RRM ' | T_DATE);

    END RRM_EMAIL_NOTIFICATION;

  • Variable to a Movieclip

    In my time, I have a movieclip ("Animation01"). To read this movieclip, I have an another movieclip ("movPlayStop"), in which a 'play' ('BtnPlay') button and a stop button ("BtnStop") are nested. When the user presses the key Play ("BtnPlay"), the movieclip ("Animation01") begins to play.

    Explanation01.jpg

    I have a movieclip ("Animation #") by frame in the main timeline. When the movieclip ("Animation01") ends, the main timeline jumps to the next section where the concentration change to movieclip ("Animation02"). This process continues for the duration of the project, where the current movieclip ("Animation") ends and moves to the next movieclip ("Animation").

    The question arises with the Play ("BtnPlay") button. Currently, it is written that when clicked it play the movieclip ("Animation01").

    (This.parent) MovieClip. Animation01.play ();

    This does not really work when I want to refer to one another movieclip other than ("Animation01"). Instead of the key Play (BtnPlay) call Animation01, I want to call a variable in its place. I would create the variable ('cFrame") in the main timeline. Its value référenceriez the movieclip ("Animation #") for the current frame. I would then use this variable within the playback button (BtnPlay).

    Explanation02.jpg

    How can I go about writing the variable? How to use this variable within the function of the button Play?

    MovieClip (this.parent) [cFrame]

    will force the cFrame variable of string to an object.

    or using getChildByName():

    this.parent.getChildByName (cFrame);

  • getChildByName - access to an instance of movieclip name inside

    It works:

    layerMenu.duplicateMov (LHolder.L1Holder, layerMenu.getChildByName ("layer1"));

    It does not work:

    layerMenu.duplicateMov (LHolder.L1Holder, layerMenu.getChildByName ("layer1"). L0Dup);

    L0Dup is an instance name of the movieclip inside the getChildByName ("layer1")

    Clues for a workaround?


    Thus, flash can't you boxes can be an object of class displayobjectparent.  If any other potoential questions I listed in message 3 do not apply, use:

    layerMenu.duplicateMov (LHolder.L1Holder, Box (layerMenu.getChildByName ("layer1")) .getChildByName ("L0Dup"));

Maybe you are looking for