change the string to the variable (sort of)

Hello. I'm a flash game which requires a lot of similar, such as functions

function getSomeNumber (): number {}
return number;
}

I was wondering if I could generalize this by following these steps. take a string parameter that defines the name of the variable. Then, I want to change this string for the name of the variable so that I can the value of the output variable. kinda like that

function getSomeNumber(nameOfVar:String):Number {}
somehow use string to find variable name and returns the value of the variable
unknown return;
}

hope it makes sense.

trigger2160

Code of clbeech is what I was looking 4. Not sure y I need all this that extra code kglad but thanks for the help anyway.

Tags: Adobe Animate

Similar Questions

  • change the variables in a smart camera by a remote computer

    Hello

    I have a smart camera NI1722 and I want to change some variables inside the camera by a computer which is connected to the camera.

    Is it possible to change the variables inside the camera from a computer outside? On the computer we program with CVI. We have a RS232 and TCP/IP connection.

    Anybody can help us?

    Thank you

    Oliver

    Hi Oliver,.

    You use a LabVIEW or Vision Builder AI program the smart camera?

    There are several ways to Exchange data between a smart camera and CVI on the host computer.

    The easiest way is probably to use shared variables.

    If you use LabVIEW to program the smart camera, the following article explains how to create and deploy shared on the target variables.

    http://zone.NI.com/DevZone/CDA/tut/p/ID/4679

    If you use Vision Builder AI, first connect to the smart camera, then select Tools > Variable Manager...

    Select the tag System Variables, and then click Add to create the variable for the data you want to share. Be sure to select publish it on the network box.

    You can set the value of these variables in Vision Builder, using the step set the Variable, located in the tools palette.

    And a lot of steps allow for use directly in their configuration page, clicking the arrow to the bottom of some digital controls.

    Now, on the side of the CVI, this example shows how to connect, read and write variables that you created on the smart camera.

    https://decibel.NI.com/content/docs/doc-3806

    I hope this helps.

    Best regards

    -Christophe

  • Is there a way to change the default sort of the Explorer of Windows 8 fields?

    I would like a way to change the default sort fields to explore.  For example, a default pictures folder displays the fields 'name; Date; Type; Size; Tags '.  Is there a way to change this so that a default pictures folder indicates 'Date Modified' instead of 'Date' when sorting.

    In addition, the default order can be changed also?  Sticking with the example files pictures, is there a way so that instead of sorting by name, the default is sort by modified Date in ascending order?

    Try the following (similar to earlier versions of windows):
    Right-click on the folder
    Properties
    Customize
    -Choose among five models (General information, documents, photos, music, video - what's in a name?)
    -choose to apply to subfolders
    ARange such view as described by Kevin
    In the menu bar:

    View

    Options
    Change the folder and search options
    View
    Apply to records (of the same model)
    Hope this helps
    JVH
  • Possible to change the variable cpQuizInfoPassFail through advanced actions?

    Is it possible to change the variable cpQuizInfoPassFail through advanced actions? I do not see this or the other quizzing variable when I try to create an advanced action and change by entitlement or expression. Let me explain what I want to accomplish, I ask the wrong question. I have a training project, with that I need to include a post test. I don't really like the captivate quizzes. I want the post-test to play as a ride on jeopady where the user chooses issues category and gets points if the user answers correctly. For this I must ask questions on a game board and (from what I can fig) you cannot have multiple questions on the same page. I'm building the quiz with my own custom variables and coded so that the program jumps to a page of the certificate if the user gets more than 84 points. THA all works very well. But I have to be able to tell the database that the program will connect with the user has passed the quiz. I thought I could do this if I assign the value 1 to the variable cpQuizInfoPassFail. Is there a way to do this? Thanks in advance for any help,

    Doug Jackson

    Hi Doug,.

    I don't see the version you are using. Each interactive object can be marked, has a report following properties in the control panel (if you use CP5 or CP5.5) or a tab in the Properties dialog box reports, if you use a different version. You must add a score (default value is normally 1 point) and make sure you add it to the total score.

    If you want to make me a glance, post your file on acrobat.com (free, use your Adobe ID), share and publish. You will have a link that you can copy into a private message to me.

    Lilybiri

  • Dynamically change the variable substitution for the region title

    Is there a way to update the title of a region when you use variable substitution (for example. P1_TITLE_DATE)? I use a dynamic action to update the region-, but it does not update the title. Does anyone have a work around for this without submitting the entire page?

    Hello

    You can run code JavaScript change the title of your region.

    $("#MY_REGION div.rc-title").text("New Title")
    

    JQuery selector code depend on your model and its theme.

    Kind regards
    Jari

    -----
    My Blog: http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0
    Twitter: http://www.twitter.com/jariolai

  • Change the variable scope?

    Hi all

    Is it possible to change the scope of a variable in a BPEL process?

    Thank you

    You can move the declaration of the variable to the correct scope.
    If you view the source code you can copy and paste the variable... definition

  • How can I change the variables in a fitting model?

    I use the VI of the restricted non-linear curve adjustment to adjust a non-linear curve and I use it in mode where provide you the reference to the VI to the fitting model. (Dark teal blue wired to the fitting vi)

    In my adjustment settings I n1 and d (refractive index and thickness), however, I also have settings that I would change my front panel such as the wavelength (lambda) and index of refraction n0 and n2 from the surrounding media. I just insert these values as constants before (laying down 1,519, etc.) but now I need to change them without having to rewrite the reference to the VI each time. How can I do this?

    Use the entrance of 'data' (on the top of the conpane but not identified in the contextual help window). This a Variant data type, so you can plug anything for her.  You can use a cluster or to cases where all the data are of the same type a table.  Use a cluster typedefed with named items and it becomes very easy to document what is happening in the IA function. Use the variant of the function given inside the function VI with a constant pile of typedef wired for the type of input data.

    Lynn

  • change the variable

    I need to take a variable with the name "11.swf" and limited to just the number.

    I know that this code is wrong, but it gets the idea across.

    on (release) {}
    page var = "11.swf";
    PageNumber var = (page-".swf");
    trace (PageNumber);
    }

    I want to go back 11 the function trace

    You could do:

    var pagenumber = page.split(".") [0]

  • How can I change the text in a string of Coldfusion?

    Hello! I have a ColdFusion variable, which contains a URL:

    "For example, it looks like to <iframe width="640" height="360" src=" "/ / www.youtube.com/embed/XXXXXX" frameborder= "0" allowfullscreen>< /iframe >.


    I want to do is replace the width of "640" by that of "450" and height of "360" with "253". I'm passing a string in an 'if' statement that will change the variables if the conditions are met. I can't change the variables before making it a string. I need to change the variables.


    What is the best way to do this in ColdFusion? I don't know this language (my expertise is more in JavaScript and PHP), I appreciate any help you could give me.


    Thank you very much for your help!


    BP

    Take a look at the Replace() function. It allows you to replace one substring with another.

    See you soon

    Eddie

  • change the Boolean variable on the stage

    Hello! This is my first post here! so I've been playing for a while with the Adobe Edge animate for a while and it's pretty cool and I am trying to create a super basic layout with a video loop, and when the user press the button, the video plays until ongoing and then starts a new. the button it simply changes the variable state of false to true, pretty simple, but for some reason, it does not. I'm an artist, so I don't know much about code in addition to if/else haha

    Here is the code on the stage (it is put on the CompositionReady):

    var loop1 = sym.$("loop")[0];
    
    var nextLoop = new Boolean();
    console.log(nextLoop); //false
    
    loop1.onended = function(e){
    if (nextLoop == true){
         // Show an element
         sym.$("loop2").show();
         // Play a video track
         sym.$("loop2")[0].play();
         }
         else{
         loop1.play()
         }
    };
    
    

    and here is the code for the button:

    sym.getSymbol("next_btn").play(); //fade out
    //change nextLoop state
    sym.getComposition().getStage().nextLoop = true;
    
    

    I'm pretty sure it's a syntax error, but I don't really know how to fix it

    any ideas?

    Thanks in advance!

    Hi rbencz

    You will need to create a global variable so that it works properly, I commented on 2 lines I added:

    sym.setVariable ("nextLoop", false); Create a new global variable called 'nextLoop' and set the value to false

    loop1 var = sym.$("loop") [0];

    loop1.onended = {Function

    nextLoop = sym.getComposition () .getStage () .getVariable ("nextLoop"); Get the Global Variable and assign a local variable

    If (nextLoop == true) {}

    Display an item

    SYM.$("loop2"). Show();

    A video track

    SYM.$("loop2") [0]. Play();

    } else {}

    loop1. Play()

    }

    };

    And then the button, place the following code:

    sym.getComposition () .getStage () .setVariable ("nextLoop", true); Change the value of the variable global "nextLoop" true

  • How to change the directory where the files are placed in other applications to access?

    ESR running on Centos (RedHat) 5 & 6. Because of the way my system is set up, I would change where Firefox updates a file when they need to be accessed by another application (for example, a .doc file). The default is to place them in / tmp, which works for most people, but does not work in my particular installation. (Among the programs that I use to read some files are actually on another computer, but can be started automatically from the computer, I'm browsing). I need to place these files in a network directory, so that the other computer can see.

    I looked into: config, but can't find anything pointing to/tmp. I hope that it is one of these "add a new line to about: config ' things that are supposed to be (from bones), but can be changed if necessary.

    Thank you
    Ted Miller

    You probably can make only by changing the variable of environment TMPDIR = / tmp to point to this network drive.

    You can start Firefox via a script file if you want to do this for all applications.

    #!/bin/sh
    
    export TMPDIR=<path to tmp directory>
    cd <path to Firefox>
    ./firefox
    
  • Change the case on several documents

    Hello!

    I'm very new to scripting, and I have the following script that is "Upper" text and change for real uppercase. I work with ID CS 6 on Windows XP.

    The script works on a single document, if there is an open, if not, it asks for a file and process all INDD files in this folder.

    That's what I have:

    if(app.documents.length != 0){
        processDocument(app.activeDocument);
        alert("Done!");
        }
    else {
        _folder = Folder('~/Desktop').selectDlg("Select folder");
        if(_folder == null) exit();
        _files = _folder.getFiles("*.indd");
        if(_files.length == 0){
                alert("No INDD files in the selected folder!");            
            }
        else {
            for (i=0; i<_files.length; i++){
            app.scriptPreferences.userInteractionLevel = UserInteractionLevels.NEVER_INTERACT;
            _inddFile = _files[i]
            doc = app.open(_inddFile);
            app.scriptPreferences.userInteractionLevel = UserInteractionLevels.INTERACT_WITH_ALL;      
            processDocument(doc);
            app.activeDocument.close(SaveOptions.yes);
            } 
        alert("Done!");
        }
    }
    
    function processDocument(doc) {    
        app.findGrepPreferences = app.changeGrepPreferences = null;
        app.findGrepPreferences.capitalization = Capitalization.allCaps;
        app.findGrepPreferences.appliedCharacterStyle = 'Red';
        var _results = doc.findGrep();
        app.findGrepPreferences = app.changeGrepPreferences = null;    
        _length = _results.length;
        for (i=0; i<_length; i++) {
            _results[i].texts[0].changecase(ChangecaseMode.uppercase);
            _results[i].texts[0].capitalization = Capitalization.normal;
            _results[i].texts[0].appliedCharacterStyle = 'Blue';
        }
    }
    

    The script works well on a single document, but for some reason any that it does not work on several documents. I try the script on 4 files with this content (the colors are added in the text only to help verify the results):

    Whenever the first or the first two documents are processed correctly, the others are not processed at all. But I get no error message. Where is the problem?

    Any help would be greatly appreciated!

    Luca

    I tried to recreate your problem once again and I don't have something similar. I know it's not normal, but mine started when I changed the variable i in the second. I see that they have a different scope, but somehow she made the difference. Could you try it by chance?

    #target indesign
    if(app.documents.length != 0){
        processDocument();
        alert("Done!");
        }
    else {
        _folder = Folder('~/Desktop').selectDlg("Select folder");
        if(_folder == null) exit();
        _files = _folder.getFiles("*.indd");
        if(_files.length == 0){
                alert("No INDD files in the selected folder!");
            }
        else {
            for (i=0; i<_files.length; i++){
            app.scriptPreferences.userInteractionLevel = UserInteractionLevels.NEVER_INTERACT;
            _inddFile = _files[i] ;
            doc = app.open(_inddFile);
            app.scriptPreferences.userInteractionLevel = UserInteractionLevels.INTERACT_WITH_ALL;
            processDocument(doc);
            app.activeDocument.close(SaveOptions.yes);
            }
        alert("Done!");
        }
    } 
    
    function processDocument() {
        app.findGrepPreferences = app.changeGrepPreferences = null;
        app.findGrepPreferences.capitalization = Capitalization.allCaps;
        app.findGrepPreferences.appliedCharacterStyle = "Red";
        var _results = app.activeDocument.findGrep();
        $.write(_results);
        app.findGrepPreferences = app.changeGrepPreferences = null;
        _length = _results.length;
        $.write(_length);
        for (s=0; s<_length; s++) {
            _results[s].texts[0].changecase(ChangecaseMode.uppercase);
            _results[s].texts[0].capitalization = Capitalization.normal;
            _results[s].texts[0].appliedCharacterStyle = 'Blue';
        }
    }
    
  • Captivate 8 javascript error cannot find the variable cp

    I created a responsive project with Captivate 8 trial (windows).  The presentation will be to load and play locally, but when you go from a server, the presentation hangs on the preloader. He won't play in any browser. Safari on Mac Error Log shows the following errors:

    Cannot find variable cp

    Error /Du file / line
    cpInitindex.html: line 17
    initializeCPindex.html: line 25
    constructDIVsindex.html: line 59
    (anonymous function)index.html: line 71
    bCPXHRLoader.js: line 37
    (anonymous function)CPXHRLoader.js: line 37

    A patch would be appreciated to Adobe.  We are trying to launch a project of e-learning of Captivate on July 31, 2014.

    After reading blog after blog, I discovered the Captivate team changed the variable "cc" to "CP" in the API.  With the previous version of Captivate installed 7 caused the error for the variable javascript missing "cp".  Uninstall the previous version of Captivate and publish the presentation, once again resolved the conflict.

  • How to change the value of string clustered, to implement using the node value of property instead of writing directly on the flow of data or using the variable

    new to labview :-) and I have a problem when I want to change the value of a string in bunches, and I want to implement this using the node value of property instead of writing directly to the stream or by using the variable, enclosed is the picture.   No matter, I have change in cluster (control) or value of Popery out (indicator) cluster, the value (sensor 7) dataflow keeps unchanged even I gave the new value by value of property node. Thank you to give me some advice about this.

    Hi GerdW

    Thanks a lot for your answer. The reason I'm stubbornly tring to break the flow of DATA is: we have a test system that have about 100 screws, they have a few connected flow, some of them will be unbundling a cluster dataflow chain to check the value in order to make the different cases.  Now I want to insert user event by changing the control and influential cases during run time.

    As I initially uses a global variable (to control cases) instead of unbundle string data flow, it works well.  But then, I found there are a lot of screws that are using the string unbundle.  One of the 'lazy' means, I tried is to change the value via the property node (because that way, I did not need to find all the places where using the unbundle string and replace them with the global variable), then I noticed a problem with "dataflow", the value in the stream of cluster in fact will not be changed by changing the value of the property node.

    I did a test with VI simple (like the picture in last post), and after reading your advice, I tell myself that I need to understand the concept of "DATAFLOW" in labview, it seems that my "lazy" way can not work in this scenario.

    I have attached the criterion VI here, have you furthur suggestions on what I can do in this case?

    Mant thanks!

    Minyi

  • variable presentation changing the data type date to string the Calende

    Hi gurus,

    I'm having a strange problem. I have a Start date and end date fast that aren't on any column presentation for example (in the case where 1 = 0 DATE. DATE other cast ('2100-12-31 Date ') end).
    Now, this prompt, I put 2 startdate and enddate variables presentation to use in my sql filter in the report.i use these variable to calculate the date for these 2 end dates and then I apply between it function with these 2 dates.
    The question is when the dashboard is running for the first time the presentation variable takes the dates as the DATE "' 2009/14/10 and when I change the date and click on the go button, the variables is October 15, 2009" as strings anf so DATE in my SQL filter functions fails and error throughts VD.

    All of the suggestions!

    Nico explain already.

    Select date '' 2009-12-15 of the double - TRUE
    Select date of 2009 '-15-12' of the double - ORA-01843: not one month valid
    Select date ' 10/2009/15 ' of double - ORA-01861: literal does not match the format string

    DATE 'yyyy-mm-dd' does that have this format.

    Concerning
    Goran
    http://108obiee.blogspot.com

Maybe you are looking for

  • IPad Pro 1st gen is no longer charging via rMBP end 2013.

    IPad Pro 1st gen is no longer the load via rMBP end of 2013 after the Ipad pro iOS 10.0.1 update can someone enlighten me on this issue? Apart from the iPad pro requires a larger draw of power than an iPhone. Thank you. I ask as its just designed by

  • XP slow stop

    A month ago (~ 1 Oct/10) I noticed that my computer takes about 5 minutes to stop or restart. Startup is normal. When I stopped, the "closing Windows" message remains for about 5 minutes. I also noticed that the fast user switching does not work even

  • Six years old copy of Windows 7 Professional now is more authentic.

    I bought my copy of Windows 7 Professional from NewEgg some time in 2009.  I then installed on my new computer and have used it several times since then to make fresh re - installs due to drive failure hard, either because I bought new equipment.  I

  • relatrive shortcuts windows 7

    Hi I have a memory stick with some portable programs on it. I would like to know how to make a shortcut that has a path relative to the directory of the shortcut. I want it because it will change often drive names as a portable device. I would like t

  • False positive for test seek funnel with Dell PC Checkup?

    I run PC Checkup of Dell occasionally and the other day I ran and got a failure for a WD 2 TB my Passport (external USB) drive. Specifically, according to Dell PC Checkup, he failed to test search funnel. I had no problem with the drive at all, so I