Passing arrays in function in a dll

Hello

I have a dll below function

FI_API uint8_t FI_capture_settings_init_wrapper (uint32_t * cap_set, uint32_t sen_set *, uint32_t * rec_set uint32_t * exp_set)
{

* cap_set = (uint32_t) 55;

*(cap_set+1) = (uint32_t) 56;
cap_set [2] = (uint32_t) 57;
sen_set [0] = 54;

Return 1;

}

I call the function of library in labview. I initialize a global array of variables and pass it to the FI_capture_settings_init_wrapper(). After, I display the values in the table an indicator table as shown in the picture. The value is supposed to change in Labview. The API returns a value. But the table is not changed in labview. Please see my camerainit.vi

Your shared variable is an external resource that contains data, so when you read the excerpt from LabVIEW variable, shared data and copies in a local array, which is then passed to the DLL function. Because the table is not used after the call to the DLL, it is simply thrown then. Then you read the shared variable and LabVIEW retrieves its data, which has not been changed since and copy them again in a local array to show on front panel indicator. If you want the shared variable to represent the new data, you must rewrite the right Terminal to the explicitedly compose the node of the library in the shared variable. And the variable shared again just after reading is obviously completely false performance wise since the wire that came out the library node call already contains data and should therefore be wired by later use.

If your first problem is that you treat a shared variable as something that LabVIEW could be considered as an internal pointer that she cannot, the shared variable is hosted by the shared variable engine, which is a separate process and data access is on a TCP/IP based protocol. Even if it is a control on the front panel the code would that he should do, since LabVIEW as a data flow language will copy the data of the control in a local array and passing to the DLL, and unless you're writing the changed data that comes out of the right side of the rear Terminal in the control the data in the control will NOT change.

Then learn how data flow programming! LabVIEW is generally not about data as a reference that can be modified by reference to a function. Whenever LabVIEW suspect a function might modify the data passed in, it MUST create a copy of the data so don't up don't not the concept of stream which is the fundamental basis of LabVIEW programming by the window. Forget shared, globals variables and build local even in LabVIEW as a general programming, especially when you come from a traditional programming language such as C (++), VB or c#. A thread of LabVIEW is THE variable, and you should only use global and local variables if it is strictly necessary for something. Especially a shared variable as an external resource connected through TCP/IP is a killer of absolute performance and should only be used if you need to transfer and access the data between different (possibly the network connected) process.

Tags: NI Software

Similar Questions

  • Passing array of large piles of CLN fails

    Hello

    I am trying to pass an array of clusters to a DLL, but it is not passed correctly. I spent a few similar to this (although smaller) clusters without any problems before, but somehow it doesn't line up properly or something. What I'm trying to do is by the way a table of items followed by an information structure. The length of the array is the nItems parameter in the information structure. The problem is that when reading nItems in CPP code, that it is not with the value passed as you can see in the log file by pressing and the assertion error. This indicates that the structures are not transmitted correctly.

    It seems to me that the cluster corresponds to struct definitions and I'm sure that I use the correct settings in the CARS. I had trouble before with large bouquets where labview can get confused and I'd get instane questions objects but I don't know if that's the problem here.

    h file

    #pragma pack(4)
    typedef struct TKdlgItemVal
    {
        int intVal;
        double  doubleVal;
        char    szVal[256];
    } TKdlgItemVal;
    
    typedef struct TKdlgItemConf
    {
        int     nType;                  // The item type code (see below), replaces nParam2
        double  dX;                     // Item x position or 0 for default layout (was dParam1)
        double  dY;                     // Item y position or 0 for default layout (was dParam2)
        char    szText[256];            // The prompt string for the item, following | then tooltip is optional
        double  dWide;                  // Item width in dialog units.
        double  dHigh;                  // Item height for group boxes only.
        double  dLo;                    // Item value limits for reals and integers.
        double  dHi;
        double  dSpin;                  // Spinner value or zero for no spinner.
        int     nPre;                   // Precision for real items & max chars for string (0 for don't care).
        char    szList[1024];           // Selector list - items separated by | char. Required for list type.
        char    szLegal[256];           // Legal characters for string type, leave blank for all legal.
        TKdlgItemVal    sDlgItemVal;
    } TKdlgItemConf;
    
    typedef struct TKdlgInfoConf
    {
        int     nItems;                         // The number of dialog items
        double      dWide;                          // Dialog width
        double      dHigh;                          // Dialog height
        char        szTitle[60];                    // The dialog title
    } TKdlgInfoConf;
    #pragma pack()
    
    extern "C"  __declspec(dllexport) int setS2Dlg(TKdlgItemConf asDlgItems[], TKdlgInfoConf sDlgInfo);
    

    CPP file

    extern "C" __declspec(dllexport) int setS2Dlg(TKdlgItemConf asDlgItems[], TKdlgInfoConf sDlgInfo)
    {
        std::ofstream myfile;
        std::vector    m_asDlgItems;
        myfile.open ("logger.txt", std::ios::out | std::ios::app);
        myfile<<"NItems: "<
    

    Thanks in advance,

    M

    I wish I could delete this post because I feel very stupid. It was a simple case of transmitting a cluster to the CLN, but I forgot to set the parameters in the c code pointer rather than pass by value...

  • What is the right method to access the functions in a DLL compiled with a target of THIS (Arm)?

    I tried without success to access functions in a DLL that is meant for Windows CE.  My Labview application objective is a touchscreen the arm-based device.

    All, thank you very much for all your help.  I was still unable to find a method that did not produce an error when compiling... calls for a vi or a C file to be included.  (ex: [feature] is a missing file vi or C).  I also tried including the import library for the DLL, as shown above in the email from Paul, but I still received the same error.  This has been a problem for me, while testing with Win32 non-targets... in this case a device of THIS 5.0 touch screen based on the arm.

    However, I found a solution feasible and quite simple:

    Instead of trying to register the import library DLL as a file depending on the vi, I changed to build a DLL (and associated import lib) to build a static library (.lib) and included while .lib file as a dependent in the build specification.  This had the effect of linking statically, object code rather than wait for the vi compiler to compile the C source code or link a DLL import for a non-Win32 target library.  It is also not necessary to include an additional step in the installation of the DLL on the target device.  The library, I created is just a simple interface to another DLL already on the target device, which had struggled to interface directly to Labview.  Given that it is only a role of simple interface, this solution of library static woked well because it was not essential to have its available as a separately scalable DLL functions.

  • "Lack of function external lvanlys.dll ' when executing EXE

    Windows 7 x 32, LV2009SP1 / LVRuntime 2009

    I am trying to build an EXE from a customer code.  They use the analysis library (NI_AALBase.lvlib).

    It works well on my dev machine.  When I create the EXE file and place him on a target with LVRuntime on that machine, I get the error:

    Lack of function external lvanlys.dll: Mean_head:C NI_AALBase.lvlib:Mean.vi.

    I explicitly added the lvanlys library to the project.  I added the library as a source file in the build.  Finally, I added the DLL itself to the project and as a source for the build.

    Still the same error.  The DLL is located in the folder data after construction.  I tried to move it in the same folder as the EXE file and in the system32 folder.  Nope.

    I just changed the extension of the DLL to dllx and tried again, and I get the same error, so it looks that it can't find it.

    Do I need to register this DLL or something?  Is there a file?

    You are an installer of construction or simply transfer the executable file?

    If you are just transferring the executable file, make sure to include the folder "data" beside him.

    (You can also check if the target computer has the engine execution of std (~ 170 MB) and not only the minimum (38MO).)

  • CVI 2013 ' FATAL RUN - TIME ERROR: pointer to free memory passed to the function of library "when you access a struct of struct

    #include 
    #include 
    #include 
    
    typedef struct StringsStruct
    {
      char A[10];
      char AA[10];
    
      char B[10];
      char BB[10];
    
      char C[10];
      char CC[10];
    } StringsStructType;
    
    StringsStructType Strings = {0};
    
    char *const SelectedStrings[3] =
    {
      Strings.A,
      Strings.B,
      Strings.C
    };
    
    int __stdcall WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
                           LPSTR lpszCmdLine, int nCmdShow)
    {
      if (InitCVIRTE (hInstance, 0, 0) == 0)
        return -1;    /* out of memory */
    
      strcpy( SelectedStrings[1], "TEXT" );
      /*** FATAL RUN-TIME ERROR:   "main.c", line 32, col 11, thread id 0xXXXXXXXX:   Pointer to free memory passed to library function. ***/
    
      Breakpoint();
    
      return 0;
    }
    

    Any chance to get this working in 2013 CVI?

    "& Strings.A [0]" does not work either.

    Hello CVI - User!

    Thank you for reporting the issue. I filed the bug report # 423491.

    I did have a chance to get rid of the error by changing the definition of the structure, but I was able to get the program running by disabling execution checking when the fields in the structure are initialized:

    strcpy( (char*)(uintptr_t)SelectedStrings[1], "TEXT" );
    

    Or perhaps a more descriptive workaround solution:

    #define UNCHECKED(x) ((void*)(uintptr_t)(x))
    strcpy( UNCHECKED(SelectedStrings[1]), "TEXT" );
    

    Thank you

    Peter

  • Does anyone have an example VI for using the SendInput function in User32.dll?

    Hi all

    I am creating a VI that creates a click of the mouse.  I looked at the MSDN Web site and found that I need to use the SendInput function in User32.dll.  The problem is that some of the parameters for this function are nested structures.  How to use this function in a call library function node?  Is there already a LabVIEW wrapper for this function?

    Thank you

    MechEman

    I would use rather MouseEvent.  I looked at my VI and it can be cleaned up a bit, but it works for what you want to do.

  • error when pass array 1 d by data in table pointer via Labview-built c++ dll

    I'm trying to generate a Labview VI to a DLL and let it be invoked by vc ++, by which a 1 d array is passed. However, I can't generate the DLL when you use the data pointer to the table, which gives the error like below:

    [ERROR]
    Code :-2147221480
    Strengthening of the DLL.
    Error when compiling the DLL as a function name or a parameter is illegal. Check function and parameter names are legal C identifiers and are not inconsistent with the LabVIEW headers.
    Additional information: 9 project link errors
    Type Library generate error. MIDL.exe failed during the compilation of the odl file used to create the type library.
    Note: The error indicates that the odl file has unknown types. This error is possible when
    works with non-standard types is exported using the method qualifier exporting files in
    release the configuration that have not been recompiled during the build process.

    The Prototype of VI define is as below

    But, if I use the pointer to manage through the table, the generation is successful, error-free. I write something to call the DLL built labview, which basically reads 1000 double the data of an instrument.

    #include "TestDQMaxDLL.h"
    #include 
    
    using namespace std;
    
    int main(int argc, char** argv) {
        cout << "Start testing DQMax DLL" << endl;
    
        int leng{ 1000 };
        DoubleArray rawDPData = AllocateDoubleArray(leng);
        test_dqmax_dll(&rawDPData);
        cout << "Successfully invoked the DLL!" << endl;
        cout << "DoubleArray.len: " << (*rawDPData)->dimSize << endl;
        for (int i = 0; i < leng; i++)
        {
            cout << (*(rawDPData + i))->elt[0] << "\t";
            if (0 == i % 10)
            cout << endl;
        }
    
        system("pause");
    
        DeAllocateDoubleArray(&rawDPData);
    }
    

    But the printed results are not correct.

    My questions are:

    1. why cannot generate DLLS with the data of table pointer. In this case, the argument of the function is as simple as a double array.

    2. for table handle pointer, when the resutls are incorrect and how to get the good ones.

    Any comments would be appreciated.

    BTW: I use Labview 2012 with Visual c ++ 2013 on Windows7 64 bit.

    I never needed to pass a table of LabVIEW handle external code. Search this forum for posts of RolfK, it is most likely to have posted such an example. I recommend that you keep things simple and remodelling your table a table 1 d 2D before moving on to external code and manage as a 1 d table (it's just a little extra math).

    Sorry I don't have a solution on why you can't build with a 1 d as a pointer of table table. If you post your project I'm happy to try to build (I'm on LabVIEW 2012, however), but as you said, it will rely on another machine, it seems more likely to be a problem with something on the specific computer where there is a problem.

  • passing a reference structure in a dll (cvi) of EEG, a mistake-17502; System-level exception.

    Creates a container that matches parameter in cvi dll.  I have the container facility by checking the death of struct C using packaging of 8 bytes.  With the help of the adapter of the CVI has created an action.  When the step is executed, I get this error (17502; Except for system-level).

    Have you created a type of data customized to represent the struct (you say that you have created a container)? You specify the field for each variable type structure in the custom data type? You must configure each field to say TestStand what data type to use, for example, a number can be a double, int, short, or char, and TestStand needs to know that in order to create a corresponding structure correctly. Did you create an instance of this type to pass into the dll function? Thanks for posting the definition of structure, you use c if possible, also, please describe exactly how you configured each variable in the definition of type (custom data type), that you have created. If you are able to provide more information, we can try to see if there is a problem with the custom data type configuration.

    You can also take a look at what makes your function, the function code could lead to a breach of access or another exception of system level. You can launch the editor of sequence of CVI process debugging to debug your code module, or change the setting of the ICB card adapter configuration run the code a an external instance of the CVI.

    Hope this helps,

    -Doug

  • How to use the node function call library for a function in the dll with the data SUB type

    Hi all

    I would ask for your kind help

    I am facing a problem with the call library node.

    I have a C++ (stdcall) function, which has Sub as data type

    XXXX error code (hwnd, lid, getValue, * Sub data1, * Sub data2)

    data1 and data2 types are constantly changing based on the value of 'getValue '.

    Mainly I can use the call library node several times and adapt each node according to the types of data data1, data2 and extract the values and use in the code. Here is no question. Real question is:

    My question:

    How can I use a node of library time call and make a case according to the 'getvalue', who will control the data1, data2 data type. Here I really seeking solutions.

    My tests:

    I used varaints as entry to the libray call node of the data1, data2 and selected parameters in the call libraby node as "Adapt to type. Here labview just crashed.

    I appreciate your suggestions to feedbackand.

    Thank you

    Karine

    You must allocate enough space for data1 and data2, and then pass a pointer to this space. An easy way to do this is the function to initialize table. Set the U8 type and size for the number of bytes required. Pass this array to the function as a pointer of table data.

    After the function call returns, you need to extract the data in the table. You can do it manually, but a simple approach is to use the array of bytes to a string. Then, in a housing structure, use Unflatten chain to convert the string to the correct data type. This method also converts the "endianness" which will be probably necessary; Be sure to only set all entries for unflatten correctly.

  • Pass values to the function vs object pass to the function

    What is the best way to pass some values to the function?

    It is sufficient to indicate the characters or arrays of char etc something like this: function (float x, float [] z)

    or

    Create class (object)... say ValuesToPass vltp;  with the variables, the set and get methods.

    Assign values: vltp.setX = blah, blah = vltp.setZ

    ...  And not vltp to the function like this: function (vltp) and the values of the extract by using the get methods...

    What sense would be less time and consume of heap space?

    From my point of view - by passing the values as values would be faster, but I'm new to java and can't be 100% sure on this subject...

    Thank you

    If a method will work on three different bits of data, such as arrays of 2 char and int, so I suspect that most people would say just pass these as parameters rather than creating a "temporary" object just to contain these.

  • passing parameters to functions triggered event

    Hi all
    I created a button and added EventListener.
    as mybutton.addEventListener (MouseEvent.CLICK, clickSt);
    When I apply the clickStart function (event: MouseEvent) I'd like to
    an array, a string to the function as parameters. How can I do this.
    is it possible or not.
    thanx.

    Well, not this way.
    The function automatically receives a parameter when you create a reminder with this 'addEventListener' function, this parameter is datatyped as the event type that you defined in the callback, in your case "MouseEvent". If you want to pass more data when the function is called so you have create your own event class because almost all of the events just inform when something happened and send limited information. You can consult the documentation on creating a custom event class, there is a lot of info on the subject.

  • Cannot find the function in the dll library

    I'm trying to use the function I build in a C++ of Labview "Call library function" dll, but it cannot find the name of the function "Add" or "divide". Attached my .dll, file .cpp and screws, could you help me to find out where is the problem?

    The only function exported in your original of the CPP file is the

    add_num()
    

    function. Declare the object as static methods does not export them. It just creates methods of objects that do not have an implicit object as the first parameter pointer and so these functions cannot reference the data object members (but your class has none yet).

    Essentially if you intend to do all your static class methods, using a class is actually pretty meaningless. You would be better with simple standard C functions as your add_num() function is.

  • newbie on passing variables between functions

    Hi, I'm new to flash development and did only Java, C++, assembler before. This issue will be probably fairly simplistic. I want to click on a button, which will then call on another method, pass it several integers (ints) and the method returns an int after certain operations. Here is a snippet of my code.

    package
    {
        import flash.display.Sprite;
        import flash.events.MouseEvent;
        import flash.media.Sound;
        import flash.text.TextField;
        import flash.text.TextFormat;
    
        import mx.controls.Text;
    
        import qnx.ui.buttons.Button;
        import qnx.ui.buttons.LabelButton;
        import qnx.ui.text.TextInput;
    
        import spark.components.TextArea;
    
        // The following metadata specifies the size and properties of the canvas that
        // this application should occupy on the BlackBerry PlayBook screen.
        [SWF(width="1024", height="600", backgroundColor="#cccccc", frameRate="30")]
        public class AIRHelloWorld extends Sprite
        {
            public function AIRHelloWorld()
            {
                //var R1 R2 and R3 are declared and read from here. 
    
    //here is where the call should happen
    //calculation button
                var total:Button = new Button();
                total.addEventListener(MouseEvent.CLICK, calculate, R1, R2, R3); //this should return an int
    
                //textformat for the calculate button
                var Calformat:TextFormat = new TextFormat();
                Calformat.color = 0xAA0000;
                Calformat.color = 0xAA0000;
                Calformat.size = 24;
                Calformat.italic = true;
                Calformat.align = "center";
    
                //text for the button
                var text:TextField = new TextField();
                text.text = "Calculate";
                text.setTextFormat(Calformat);
    
                //add text to calculation button
                total.addChild(text);
    
                stage.nativeWindow.visible = true;
            }
    
            private function calculate(event:MouseEvent, R1:int, R2:int, R3:int):int {
                return 0;
            }
    
            private function closeWindow(event:MouseEvent):void{
    
                stage.nativeWindow.close();
            }
    
            private function goToBackWindow(event:MouseEvent):void {
                stage.nativeWindow.orderToBack();
    
            }
        }
    }
    

    Needless to say, Adobe Flash builder don't like what I'm trying to do. Apparently EventListener does that take Boolean arguments. So how the values of R1 R2 and R3 to the function calculate?

    Thank you for your time

    Hello and welcome:

    In Flash/Flex/AIR event model is very simple and flexible.  In your example, it is better to create a LabelButton and add the event listener to that (fewer lines of code).  As:

    var button: LabelButton = new LabelButton();

    Button.label = "Push Me";

    button.addEventListener (MouseEvent.CLICK, DoCalculate);

    If necessary, adjust the location

    addChild (button);

    When the mouse is clicked, a "MouseEvent" event is sent to the DoCalculatefunction.  All event listeners must accept a parameter of an event. All events derive from the class of events 'event '.  Thus, the type of parameter can either be a MouseEvent from that which was given to generate, or the most high quality event.

    private function DoCalculate (event: Event): void

    {

    do something

    }

    Now what needs to be calculated would be information in the same point of view or accessible to the DoCalculate method.  So if you have 3 domains (e.g., TextInput), then those would be deprived of the main view and then attributes can be used to determine the result of the mouse click.  For example:

    SerializableAttribute public class MyApp extends Sprite

    {

    private var r1: TextInput = new TextInput();

    private var r2: TextInput = new TextInput();

    private var r3: TextInput = new TextInput();

    public void MyApp()

    {

    Add text entry to display a list

    make the application visible

    create a button

    Add button click listener

    }

    private function DoCalculate (event: Event): void

    {

    var sum: int = parseInt (this.r1.text) + parseInt (this.r2.text) + parseInt (this.r3.text);

    do something with sum

    }

    }

    Hope that helps.

  • How to access vector &lt; int &gt; data passed to the function of iteration?

    So, basically, I have all the work by accomplished Supercomputing in the Render() function and threw a vector < int > (with all my final pixel already calculated and stored inside values) to the iteration function.

    However, when I go to assign: output-> red-> green, out-> blue, out-> alpha , result is a revamped image:Screen Shot 2015-07-03 at 2.33.53 AM.png

    My pixel processing function that I pass to the iteration inside the function Render() function looks like this:

    IM with the final pixel data in a vector < int > called given that present a size() of (width * height * 4) with values in rgba order.

    public static PF_Err

    () drawTriangles8

    void * Conref.

    A_long xL,

    A_long yL,

    PF_Pixel8 * inP,

    PF_Pixel8 * output)

    {

    PF_Err err = PF_Err_NONE

    TriangulateInfo * tInfo = reinterpret_cast<TriangulateInfo* > (Conref);

    if (tInfo) {

    Output->Red tInfo->data= [(int) ((xL * 4) + (yL * tInfo->width * 4))];

    Output->Green tInfo->data= [(int) ((xL * 4 + 1) + (yL * tInfo->width * 4))];

    Output->Blue tInfo->data= [(int) ((xL * 4 + 2) + (yL * tInfo->width * 4))];

    Output->alpha tInfo->data= [(int) ((xL * 4 + 3) + (yL * tInfo->width * 4))];

    }

    return err;

    }

    I tried just to save the values of the original image with no calculations done RGBA and try them back on the resulting image so that it remains unchanged and I get always the same the smeared image search. No idea what's going on?

    This is not the point of my last answer.

    my point was that you store in your vector, the pixels in this order:

    x0y0 x0y1, x0y2... x1y0, x1y1, x1y2...

    Maybe the way you shoot you pixels from the vector assume they are

    ordered:

    x0y0 x1y0, x2y0... x0y1, x1y1, x2y1...

    If that's true, which would explain the image being on his side, and the

    the offset to the line you see.

  • Problem with counting function, passing VARs between functions.

    Hi guys, I have a problem with this section of code...

    Could anyone suggest how to fix the function at the bottom so that when the button forward_btn with label "go to next Point training" when you click on recalculate the fields created in the function fileLoaded

    var xmlData:XML = new XML ();
    var theURL_ur:URLRequest = new URLRequest ("xml.xml");
    var loader_ul:URLLoader = new URLLoader (theURL_ur);
    var more: RegExp = / \ + / g;
    var t:Number = 0;
    var tmax:Number = 0;

    loader_ul.addEventListener ("complete", fileLoaded);

    function fileLoaded(e:Event):void {}
    xmlData = XML (loader_ul.data);
    Tmax = xmlData.Record.length ();
    trace (tmax);

    trace (unescape (xmlData));
    trace (xmlData.Record.length ());


    var title_tp:String = unescape(xmlData.Record.TP.Title[t]).replace (, "");
    Title_TP_txt. Text = title_tp;

    var intro_tp:String = unescape(xmlData.Record.TP.Introduction[t]).replace (, "");
    Intro_TP_txt. Text = intro_tp;

    static_tp_intro.y = Title_TP_txt.y + Title_TP_txt.textHeight + 10;
    Intro_TP_txt.y = sta_tp_intro.y + sta_tp_intro.textHeight + 5;

    Title_TP_txt. AutoSize = TextFieldAutoSize.LEFT;
    Intro_TP_txt. AutoSize = TextFieldAutoSize.LEFT;
    }

    forward_btn.label = "go to the next Point training";
    forward_btn.addEventListener (MouseEvent.CLICK, next_if);

    function next_if (me: MouseEvent): void {}


    If (t == tmax) {play();  }


    else {t = t + 1;
    fileLoaded () ;}
    }

    I don't see where you have a question from vars between functions because you do not pass everything.  Maybe that's your problem.  The function fileLoaded expects an argument, but you are not providing one.  To get around that you should provide any argument being sent in the first function...

    function fileLoaded(e:Event=null):void {}

    Another option would be to separate features and put a quick end to the function fileLoaded and create another function that holds the rest of the code...

    function fileLoaded(e:Event):void {}
    xmlData = XML (loader_ul.data);
    Tmax = xmlData.Record.length ();

    processXMLData();

    }

    function processXMLData (): void {}
    trace (tmax);

    trace (unescape (xmlData));
    trace (xmlData.Record.length ());

    var title_tp:String = unescape(xmlData.Record.TP.Title[t]).replace (, "");
    Title_TP_txt. Text = title_tp;

    var intro_tp:String = unescape(xmlData.Record.TP.Introduction[t]).replace (, "");
    Intro_TP_txt. Text = intro_tp;
      
    static_tp_intro.y = Title_TP_txt.y + Title_TP_txt.textHeight + 10;
    Intro_TP_txt.y = sta_tp_intro.y + sta_tp_intro.textHeight + 5;
      
    Title_TP_txt. AutoSize = TextFieldAutoSize.LEFT;
    Intro_TP_txt. AutoSize = TextFieldAutoSize.LEFT;
    }

    forward_btn.label = "go to the next Point training";
    forward_btn.addEventListener (MouseEvent.CLICK, next_if);

    function next_if (me: MouseEvent): void {}

    If (t == tmax) {}

    Play();

    } else {}

    t = t + 1;
    processXMLData();

    }
    }

Maybe you are looking for