I need to use a variable in place of the name of the instance

I have a MC with sub of instance name that has a MC with instance name 9 in.

I'm using AS3

var itemNo: String;

Sub.Item9.addEventListener (MouseEvent.ROLL_OVER, handleRollOver9);

function handleRollOver9(e:MouseEvent):void {}
itemNo = e.target.name;
trace (itemNo);


void. itemNo.removeEventListener (MouseEvent.ROLL_OVER, handleRollOver9);
void. itemNo.gotoAndPlay ("s2");
void. itemNo.addEventListener (MouseEvent.ROLL_OUT, handleRollOut9);
}

When I trace itemNo it returns 9 is what I want to spend in the last 3 lines.

in the last 3 lines if I replace itemNo by 9, it works.

This is what I get in the output window:

9
TypeError: Error #1010: a term is undefined and has no properties.
at test1_fla::MainTimeline/handleRollOver9() [test1_fla. MainTimeline::frame1:25]

also I tried to use e.currentTarget.name which did not help.

Use the scoreboard operator to force the flash to fix ropes to objects.  but in your case, use:

Sub.Item9.addEventListener (MouseEvent.ROLL_OVER, handleRollOver9);

function handleRollOver9(e:MouseEvent):void {}
        itemNo = e.target.name;
        trace (itemNo);

e.currentTarget.removeEventListener (MouseEvent.ROLL_OVER, handleRollOver9);
e.currentTarget.gotoAndPlay ("s2");
e.currentTarget.addEventListener (MouseEvent.ROLL_OUT, handleRollOut9);
}

Tags: Adobe Animate

Similar Questions

  • Report query: I need to use a variable as domain name

    Hello everyone,
    Perhaps my question is very basic, sorry in advance if this is the case.

    My report query contains something like:
    «... and 'field_name' = 1...»
    'field_name' is not fixed but depends on a variable that is defined by a search form, let's say: field_name_search
    I don't know which I should use to include syntax: field_name_search in the above report query.

    Thank you.

    Eugenio

    Hello

    You need not actually double quotes for the names of simple objects.

    No matter what REPLACEMENT function you used would work on the content of the channel and would be regarded as a normal SQL - so the effect would be the same if you use it (unless, by chance, there was a quote in the string itself), in other words, you would still end up with a string not a fieldname.

    Andy

  • Use a variable to reference a text box in an instance

    Hello

    I have been enjoying the discussions on this forum and have learned much from them so far.

    I have a question, but I don't know if I have that Word correctly, or I looking in the wrong place.

    Let's say I have 3 Movie Clip symbols in my library: Movie0 Film1 and Movie2

    Each film has a dynamic text box: "TextBox1".

    I want to be able to write a function that can manipulate the alpha(or any attribute) of the TextBox1 in all three clips.

    In my limited experience, I thought I could do something like the following:


    for (var row: int = 0; line < dataArray.length; line ++)

    {

    Movie (row). TextBox1.alpha = 1;

    }

    I hope that this loop 3 times and the value of the TextBox1 alpha in all three movies at 1.

    Is this possible? You can reference an instance with the use of a variable?

    All advice is greatly appreciated.

    See you soon!

    You say that these clips are in your library, so no code can affect them while they are there, except for dynamically creating instances of them and place them on the stage.

    So I guess you're saying that you have dataArray.length number of clips on the stage with the instance names following the naming scheme you have indicated:

    for (var row: int = 0; line)< dataarray.length;="">
    {
       This ["Movie" + String (Row)]. TextBox1.alpha = 1;
    }

  • To download a copy of Photoshop CS5 on a new laptop, I need to use one email address other than the one I originally used to purchase the product

    I bought Photoshop CS5 to my son in 2012.   At the time of the purchase, I used the e-mail < deleted by the moderator > sometime in early 2014, I was no longer able to access my Hotmail address.

    At the end of August 2015, my son bought a new laptop.   He asked me the password of my email are deleted by the moderator >what I knew is no longer.   He said he had to provide to Adobe in order to initiate the download process.

    I was told by Adobe customer service to create an Adobe Id and register my new email addresses are deleted by the moderator >' and 'are deleted by the moderator > what I did.

    My son is still unable to download Photoshop CS5 using one of these e-mail addresses.   Can you please help.   I tried to solve this problem since September of 2015.

    Thanks, Mike

    The software is available free for download at any time of

    Download Adobe Creative Suite 5 products

    It can be downloaded and installed as a 30 day trial.

    To unlock the trial, enter a valid serial CS5.

  • I need to use my keyboard to type not the screen about how keyboard can return to manual keyboard

    I have this type of manual not by touch screen how can I remove this

    Reach

    Control Panel, easy access

  • You can use a variable as a variable name as you can do it in Perl?

    So say there are 10 clips on the stage, each named mc1 mc2 mc3 etc. I have a function that sends the name of a movieclip in a public class, and I need to be able to change the image of this movieclip according to the string that is sent. Say so my class is the function declaration:

    moveFrame (theMovieClip);

    where theMovieClip is the object returned by another function.

    Is it possible to use this variable somehow?

    The concept of what I'm trying to do:

    function moveFrame (s) {}

    s.gotoAndStop ("the framework law");

    }

    Who is? Is this possible or should I find another solution?

    If the argument of the function (s) pointing to the object, then your code as shown should work.

    s.gotoAndStop ("the framework law");

    If the argument points to the name property of the object, then you will need to use the getChildByName() method to target the instance.

    this.getChildByName (s) .gotoAndStop ("the framework law");

    If the argument is a string version of the name of the instanceobject, you can use the support rating to target the object...

    This [s] .gotoAndStop ("environment law");

  • Using XQuery with PL/SQL, link the Variable

    I am only able to find an example of use of xquery with pl/sql.

    [http://www.comp.dit.ie/btierney/oracle11gdoc/appdev.111/b28369/xdb_xquery.htm#CBAEEJDE]

    Why is what they show only using bind variables? It's the only way it should be used, it provides a performance gain more simply by using the crossing clause and a passing beam a PL/SQL variable? I'm looking to implement a solution for my company using Xquery in PL/SQL. I am concerned that these procedures will be called during a flow of the user interface and performance it must be as soon as possible.

    A PL/SQL variable, column, or the output of another operation would be all be equivalent to a connection variable that PL/SQL compilation is concerned. Which would be bad practice would be to build in XQuery with the predicate hardcoded in the XQuery operation whenever the XQuery query has been run.

  • Using a variable as a SELECT field

    I try to get shipping to a different weight and postal codes. I query a table to get a zip code provided by the user area. This works. Then, I want to use this area to retrieve the shipping cost for a specific weight of another table. I put the box as a variable and use it as follows: SELECT #Zone # FROM Ground WHERE Wt = weight # #. If I use the name of the actual area instead of the variable, everything works fine. When I use the variable, however and try out of her results with the variable #Zone #, I get the original name in the field name box, not the rate that is listed under this domain name

    It is good to use a variable of the way I have? If so, how to get the result? If not, is there another way to get a field name for a query from another query? Thank you.

    You can use a variable to dynamically change the select field, but it is rarely a good idea.
    Here's how you would do in this case:


    SELECT
    #Zone # AS ShippingEstimate
    Of
    On the ground
    WHERE
    WT = #weight #.


    #weight # kilograms, to the shipping area: #Zone #, cost #MaintenanceNightmare.ShippingEstimate # Euros.



    The suggestion to normalize your database, was a good thing.

  • When we need to use a query variable and how to use it?

    Hello

    When we create a line of dashboard, we set the variable, there are two types: variable presentation and application.
    I'm confuse when we need to use a query variable and how to use it?

    Thank you
    Anne

    Hello
    The variable 'demand' can be used if you want to use session related information specific to you.

    See below a:
    http://gerardnico.com/wiki/dat/OBIEE/logical_sql/obiee_set_request_variable_dashboard_prompt

    FYI... example of
    for the example query variable (a good post Nico)

    http://gerardnico.com/wiki/dat/OBIEE/set_variable

    for the variable of presentation with example

    http://gerardnico.com/wiki/dat/OBIEE/presentation_variable

    Thank you

    Deva

  • Use PHP Variables between pages: Session, URL, or Get

    Hello

    For our association, I developed a registration page.  Registration pages insert a record into a mysql database, using php.  After the user submits the form (by using $post), I want to be redirected to the confirmation page where a mysql database query is executed to retrieve the record, the Member has been added.

    To pass the variable, I have developed the following pages using a session variable.

    Registration page: http://www.aosweb.org/member_dues.php

    Confirmation page: http://www.aosweb.org/member_view.php

    Although I asked recently changes to the code, it worked at the same time.  The forum was helpful to get the information I needed.  At this point, the redirect, and the passage of the session variable does not work.  It seems that the available on the page member_view session variable is of the last inserted record.  Thus, the query that is run on member_view returns no result.

    I checked some of the forum posts, such as:

    -php url parameters

    -How to pass parameters of form to confirm page...

    -php help registration page!

    My questions outstanding are as follows:

    1 have I placed the order to set the $_session ('sv_mem_num') in the right place.

    2 should I consider another method such as a URL or by using the Get method parameter.

    Thank you.

    George

    $insertGoTo = ' member_confirm.php? mark = ". $_POST ['Member_Num']. » « ;"

    If (isset {}
    $insertGoTo. = (strpos ($insertGoTo, '?'))? "&" : "?";
    $insertGoTo. = $_SERVER ['QUERY_STRING'];
    }

    What is happening is that the Dreamweaver code is looking for an existing query string and add it. The problem is that you put a query string in your redirect page, which translates as the ampersand is added at the end. That's how I want to change it:

    // set the redirect to the target page without a query string
    // then let Dreamweaver check for an existing query string
    $insertGoTo = "member_confirm.php;
     if (isset($_SERVER['QUERY_STRING'])) {
     $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
     $insertGoTo .= $_SERVER['QUERY_STRING'];
     }
    
    // if a query string has been added, add the memid at the end
    // otherwise, create a query string to add memid
    if (strpos($insertGoTo, '?')) {
     $insertGoTo .= '&memid=' . $_POST['Member_Num'];
    } else {
     $insertGoTo .= '?memid=' . $_POST['Member_Num'];
    }
    
  • Variable overall station by the object to be measured using a model of batch process

    Hello

    I have 4 DUT which is tested by using individual ports of com I use global variables Station 4 to store 4 Com ports - COM port assignments are in no particular order and vary depending on the test PC station.

    Example:

    S1 = Com12

    S2 = Com14

    S3 = Com10

    S4 = Com9

    Using a model of batch process I want to test DUT all at the same time: I'm trying to understand what is the best/better way to S1 to S2 for UUT2, UUT1 and so on!

    Any help appreciated.

    Thank you best regards &,.

    Shane.

    The easiest way is to use the property Runstate.TestSockets.MyIndex to index a table.  Each socket of the batch will get an index (from 0 to n - 1, where n is the number of sockets) when it is created.  You can create an array (of strings? I can't tell if you just have channels or need a container) and use the property for the index in the array.

  • Use of Variables shared with RT-project / home-VI

    Hi all

    I have a small question which is certainly easy to answer for those who have already worked with a RT - VI containing two periods loops and a user interface that is deployed on a host PC.

    Q: is there an advantage to the data acquisition in the urgent loop by using a variable shared unique process (active FIFO) and then through the data on the host computer the nondeterministic loop simply through a shared network-published (new FIFO active) variable that directly passes the data on the host PC?

    Thanks in advance,

    David

    Hi Kolibri,

    The advantage of having the network publishes the variables in your non-deterministic loop as opposed to the evanescent loop is that it reduces the resources needed to perform the evanescent loop.

    Send the data to a different loop in the same program with unique shared variable or process with RT FIFOs requires fewer resources than to send data over the network. This allows the loop of high priority execute more deterministic way, without having to manage communication networks.

    Kind regards

    Stephen S.

  • How to use NI9474 and cdaq9172 to generate the right variable cycle pulse 1 kHz

    Hello, I would like to use a NI9474 (in a cdaq9172 chassis) to send a square with a frequency of 1 kHz wave. The cycle will change just about every second (based on NI9205 voltage readings in all separate loop, by controlling the local variable 'duty'). It is important to have a temporal resolution of decent output; that is the difference between 50% and 51% of duty cycle must be determined. 9474 says that it has a speed of 1, so I expect that this is possible. This is used for a buck converter. The output is switching on and off a MOSFET, which only needs 5 volts, and less than a mA, when on. I tried a "simulate" with a square wave signal using a frequency of 1 kHz and 100kS/s and introduced in a DAQ assist with dynamic data to the converter Boolean between (probably not the best approach I admit). I tried also implemented using the DAQmx screw (without help). In both cases, I got an error that says that I need an external clock. I know that the chassis has an internal counter. This could be used for synchronization? I looked at examples of Pulse counter, but which seems to be to use a meter as output, not a digital channel, so I'm a little confused. The numeric examples do not seem to be what I want either. If I can't use the chassis for synchronization, it is possible, that I could get a NI9401. Could I use this counting or establishment of a clock (I could attach a function generator using a square wave of 1 Mhz for example)? For example with a 1 Mhz clock, then for a 50% duty cycle signal 1 kHz, after 500 clocks range from low to high and high to low after the other 500, (or 510 and 490 in 51% duty). Is something like that possible? Thanks for any advice, Thomas I should confess do not understand the things of meter too well at this point. Many of the examples I've seen, are apparently complicated screws.

    Hi Thomas,

    You can certainly do with a counter pulse train generation by using your 9474 in a cDAQ-9172 chassis.  Make sure that the module is in the slot 5 or 6 (latest chassis do not have this restriction).  Examples of pulse train located in the finder example under entry and exit-> DAQmx hardware-> generating digital impulses.  The example of Gen dig Pulse Train - Continuous.vi is probably in the neighborhood of what you want.

    To update the market on the fly factor, write the Co.Pulse.DutyCyc channel property after the task starts.

  • Why LabVIEW example projects using Global Variables?

    I'm puzzled.  I've been pretty good programmers LabVIEW talks (including some who work for the OR) and came away with the impression that Global Variables should, as a general rule, be avoided, with functional Global Variables (alias VI Globals) generally preferred for "local memory".

    I have studied some of the example distributed with LabVIEW, 2012 and 2013, in particular the proposed acquisition in real time and am struck by the use of Global Variables, where I'd be inclined to use instead a FGV.  For examples, to stop all the loops on the RT target, the overall "All the RT loop Stop" is defined; 'Constants' of configuration (such as timeouts, Streme network names, the names of the journal folder) are kept as Globals; Streme network endpoints are stored in Globals.

    [Note - there is a weird spelling of the second word of the network Streme, above - when I tried to post with the correct spelling, I got an error message saying this word is 'not allowed in this community".]  I apologize for the offense, but I must confess that I do not understand what the problem with the help of the spelling of this word...]

    Why use Globals in these cases, rather than write a bunch of VIGs to hold these data?  Note that almost all these Globals are 'Read' essentially (written once when a resource is acquired, for example) or "Read Only" (treated as if they were a constant).  Indeed, read-only variables can be written as a Subvi with only an output terminal, acting as a (visible, due to the icon) constant.

    I can see advantages to this approach.  On the one hand, VIGs can have error bounds who run the data flow (I just spotted a bug "data flow" in code, I am developing that is based on this model, to read configuration data to an XML file in a world and in the same VI, Global wiring to a "use - me" terminal, but with no guarantee that I'll read the overall after I write it).

    It is, I suppose, a matter of 'speed' - perhaps Global Variables are 'faster' than VIGs (especially if the VIG 'sits' on an error line).  My thought, however, is that this difference is likely to be trivial, especially as these VIGs (or Globals) tend to become "occasional" calls (with the exception of the indicator 'all the loop Stop' which is called once per line).

    Are there other arguments or considerations that make a Variable global to a better choice than a VIG?  Is there a reason that LabVIEW developers put in these start-up of projects LabVIEW?

    BS

    I have to ask, how do you use functional Global Variables?  Like just a Get and Set?  If so, you can use a global variable.

    Yes, globals are faster and use much less overhead.  At the summits of CLA in recent years, we talked about using globals.  The most common use is for Write-Once-Read Many and writing-never-Read Many with configuration data.  It's a good idea to use globals with the constants that can change on you.  It turns out that the world will have the same performance as a constant in this case.  This is done so that you don't have 1 place to edit the 'constant '.

    The rule on "Globals are evil" actually goes back several years when NEITHER had the huge "people of the country are bad" vendata.  But NEITHER explains well how to do things properly.  So I found people, instead of using local variables, using the value property node.  It's even worse because the property causes thread swaps and kills your performance.  It wasn't until I shouted to people to use wires and shift registers I have seen improvements in the way in which people wrote their code.  So people are always riffling in the use of globals and decided to use FGVs with the EEG and fixed rather cases.  But this does not solve the problem of the conditions of race with critical data and you cause an additional burden.

    So from my experience, I use globals all the time for configuration data.  Yes, you must be careful about the race conditions.  But as long as you understand that it is a common and useful practice.

    I would not use a global variable for data that are constantly changing (use registers to offset or Action motor) and/or processes that have critical sections of code (use a motor of Action).

    NOTE: I use the definition of Mercer to FGV (a Get/Set only) and motor Action (many cases which specifically affect the data).

  • How are added to my network WPA2-PSK authentication settings? I need to log on to my place of work.

    How are added to my network WPA2-PSK authentication settings? I need to log on to my place of work.

    original title: WPA2-PSK

    tblack1970,
    Thank you for visiting the Microsoft Answers community forum.

    This should be something that your wireless adapter on your computer supports, or does not work.  It is not a feature of Vista, but the network hardware.  When your wireless adapter on your computer sees the router which has the active Protocol, it must ask the key and once offers you the key, it needs to connect.  If you do not see this option for your network card, then you should contact the manufacturer.

    http://windowshelp.Microsoft.com/Windows/en-us/help/b385cc8a-AF25-489e-a82e-decf6df26b681033.mspx#ECC
    What are the different wireless network security methods?

    If you plan to have a wireless network, you must configure the only people that can access your choice. Here are a few options for the security of wireless networks.

    Wi - Fi Protected Access (WPA)
    WPA encrypts information and it checks to make sure that the network security key has not been modified. WPA also authenticates users to ensure that only authorized individuals can access the network.

    There are two types of WPA authentication: WPA and WPA2. WPA is designed to work with all wireless network cards, but it might not work with the older routers or access points. WPA2 is more secure than WPA, but it will not work with some older network cards. WPA is designed to be used with an authentication server 802.1 X, which distributes different keys to each user. This is referred to as WPA-Enterprise or WPA2-Enterprise. It can also be used in pre-shared key (PSK), where each user has the same passphrase. This is referred to as WPA-Personal or WPA2-Personal.
     
    Wired Equivalent Privacy (WEP)
    WEP is an older network security who is still able to support older devices, but it is not recommended. When you enable WEP, you configure a network security key. This key encrypts the information that one computer sends to another computer on your network. However, WEP security is relatively easy to crack.

    We do not recommend the use of WEP. WPA or WPA2 are more secure. If you try WPA or WPA2 and they do not work, we recommend that you upgrade your network card to those who work with WPA or WPA2.

    Authentication of 802. 1 X
    802. 1 X authentication can help improve the security of 802.11 wireless networks and wired Ethernet networks. 802. 1 X uses an authentication server to validate users and to provide network access. On wireless 802. 1 X can work with key Wired Equivalent Privacy (WEP) or Wi - Fi Protected Access (WPA). This type of authentication is typically used when connecting to a network of workplaces.
     
    Let us know if you need additional assistance.
    Thank you

    Gloria
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

Maybe you are looking for

  • El capitan deleted my bootcamp / bootcamp or mbr broken

    Hello people, my problems seem to be exactly like this one https://discussions.apple.com/message/29114369#29114369 . But to avoid confusion, as was requested by Loner T here Re: boot option after El Capitan Windows Update I'll put up a new discussion

  • towers of micro?

    I ordered this pc, before noticing it is said microtower. Is what do I have to worry about the size of the case generates a lot of heat? my last pc the a6720y went belly up to a lot of heat, but then this motherboard has a history. no game or movie w

  • Pavillion AIO D6U48AV #ABA: does not start

    Powers to monitor upwards but do not start. Wireless light turns on for a second and then turns off. Tried unplug the and hold the switch for 30 seconds the thing but does not work. Before that, the background flashed and turn off quickly with a mess

  • problem with recovery of contact in the contacts list

    Hi guys, I wrote an application that opens the address book, and the user has the option to choose a contact. the problem is, im able to select a contact as long as the contact has an email or an identification number. If the contact desnt have peopl

  • Question of VLAN voice SG300 - 28 p

    Hello I was running firmware 1.1.2.0 and everything worked well on 2 of these switches, connected by fiber.  I tried upgrading to the latest firmware (1.3.5.58) and had no luck.  Our phones which are combined Avaya 9650 VoIP has not found the router,