Use variables to simplify my code

Hello

I need to simplify my code for the use of multiple buttons...

As you can see in my code, there are a lot of lines repeating itself... I know I should use variables or something like that, but I'm really not a programmer so if someone could help me with this...
In my test, I use 6 buttons but for the real project, threre will be about 36 buttons...

How can I change btn1, btn2, btn3..., page1.html, page2.html, page3.html... etc to variables? And what is the code on the buttons to change these variables?

Thank you very much in advance... (and sorry for my English!)


then use:

Tags: Adobe Animate

Similar Questions

  • Avoid race Conditions, using Variables of network w / RT

    SYSTEM:
    I use a cRIO system connected to a host via ethernet PC.
    One of the parts of my system of cRIO with that I'm having a problem using CAN.

    BACKGROUND:
    FPGA waits for a reading, and when a message is received (U8 table format), he shoves every element in a target-to-Host U8 FIFO.
    RT sees the message in the FIFO, it collects and it integrates an array 2D U8 (in the case where more than one message is received) and adds to a growing range of U8 2D.

    PROBLEM:
    Originally, I was misleading this table 2D to the host computer via a Variable network and display on the façade of the host machine.  This works, except over time, this table 2D-U8 gets huge-especially if I use an echo.

    Ultimately, I want the host to display entire history, but including the RT rewrite this entire variable each time and send them over the network it slows down.

    FAILED ATTEMPTS:
    I expect to change to a queue, but apparently it is accessible by other elements in the host (in this case, the Module LabVIEW RT.)

    Writing an empty array in the network Variable after reading it obviously causes problems of condition Whitneys.

    QUESTION:
    Any suggestions on how to transmit these data to the host without losing data?

    Is it possible to have something similar to a queue or FIFO on the network?

    Thank you

    ~ Andrew

    (There are two routes that you might go: 1) for broadcast continues to the host network streams gives the effect of the queue on the network but it requires something to transmitted data namely hard if you need connect/disconnect your host. (2) stick with static variables, but your RT code will be expected to handle the buffer. For example, you can set up a circular buffer of the last samples n that is written to the variable. Based on what you say, I'd go with 2 though, so he can give that a complete history is difficult.

  • Impossible to use variables shared when deploying an exe file

    I tried to use variables shared for some time. I have been all over the forums and still have had no luck. I can get these VI to work until I have install on another PC while they do any work. I don't know what I'm doing wrong. I forced libraries to deploy, but they still do not work on the machine, that I install the exe file. I don't think that libraries are being installed. I can't see in the Distributed System Manager. I can see libraries on other machines, but not on the one that I have.

    Have you included libraries in section always included the source files.  You did, and then change the destination of the library of media files on the Source code file settings tab?

    In the code are you using the correct path when calling the libraries deployment method.   Current path of the VI should be stripped twice and have "data\name.lvlib" built in the end.

  • How to simplify the code to generate custom error codes and messages

    I designed a vi that generates the error when any data entry is missing, it works correctly, but the problem is that I want to simplify, because it is part of the main program and its block diagram is great to use as such (I tried to use this vi as a Subvi in the main program, but that does not work correctly) so I need help to simplify the code or if there is no other better medium to generate the error message.

    Hello

    As shown in the previous example, to a different question of yours, it is always good to reduce with diagrams of huge block with repeated code.

    When you overwrite functionality even repeated several times, put it in a loop and run it to have recurrences of 4 or 5 of the same code.

    It will be evolving in the future.

    joined the vi changed for you.

    Note: when you want to simplify your program, isolate your code in functions, put each function inside a under vi.

    in your case, you can have the control to an empty string for all channels within a Subvi. build an array of strings and go through the subvi. Control in the sub that VI is that strings are empty.

    an array of Boolean output error. build your error string in another under vi. the wires together.

  • Problem running procedure using Variables

    Hi all

    I am trying to execute the procedure in a statement declared/Begin/End and using variables as parameters of entry in my interior but I get away to an invalid SQL statement error. My code is below:
    declare
    
      START_dt  VARCHAR2(30);
      END_DT VARCHAR2(30);
      
         
      begin
            
        SELECT '01-APR-2011'
        INTO END_DT
        FROM DUAL;
      
        SELECT '01-APR-2020'
        INTO END_DT
        FROM DUAL;
             
           
         BEGIN EXECUTE IMMEDIATE 'INSERT_PROV_ACSC_IND_REF('||START_dt||','||END_DT||')';END;COMMIT;
    
     end;
    
    Error at line 1
    ORA-00900: invalid SQL statement
    ORA-06512: at line 18
    Is the way that I normally run my procedure outside this statement Declare/Begin/End: EXECUTE INSERT_PROV_ACSC_IND_REF('01-APR-2011','01-APR-2020');

    The table that takes the data from the procedure does not correct timestamp but my procedure takes the varchar above dates and turns them into dates in the procedure so that the entry date settings are left as a string.

    Any help would be appreciated.

    Thank you

    And if you want to use variables:

    declare
        START_dt  VARCHAR2(30);
        END_DT VARCHAR2(30);
    begin
        START_dt := DATE '2011-04-01';
        END_DT := DATE '2011-04-01';
        INSERT_PROV_ACSC_IND_REF(START_dt,END_DT);
    end;
    /
    

    SY.

  • Use variables in the names of MovieClip to call ASP 3.

    This line of code works very well for me:

    this.helpB1Btns.helpB1B3.alpha = 0.3;

    But I wonder how can I use variables instead of numbers (1 and 3) above?

    I mean for example:

    var i: int = 1;
    var j: int = 3;

    This ["helpB" + i + "BTNS.helpB" + i + "B" + j + '.alpha'] is 0.3;. Error
    ["helpB"+ i + "Btns.helpB" + i + "B" + j +".alpha '] = 0.3; Error
    This ["helpB" + i + "Inclinometer"]. ['helpB' + i + 'B' + j ".alpha"] plus 0.3; Error

    For example, this code works fine:

    This ["helpB" + i "Inclinometer"] .alpha plus 0.3;

    (this.helpB1Btns.alpha = 0.3 ;)

    But I have no idea of this code:

    this.helpB1Btns.helpB1B3.alpha = 0.3;

    I appreciate your help or no matter what reference I could learn this basically?

    yours,

    Ali

    use:

    This ["helpB" + i + "Inclinometer"] ['helpB' + i + 'B' + j] .alpha = 0.3

  • .chm TOC using variables - print SSL does not recognize anything after the variable

    Here's something interesting that I came across today.  I think that maybe it's a bug in RH 10.

    I create .chm TOCs using variables.  For entries of table of contents of page, a content before the variable in the table of contents entry converts to the table of contents printed without problem.  But any content after the variable is ignored.  It's only a problem with the pages in the table of contents.  Books are very good.

    For example:

    Book TOC:

    "Clinic - {variable} {variable}.

    This translates very well to the table of contents printed in printed documentation SSL.

    Table of Contents Page:

    "Clinic - {variable} {variable}.

    Aside from the link in the table of contents page, the code for the TOC book and page table of contents is the same.  But, for some reason, anything after the * first * variable in the page table of contents is ignored in the table of contents printed for printed documentation SSL.  It doesn't matter if it's another right or variable text.

    printtoc_variablesbug.jpg

    In the image above, both the "clinic - display the list of participants in the" book of the TOC and TOC page on the left contains two variables:

    "Clinic - {variable} {variable}.

    On the right page "Clinic - Participant list", the variable "screen" is ignored and deleted page table of contents only when the layout of the chapter is created for printing SSL.  HR will remove anything after the first variable in the table of contents page, whether it's a text variable or right.  HR does not remove the antything of a book TOC when the presentation of the chapter is created for printing (visible in the picture above).

    Post edited by: eeddings - added image to visually show the bug.

    When you generate print books will go in the printed document.

    Pages in the table of contents of the document are not based on what is in the table of contents above, but on the topic title.

    Add the variable there and it works.

    See www.grainge.org for creating tips and RoboHelp

    @petergrainge

  • Use variables to display object in Captivate 4

    I would like to be able to display a check mark next to title on the table of contents page once the user displays the last page in the section.  Is it possible that I can do this, and where can I find the code?

    Thank you

    You can use variables to show/hide elements on a page.

    First add custom variables to represent the State of completion of each section. Something like sectionOneCompleted = 0, sectionTwoCompleted = 0, etc..

    Then add assignments for each of your variables at the end of each section. For example, you could define "on slide enter ' use 'assign' and give variable sectionOneCompleted set to 1.

    Then in your table of contents you can show/hide the elements on the page depending on the value of your new user-defined variables.

    1. go in the slide properties

    2. under ' Navigation: on the slide, type ' select 'execute the Advanced Action '.

    3. click on the... button next to 'the Action '.

    4. under change/create an Action, select 'create '.

    5. the action of giving a name such as ShowHideThingie

    6. in the area of large text, double-click the text of 'Statement add' light gray.  Gray 'add a statement' become a red "declaration". Double-click it again.

    7. Select 'condition' in the menu drop-down

    8. click 'Select a variable' and choose your variable defined by the user (in this case, "sectionOneCompleted")

    9. choose "is equal to" and then enter a value of 1

    10. then, you must specify what to do if the value is 1.  Under 'start' double-click 'Add education '. Select 'action Standard' in the menu dropdown.

    11. Select 'View', then select the name of the object that you want to display (each item placed on the blade has a unique ID)

    12. now, we need to specify what happens if the value is NOT 1.  Under 'otherwise... start', double click 'Add education '. Select 'action Standard' in the menu dropdown.

    13. Select 'Hide', and then select the name of the object that you are showing to step 12.

    14. click "Save" and close the window of the Actions dialogue box.

    This should be it!

    Note: I have not tested these steps carefully (written very quickly), but I hope you get the idea and can get out of here.

    -philip

  • How to return to normal mode when you use vim shortcuts in the code/style editor?

    I try to use vim shortcuts keyboard for code/style editor in Firefox Developer Edition. I can type 'i' to switch to insert mode, but how do I return to the normal mode? ESC activates / deactivates the pane of the console, but don't come back to me in normal mode.

    Sorry, I misunderstood. I'm not familiar with the way VIM works. CTRL + C doesn't do what you want?

  • What are the parameters? How are Variables differenet? Why we can not use variables to pass data to one sequnece to another? What is the advantage to use parameters instead of Variables?

    Hi all

    I am new to TestStand. Still in the learning process.

    What are the parameters? How are Variables differenet? Why we can not use variables to pass data to one sequnece to another? What is the advantage to use parameters instead of Variables?

    Thanks in advance,

    LaVIEWan

    I'm sorry... I discovered that... its not at all possible to pass data to another sequence using variables... it must be through settings... once again I apologize for the display of such a stupid question

  • How to fix it. Problem of "Serial Cable using IrDA Protocol" it says Code 43 I use window XP

    How to fix it.  Problem of "Serial Cable using IrDA Protocol" it says Code 43 I use window XP I have no idea what the point is that the origin of the problem. Is there a link I can go to-to solve this problem? Thank you in advance.

    Yes, just right click on the device in Device Manager and select uninstall.  When you restart, Windows can detect the device and try to reinstall.  If the error is returned, post back - if this error is related to a laptop that has an infra-red (IR) integrated connector, you can disable this device in the BIOS.

  • When I try to use automatic dates, I get code 8007005. I ran the check disk and there is no problem here.

    When I try to use automatic dates, I get code 8007005. I ran the check disk and there is no problem here.

    Hello

    see if that helps to fix:

    How to reset the Windows Update components?

    There is also an automatic 'fix - it' here

    http://support.Microsoft.com/kb/971058

    Also, try to put the KB numbers in the search on the link below and then manually download the

    http://www.Microsoft.com/downloads/en/default.aspx

     

    or please repost your question in the correct windows update forum

    http://answers.Microsoft.com/en-us/Windows/Forum/windows_vista-windows_update?page=1&tab=all

  • How to connect to Windows 8 on my computer desktop HP Envy without using a password or pin code?

    How to connect to Windows 8 on my computer desktop HP Envy without using a password or pin code?

    Hello

    Did you read the MS article that I posted above?  There are instructions on how to do not require a password.

    Since the upgrade to Windwos 8.1 is free, then you should do this update and apply all of the published HP updates.  Then watch this video and it will show you how to remove the password and lock screen.

  • Using variables on localization files

    Hi all!

    I would like to know if it is possible to use variables on the HR files, so they could be replaced by a dynamic text while the application is running.

    My point is, I need to post this message on an alert:

    "Hi Carlos, the pleasure of you review", "Carlos" is the user name and of course it's different for each installation.

    Must be something like this:

    key: GREETINGS_MSG

    value: Hi %s, the pleasure to see you

    And then.

    Dialog.Alert (_res.getString (GREETINGS_MSG, "Carlos").

    So, is it possible to do this?

    Thank you!

    According to what you're asking, it's what I found.

    See if you can try this:

    http://www.BlackBerry.com/developers/docs/5.0.0api/NET/rim/device/API/i18n/MessageFormat.html

    http://Java.Sun.com/J2SE/1.3/docs/API/Java/text/MessageFormat.html

    Example:

    Object[] arguments = {     new Integer(7),     new Date(System.currentTimeMillis()),     "a disturbance in the Force" };
    
     String result = MessageFormat.format(     "At {1,time} on {1,date}, there was {2} on planet {0,number,integer}.",     arguments);
    
  • Can I use the JDE demo application code in my application?

    I have the RIM signing keys for my BB application. If so, can I use the Blackberry demo application code in my application?

    Thanks for any help

    She found!  There are too many posts by him on this forum!

    It is in this thread:

    http://supportforums.BlackBerry.com/Rim/Board/message?board.ID=java_dev&message.ID=9393

    To save everyone looking, here is the text:

    "You are free to use the sample code available on BlackBerry.com website in your own application.  This includes sample diagnosis network included in the knowledge base.
     
    Mark Sohm
    BlackBerry Development Advisor
    www.BlackBerryDeveloper.com".

    Thanks Mark.

Maybe you are looking for