The values of global variables change spontaneously

I am currently doing a quiz/board game. There is a 'Question to card' button that goes to a random image in a specified movie. All images in this film has a question with answers that make players advence on the Board of Directors. The problem is, I have to make sure that once a question appeared and has received a reply, it cannot pop up again. I thought to declare a global variable for each question ("_global.q1" in question 1 and so on) in the framework one of the movie root with a value of '0 '. The answers to each question, to move the pieces on the Board, becomes the '1' variable value (on (release) {_global.q1 = "1"}). And directly under each question of the film container question, I made an invisible film with the script below, thinking the first time governing load the variable must be set to 0, then the question will load normally. and later, since the answer is set to 1, the script below in the next section. Thus, no question is repeated.

onClipEvent (enterFrame) {}
If (_global.q1 = '1') {this._parent.nextFrame ()};
}

However, on the film tests, I push the button with the gotoAndPlay (random ()) and all my values of variables defined by one, taking me all the way to the last image in the question that contains the movie.

> If (_global.q1 = "1")

Must be:

If (_global.q1 is "1")

A = single assignment, a double == is a test for equality.

--
Dave-
www.offroadfire.com
Developer leader
http://www.blurredistinction.com
Adobe Community Expert
http://www.Adobe.com/communities/experts/

Tags: Adobe Animate

Similar Questions

  • Monitor changes in the value of a variable in a module of code labview TestStand?

    Hi all

    A code in Labview module called from an action step has a particular variable that changes its value when running vi. Is it possible to monitor these changes through for example a local variable in TestStand and display different values on UI in real time via UIMessages?

    Thank you very much!

    You must post a UIMessage during execution of your VI.  As the following picture below, you can ignore the SequenceErrorMessage string and use the value of your variable as the numericDataParam.   I guess the trick is to determine where to display the user interface of Message, in your case, the variable updated at certain times or it he constantly updated?  I'm not sure of the performance LAG if at all times you post a UIMessage say every 100ms.

    On the other end, you will need in your interface user create a reminder of the Interface to manage the UIMessage.  See the following link for more details.

    http://www.NI.com/white-paper/4532/en

    Enjoy,

    PH

  • PROBLEM changing the value of a variable in my scene movieclip

    Hello
    I have a problem changing the value of a variable in my scene movieclip. I explain: I combobox on my stage containing the categories, and in the scene that I load an xml file containing links to php files that work with the combobox control.
    On the stage I have a movieclip "camera roll" inside this movieclip on the first image I have a php script file selected in the scene of loading. I use a function with a variable load() "theUrl" inside like this: T.load (theUrl);
    In my scene, I want to change the value of "theUrl" within the film of movieClip. I tried filmstrip.theUrl = url; But it does not work

    the xml file
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <slideshow>
    <area title1="10 Last updated" link1="link1.php"/>
    <area title1="special" link1="link2.php"/>
    </slideshow>

    Here is the code on my stage:

    var link1:Array = new Array();
    var LINK:String;
    var url:String;
    var whoOn:Number;
    whoOn=0;
    var x:XML = new XML();
    x.ignoreWhite = true;
    x.onLoad = function(success) {
    var photos:Array = this.firstChild.childNodes;
    for (i=0; i<photos.length; i++) {
    _root.link1.push(photos[i].attributes.link1);
    }
    url=link1[whoOn];
    filmstrip.theUrl=url;//<<--HERE
    };
    x.load("category.xml");
    
    var cbListener:Object = new Object();
    cbListener.change = function(event_obj:Object) {
    trace(select.selectedItem.label);
    if (select.selectedItem.label == "Last updated") {
    whoOn=0;
    } else if (select.selectedItem.label == "Special") {
    whoOn=1;
    }
    url=link1[whoOn];
    filmstrip.theUrl=url; //<<-----HERE   
    };
    select.addEventListener("change",cbListener);
    
    

    Here is the code inside the clip "film".

    var T:XML = new XML();
    T.ignoreWhite = true;
    T.onLoad = function(xml) { 
    etc etc etc }
    
    T.load(theUrl);    //<<---HERE it still undefined

    the code on the timeline of the film should be placed in a function() (or better, move all your code to the main timeline).  but, if you leave the code on the timeline of the film strip, call the function that contains this code whenever the url changes.

  • How to apply the procedure inside a procedure and the evils of the value in a variable?

    Hi all

    I'm usung oracle 11g.

    Here is my package and procedure

    I want to call get_email_details this procedure within the process_email_master and store the value in a variable in main proceedings

    create or replace

    PACKAGE ms_gen_process_email

    as

    type email_type is rendered (subject varchar2 (4000 tank),

    email_body varchar2 (4000 tank),

    to_receipent varchar2 (4000 tank),

    cc_receipent varchar2 (4000 char));

    type email_type_table is table of the email_type;

    procedure process_email_master)

    p_metric_name IN VARCHAR2,

    p_current_stage in varchar2,

    p_action in varchar2,

    p_pid number,

    P_OBJECT_ID in varchar2

    -p_emai_master on p_email_type_table

    );

    PROCEDURE get_email_details)

    p_metric_name IN VARCHAR2,

    p_current_stage in varchar2,

    P_ACTION in varchar2,

    p_email_type_table1 on email_type_table

    ) ;

    END ms_gen_process_email;

    ----

    create or replace

    PACKAGE ms_gen_process_email BODY

    as

    procedure process_email_master)

    p_metric_name IN VARCHAR2,

    p_current_stage in varchar2,

    p_action in varchar2,

    p_pid number,

    p_object_id in varchar2

    )

    as

    Start

    null;

    EXCEPTION

    WHILE OTHERS

    then

    null;

    end process_email_master;

    PROCEDURE get_email_details)

    p_metric_name IN VARCHAR2,

    p_current_stage IN VARCHAR2,

    P_ACTION in varchar2,

    p_email_type_table on email_type_table

    )

    as

    BEGIN

    Select the object, email_body, to_receipent, cc_receipent

    bulk collect into p_email_type_table

    of ms_gen_email_config_detail

    WHERE email_key =)

    SELECT email_key

    OF ms_gen_email_config

    WHERE metric_name = p_metric_name

    AND action p_action =

    and current_stage = p_current_stage

    );

    for me in p_email_type_table.first... loop of p_email_type_table. Last

    dbms_output.put_line (p_email_type_table (i) reserve .under | p_email_type_table (i) .email_body: p_email_type_table (i) .to_receipent: p_email_type_table (i) .cc_receipent);

    end loop;

    EXCEPTION

    WHILE OTHERS

    THEN

    NULL;

    END get_email_details;

    END ms_gen_process_email;

    but I get this error message

    Error (15,31): PLS-00201: identifier 'P_EMAIL_TYPE_TABLE' must be declared

    Concerning

    Dale

    See below the test case and change your code. You can call the procedure in detail within a main as procedure below

    CREATE or REPLACE PACKAGE test_pkg AS

    TYPE rec_val IS RECORD (empno, emp.empno%TYPE,

    Ename emp.ename%TYPE

    );

    TYPE nt_tabtest IS TABLE OF THE rec_val;

    PROCEDURE get_email_id (p_type to nt_tabtest);

    PROCEDURE get_email_master;

    END;

    /

    CREATE or REPLACE PACKAGE test_pkg BODY

    AS

    PROCEDURE get_email_id (p_type ON nt_tabtest)

    AS

    BEGIN

    SELECT EmpNo, ename COLLECT in BULK in p_type FROM emp;

    END;

    PROCEDURE get_email_master

    AS

    v_type nt_tabtest;

    BEGIN

    get_email_id (v_type);

    BECAUSE me IN v_type. FIRST... v_type. LAST

    LOOP

    DBMS_OUTPUT. Put_line (v_type (i) .empno: v_type (i) .ename);

    END LOOP;

    END;

    END;

    /

    Post edited by: 000000

  • Display a series of images on the stage based on the value of a variable

    Hi all

    Here's another interesting problem! Well, I have an interactive retention test which is charge of an xml file based on the value of a variable scenario (for example, if script = Architecture, then load Q_set 1, if scenario = history then load something else). Now, I would like to extent this and display a series of images on my stage which will be valid only in the current scenario. Here is my code so far. I thought load a list of images on the beginning of the film (for example, Architecture_list, History_list) and then call them according to the value of the variable of scenario, but I would like to hear what you have to say. Any ideas?

    The answer is a series of managers: one called at the beginning of the movie to fill the lists of the appropriate folders (based on the value of the variable gimage) and the other called next and previous. Here they are in case yu need:

    ---------
    Global gFileList, gImagePath, gimages

    on buildList

    gFileList =]

    -defining the path to images:

    gImagePath = "@images /" & gimages & ' / ' "»

    Repeat with i = 1 to the maxinteger
    thisFile = getNthFileNameInFolder (gImagePath, i)
    If thisFile = EMPTY then exit
    If thisFile = the movie then the next repetition
    types of files = [".pct", ".jpg", ".bmp", ".gif"]
    howManyTypes = count (fileTypes)
    Repeat with thisType = 1 to howManyTypes
    extension = getAt (file types, if thisType)
    If thisFile contains extension then
    gFileList.append (thisFile)
    end if
    end repeat
    end repeat

    Member ("Display"). FileName = gImagePath & gFileList [1] - put the first image in the folder at the appropriate place

    Member ("Display"). Picture = .photo member ("display")

    buildList end

    --------------------
    Global gFileList, gFileIndex, gImagePath

    on nextFile

    gFileIndex = gFileIndex + 1

    If gFileIndex > count (gFileList) then

    whichFile = gFileList [1] - set the image = in the last loaded picture holder
    gFileIndex = 1 - the value of the index to the last trick question

    Member ("Display"). FileName = gImagePath & whichFile
    Member ("Display"). Picture = .photo member ("display")
    updateStage

    -go to the audio issues

    _movie. GB (31)

    on the other

    whichFile = gFileList.getAt (gFileIndex)

    Member ("Display"). FileName = gImagePath & whichFile

    Member ("Display"). Picture = .photo member ("display")

    updateStage
    end if

    end

    Global gFileList, gFileIndex, gImagePath
    -----------------------------------------------------------
    the backfile

    gFileIndex = gFileIndex - 1

    If gFileIndex = 1 then

    whichFile = gFileList [1]
    Member ("Display"). FileName = gImagePath & whichFile
    Member ("Display"). Picture = .photo member ("display")
    updateStage
    Sprite (17) TRUE = FALSE - disable the "back" button

    -gFileIndex = count (gFileList)
    end if

    If gFileIndex > 1 then

    whichFile = gFileList.getAt (gFileIndex)

    Member ("Display"). FileName = gImagePath & whichFile
    Member ("Display"). Picture = .photo member ("display")
    updateStage
    end if
    end

  • How to set the value of a variable in automator?

    I'm totally new to automator I found a post that I try to reuse

    to Re: copy multiple files from TextEdit in one Word file

    I want to open a series of html files in a folder and convert in a TextEdit rtf file.

    However, I am unable to automator find out how set the value of a variable such that it appears in this post

    I looked at every command in library without a lot of fortune

    Any help?

    Thank you

    Dan

    Its in Utilities.

    In Automator, use the search box:

  • Name of the dynamic property of object in the table based on the value of a variable

    I have two paintings of custom class objects

    var obj1:Object1
    var obj2:Object2
    
    var array1:Array = [obj1[0], obj1[1], ...]
    var array2:Array = [obj2[0], obj2[1], ...]
    

    Object1 has a property named. Name while Object2 has a property named. Title.

    Now I have a common function including cab accepts an array (array1 or array2) and the name of property the object ("Name" or "Title") as input and needs to access this name of the property of the objects in the array:

    function myFunction(arr:Array, fieldName:String)
    {
        arr[0].fieldName  = "xxx";
    }
    

    the problem I have this achievement does not because the code in the function assumes that the property of that object in the table is actually a string "fieldName" while I want to dynamically determine the names of the fields based on the value of this variable, but cannot understand the syntax to do!

    Don't know if I'm clear - hope that makes sense... ;-) Thank you

    Hey p3pp3r,

    I think I understood you. Try the following and see if you get good results:

    function myFunction(arr:Array, fieldName:String)
    {
        arr[0][fieldName]  = "xxx";
    }
    

    Let me know how it turns out. Good luck!

  • How to assign the value of a variable to a quiz?

    Hi, I have a problem, I attempted to set the value of a variable for the quiz on the final value of the project, any suggestions?

    Sorry but I do not understand your question at all. If you talk about a quiz like cpQuizInfoPointsscored or cpInfoPercentage system variable, this is all simply impossible because the system variables are read-only.

  • Access the value of a variable assigned to CompositionReady?

    I created a variable called counter inside the 'scene' in the "CompositionReady" using the following code.

    var counter = 0;

    How to get or write the value of this variable

    through a 'trigger '?

    Remove the var on the counter.

    Just so put this in compositionReady

    counter = 0;

    Then you can just call him in a trigger as

    Alert (Counter);

    or

    counter + 1;

    or as if (counter == 1) {}

    }

    or whatever.

    I hope this helps.

  • Can we use the value of a variable in a warning message

    I have a variable in forms6i. I want to use the value of this variable in an alert message. How is that possible?

    Gul says:
    I have a variable in forms6i. I want to use the value of this variable in an alert message. How is that possible?

    Try

    DECLARE err_txt VARCHAR2(200) t;
     al_id ALERT;
     al_button Number;
    BEGIN
    al_id := FIND_ALERT('My_Error_Alert');
    SET_ALERT_PROPERTY(al_id, alert_message_text, 'Hello how are you mr. variable '||:variable_name );
    al_button := SHOW_ALERT( al_id );
    END; 
    

    Hope it works...

    Hamid

  • problem by setting the value of a variable substitution in a calc script

    Hi all.


    I'm trying to update the value of a variable substitution inside an IF statement, and I have a problem.

    Here is the code:


    * "Jan" (*) "
    IF (LoopCounter = 1) & varEntity = "100";
    ENDIF ;)

    the error that I get back from Regional service is:

    Error: 1200336 error analysis [Jan] (line 54) formula: [()] without [)]

    It's tricky. Without really analyzing the details of your example, two options that might be worth a visit:

    1. write a MaxL script for updating the subvar (s), and then run the calc, x 20. 40 lines of MaxL and 500 lines of code is 10 000. Obviously, this only works if the launch of the MaxL script is feasible, and you know that you aren't going to have multiple instances of the calc (or any what calc which depends on these subvars) running at the same time. But I guess you're OK with the last part, because even your original solution would have this problem
    2 hyperion Business Rules

    I know that CL knows a lot of HBR, if he is here today...

  • Selective display of a report based on the value of a Variable of presentation

    Hello

    Is it possible to selectively display a report on a dashboard page based on the value of a variable presentation.

    I have 5 reports that are part of the same page that has a page with 5 options-level prompt.

    According to the option selected in the command prompt that the value is stored in a variable of the presentation, I need only 4 reports to view at any time (ie 1 report should NOT be directed).

    Example: -.

    When Option 1 is selected 1,2,3,4 reports must be posted
    When Option 2 is selected 2,3,4,5 reports must be posted


    Thanks in advance

    Hello

    Search this Guided Navigation forum. In this way, you can hide a section on your dashboard based on the results of a report that is "hidden".

    Good luck

    Daan Bakboord

  • How to control the value of a variable that is shared at the beginning of the vi

    Hi all

    In short: How can I make sure the values of the variables shared at the start of a vi?

    I have two vi.

    One is a main vi where did I order a shared Boolean variable "run DAQ".

    The other is a vi with a while loop that "polls" for the shared variable "Execute DAQ", which is connected to a box Structure. If the case is false, it does nothing, if it is true is short some simple IO DAQ within a while loop.

    To be sure that at the beginning of the vi the variable 'Execute DAQ' shared value false (no matter what 'State' the shared variable was left in front of the vi began) I write a Boolean constant to this shared variable 'Execute DAQ' out of hand while loop.

    Now my question: how is it possible that the case structure can enter into the 'True' State, even when main vi is not executed and there is therefore no way of the shared variable can be written in. I know that shared variables are stored in memory, but that's why I write it to false at the beginning of the vi.

    Even when I read the first shared variable before you change it with a constant False the second instance of the shared variable that is wired to the case structure bed to True.
    It seems to me that the shared variables do not follow the 'right' of the dependence of LabView and are updated outside the normal flow of the vi.

    Thanks for your time and advise on this.

    JackT wrote:

    Someone knows another way around this?

    Yes.  Do not use them.

    If you not post on a network, use a normal Global Variable or use a queue, the user event, stating to send commands indicating loops for updating their values.

    If on a network, then I recommend the network stream to send commands/data back with updates.  I used shared variables, more I hate them.

  • How to set the value of a variable in a cluster in LabVIEW to c#?

    Hi guys, I'm working on a small c# program, which by using the interface provided by LabVIEW.  And I know that, with the help of lv. SetControlValue (name, value) can set a variable just on the front panel. But in my case, there are several groups on the front panel. Then it confused me how to set the variables in these groups. For example, there is a cluster named clusterA and a variable named a., I tried something like this:

    lv.SetControlValue("clusterA.valueA",1);
    

    but it totally inoperable. Everyone has some experience with this sort of thing? Thank you very much!!

    Hey guys, thanks a lot for all your response. I just found a simple way to solve this problem. For example, there is a cluster named "ClusterA", and there are only two witnesses, who are: an int value named "IntA" (default = 10 IntA value) and a string value named "StringA" (by default the StringA = 'abc'). In c#, if you call the method:

    var clusterA is vi (Array). GetControlValue ("ClusterA");

    you will get a table looks like: clusterA = {10, 'abc'}; So if you want to change IntA 123, you simply do:

    clusterA.SetValue (123, 0); 123 the value, 0 is the index of IntA in clusterA, after this clusterA table = {123, 'abc'}

    After that, simply to make the table in LabVIEW using:

    VI. SetControlValue ("ClusterA", clusterA);

    and now you see the LabVIEW, IntA is changed.

  • Store the user receives the value in a Variable of Odi

    Hello
    I want to store the value user given (run-time) in a .txt file using shell script. If I want to change the value of the user given to the shell script. In the package, I put the variable in mode refresh as a first step, then the odioscommand link OK. When I try to run this package fails (* ODI-1246: * the logical schema has not been set for Input_Variable).

    FYI: -.
    I just create a simple numeric variable. Select the most RECENT VALUE for her and the schema is not defined. Default value is 0.
    After that this problem occurred I select the oracle, memory engine diagram diagram etc and run again the package/scenario but it the same result.

    Please advice
    Thank you
    Papai

    NB
    Here are the details of the problem: -.

    ODI-1246: the logical schema has not been defined for Input_Variable.
    at com.sunopsis.dwg.dbobj.SnpSessTask.getDefaultDwgConnectConnection(SnpSessTask.java:508)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSqlV.getExecutor(SnpSessTaskSqlV.java:428)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSqlV.processTask(SnpSessTaskSqlV.java:405)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2625)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSqlV.treatTask(SnpSessTaskSqlV.java:240)
    at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:558)
    at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:464)
    at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2093)
    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ 2.doAction(StartSessRequestProcessor.java:366)

    at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)
    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)

    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$ 0 (StartSessRequestProcessor.java:292)

    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ StartSessTask.doExecute (StartSessRequestProcessor.java:855)

    at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)
    to oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$ 2.run(DefaultAgentTaskExecutor.java:82)
    at java.lang.Thread.run(Thread.java:662)

    Yes. If you want to pass the variable at run time, then you will see a pop-up window. Here, you can pass the value.

Maybe you are looking for

  • "error recovery main area".

    Hello I can not access my old video files of my 6 16 GB iPhone, I'm using iOS 10.  When I try to open the videos that I always meet the message 'area main-fetching error' I can't specify when this problem started, but I'm sure it was good when I was

  • Dictation accessibility in Mavericks secondary Board

    I turned in Mavericks dictation (10.9.5). Everything went well: increased dictation has been downloaded and it works. When I go to accessibility in system preferences, in order to work with orders of dictation, however, there is no secondary on the l

  • Windows 8 Yoga 13 have slot for sim card?

    Guys, dose windows 8 yoga 13 have slot for sim card...? Thank you 1 million for your time Note from Moderator: Edition subject to the content of the game.

  • I can't find any help to fix my information bar in Windows Mail. It's like a split screen display.

    I can't find any help to fix my information bar in Windows Mail. It's like a split screen display. A suspected email "phishing" shows the warning in pink on the left side but right, I can still see the partial list of the names of "recipients" email

  • Error opening command run.

    Hi all... I get error when opening command run in my laptop (Windows 7 32 bit). Error message saying that "this operation has been cancelled due to restrictions in effect on this computer.please contact your system administrator". "" Please help me h