Syntax for calling on variable movie slip within its parent

I know my syntax is wrong based on the error I am getting, but I can't figure out any other way to do this:
Code:
var menuButtons:Array=["home","liveIntense","liveAblaze","liveBright","liveClean","about","co ntact","shirts","soaps","stickers","blog"];
for (var i:uint=0; i<menuButtons.length; i++) {
          addButtonListeners(menuButtons[i],menuButtons_mc,clickF);
function addButtonListeners(buttonName:String,buttonParent:MovieClip,clickFunction:Function):void {
          var button= new buttonParent_mc();
          buttonParent.addChild(button);
          button.x=buttonParent.this[buttonName+"_btn"].x;
          button.y=buttonParent.this[buttonName+"_btn"].y;
          buttonParent.this[buttonName+"_btn"].visible=false;
Output:
1084: Syntax error: expecting identifier before this.
I know the issue is here: buttonParent.this[buttonName+"_btn"].x
how can I call on moveiclips with different names that are within anothe movie clip?
Thanks!

use:
var menuButtons:Array=["home","liveIntense","liveAblaze","liveBright","li veClean","about","contact","shirts","soaps","stickers","blog"];
for (var i:uint=0; i<menuButtons.length; i++) {
          addButtonListeners(menuButtons[i],menuButtons_mc,clickF);
function addButtonListeners(buttonName:String,buttonParent:MovieClip,clickFunc tion:Function):void {
          var button= new buttonParent_mc();
          buttonParent.addChild(button);
          button.x=buttonParent[buttonName+"_btn"].x;
          button.y=buttonParent[buttonName+"_btn"].y;
          buttonParent[buttonName+"_btn"].visible=false;

Similar Messages

  • Syntax for using a variable in an equation.

    Hi all,
    Simple question here.  What is tha appropriate syntax for using a variable in a calculation equation.  Specifically, I am taking an established curve fitting equation from my channels and trying to calculate it over a lineargenerated data set to extend the curve  beyond the original data sample.  Here is the small portion of script I have that will not work.  Thanks for any help.
    dim a,b,c
    a = Data.Root.ChannelGroups(5).Channels("air consumption formula").Properties("ResultApprAnsatzCoef1").Value
    b = Data.Root.ChannelGroups(5).Channels("air consumption formula").Properties("ResultApprAnsatzCoef2").Value
    c = Data.Root.ChannelGroups(5).Channels("air consumption formula").Properties("ResultApprAnsatzCoef3").Value
    Call Calculate("Ch(""[5]/Air Consumption LG"")= ""a"" + Ch(""[5]/LinearGenerated"")*""b""+""c""*ch(""[5]/LinearGenerated"")^2")

    Hi Gloorious,
    I am using diadem script.  In my example above, for the equation, if I substitue a,b,and c with numerical values, the script runs just fine and the formula executes as desired.  Is there a way to place the variables there instead as I have tried to do (I was hoping it was just a syntax issue) or do I have to approach it a completely different way?
    This script will execute just fine:
    Call Calculate("Ch(""[5]/Air Consumption LG"")= 4 + Ch(""[5]/LinearGenerated"")*5+6*ch(""[5]/LinearGenerated"")^2")
    but this will not:
    dim a,b,c
    a = Data.Root.ChannelGroups(5).Channels("air consumption formula").Properties("ResultApprAnsatzCoef1").Value
    b = Data.Root.ChannelGroups(5).Channels("air consumption formula").Properties("ResultApprAnsatzCoef2").Value
    c = Data.Root.ChannelGroups(5).Channels("air consumption formula").Properties("ResultApprAnsatzCoef3").Value
    Call Calculate("Ch(""[5]/Air Consumption LG"")= ""a"" + Ch(""[5]/LinearGenerated"")*""b""+""c""*ch(""[5]/LinearGenerated"")^2")

  • Syntax for declaring global variable in report

    Hello all,
    Kindly let me know syntax for declaring global variable in report?
    Thnks,
    SUnny

    Hi Sunny,
    All data declaration in the main program is global.
    Only if you do some data declaration withtin the subroutines then the scope of the variable is limited to that FORM ....ENDFORM.
    As you read in the above reply for a global variable in FM you need to declare in the top include.
    This means that you want this variable to be made available to all the Function Modules in that Function Group.
    If you want to make the variabe be available only within that FM then do the declaration in the source code itself.
    hope this explaination helps,
    Taher.

  • Syntax for calling html page in PL/SQL package

    Hi,
    I'm trying to call html page (stored on server) in my pl/sql package!
    I have already create html page in pl/sql package code and it's works fine.
    Now create better html page (interface design) and stored on server. I would like to call that stored html page in my pl/sql package.
    What is syntax for calling html page in PL/SQL or could you suggest me some literature.
    In first option I had created ces and stored it on server. Then I call it in pl/sql package like htp.p('<link rel="stylesheet" href="\download\table_style.css" type="text/css">');
    I try someting like that for calling html page but it doesn't works.
    htp.p('<link rel="form" href="\download\interface.htm" type="text/html">');
    Does anyone know syntax for calling html page in pl/sql?!?
    Thanks!

    hello
    I normally use htp.anchor(URL,linkname);
    it works
    ammar sajdi
    www.e-ammar.com/Oracle.htm

  • Syntax for defining a variable  with size in changing parameters

    hi,
    syntax for defining a variable  with size in changing parameters in the form statement.

    Hi prasad,
    1. one option is to type it as an data element.
    eg.
    form abc changing myvar type char10.
    endform.
    where char10 is a data element with length 10 characters.
    regards,
    amit m.

  • Required syntax for calling a subscreen.

    hi,
    Can any one tell me the syntax for calling a subscreen.
    my task is to display both bar chart and pie chart adjacently in a single screen.
    Thanks.
    samyu.

    First you define a Subscreen area in the layout of the Screen where you want to call the Subscreen.
    For example the main Screen is ' 0100'.
    The Subscreen Area is ' SSA1' and the Subscreen is ' 0200'.  
    Then in the Flow logic of screen ' 0100' write the following code.
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0100.
    CALL SUBSCREEN SSA1 INCLUDING SY_REPID '0200'.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_0100.
    CALL SUBSCREEN SSA1.
    ===========================================
    The Syntax is :
    CALL SUBSCREEN Subscreen Area INCLUDING Program name 'Subscreen Number'.. 
    Plz reward if it helps..

  • What is the exact syntax for calling remote function module.

    Hi to all
    1.....what is the exact syntax for calling remote function module.?
    Thanks and regards,
    k.swaminath reddy

    hi
    good
    Lets do simple example where you will first create a RFC in one server (say A) and create normal program in othere server (say B). Finally you will call the RFC in A from B.
    Do the following steps for creating RFC in server A.
    1. log on to server A
    2. go to se37
    3. Edit -> function groups-> create function group and give the function group name (say ZGRP).
    4. create a FM ( say Z_TEST_RFC) in se37 providing the function group which is created just now.
    5. go to attribute tab -> choose remote-enabled module from processing type.
    so that your FM will become RFC.
    6. provide the import parameter in import tab.
    we will provide only two import parameters.
    - parameter name : P_NUM1, typing: TYPE, associated type : I & check the pass value (all the parameters of RFC must pass by value).
    - parameter name : P_NUM2, typing: TYPE, associated type : I & check the pass value
    7. provide the export parameter in export tab.
    parameter name : P_SUM, typing: TYPE, associated type : I & check the pass value
    8. write the given simple code in source code tab.
    FUNCTION Z_TEST_RFC.
    P_TOT = P_NUM1 + P_NUM2.
    ENDFUNCTION.
    Do the following steps for creating ABAP program which will call the RFC in server B.
    1. se38 - > creat a program.
    2. write the given simple code.
    data tot type i.
    call function 'Z_TEST_RFC' destination 'XXXXXX'
    exporting
    p_num1 = 10
    p_num2 = 15
    importing
    p_tot = tot.
    write tot.
    please note that XXXXXX is RFC connection which is avialable in sm59 transaction in server A.
    -go to sm59 - > abap connection (list of RFC connection configurations are avialable). choose server B connection and replace it of XXXXXX in the code.
    finally you can execute the normal abap program that will call the RFC and display the result.
    reward point if helpful.
    thanks
    mrutyun^

  • Syntax for calling Stored procedures?

    Seems straightforward but I just can get the syntax.
    Here's the procedure defined in SQL
    CREATE Procedure usp_InsTest
    @title varchar(150),
    @length int,
    @catid int,
    @date datetime,
    @filename varchar(50),
    @typeid int,
    @desc varchar(2000),
    @statusid int,
    @assign char(1),
    @languageid int = null
    as
    Insert into test(TestTitle,TestLength,TestCatID,TestDate,TestFileName,
    TestTypeID,TestDesc,TestStatusID,TestIsAssigned,
    TestLanguageID)
    values (@title,@length,@catid,@date,@filename,@typeid,@desc,
    @statusid,@assign,@languageid)
    GO
    I have tried a number of ways. What is the correct sytax for calling a stored procedure with variables?

    Here's what I've come up with...
    Connection dbConn;
    Driver d = (Driver)Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
    String URL = "jdbc:odbc:" + "cms";
    dbConn = DriverManager.getConnection(URL, "sa", "");
    CallableStatement s;
    String x = "{call usp_InsTest(@title,@length,@catid,@date,@filename,@typeid,@desc,@statusid,@assign,@languageid)}";
    Calendar c = Calendar.getInstance();
    s = dbConn.prepareCall(x);
    s.setString(1,TestTitle);
    s.setInt(2,Integer.parseInt(TestLength));
    s.setInt(3,6);
    s.setDate(4,new java.sql.Date(System.currentTimeMillis()));
    s.setString(5,TestFileName);
    s.setInt(6,Integer.parseInt(TestTypeID));
    s.setString(7,"Test Description");
    s.setInt(8,Integer.parseInt(TestStatusID));
    s.setInt(9,Integer.parseInt(TestIsAssigned));
    s.setInt(10,1);
    ResultSet r = s.executeQuery();
    I get
    java.lang.NullPointerException
    at sun.jdbc.odbc.JdbcOdbcPreparedStatement.clearParameter(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbcPreparedStatement.setChar(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbcPreparedStatement.setString(Unknown Source)
    at CMSBatch.addToDatabase(CMSBatch.java:242)
    at CMSBatch.actionPerformed(CMSBatch.java:312)
    at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
    at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
    at java.awt.Component.processMouseEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    Line 242 is the first setString.
    Is my prepareCall statement correct?

  • What is the correct syntax for using a variable in an ad hoc query?

    Hi all
    I am an occasional DB user and at the moment need to update about 1000+ records so that a certain column gets a unique value.
    So I thought that I would use a variable for this.
    I then built this kind of SQL statement for just a small subset of the records:
    variable recNumber number;
    exec :recNumber := 1;
    UPDATE TABLE_TO_BE_UPD
    SET COL_TO_BE_UPD = COL_TO_BE_UPD + recNumber
    WHERE COL_TO_BE_UPD IN ('VAL_A','VAL_B');
    I get the invalid SQL statement error when attempting to execute above (besides the prompt that asks for a value which I would like to omit).
    Anyway I also tried this one:
    CREATE SEQUENCE seqCounter;
    UPDATE TABLE_TO_BE_UPD
    SET COL_TO_BE_UPD = COL_TO_BE_UPD + seqCounter.NEXTVAL
    WHERE COL_TO_BE_UPD IN ('VAL_A','VAL_B');
    From this one I got the error ORA-01722: invalid number...I am guessing this comes because seqCounter is of type number and the COL_TO_BE_UPD is of type character...(?)
    So what I would like to ask is what is the correct way to define and use a counter type of variable to append a number at the end of a character string?
    Also another question that I would like to ask is that are variables that are used in ad hoc queries also called 'bind variables'?
    Thanks muchly

    If you want to append a unique number to a column then this would do it:
    UPDATE TABLE_TO_BE_UPD
    SET COL_TO_BE_UPD = COL_TO_BE_UPD ||to_char(rownum)
    WHERE COL_TO_BE_UPD IN ('VAL_A','VAL_B');

  • Syntax for calling method

    Hi,
       I've a component controller : Z_FPM_SPL_REC_SD, which is used a shared data component in my WD application.
    It has a method: read_tspl_obj.
    The usage defined in another component for it is: Z_FPM_SPL_REC_SD.
    I want to call this method read_tspl_obj in process_event method of this component.
    What shall be the syntax for the same?
    Thanks in advance!
    Rohit.

    try this
    String b = (String)am.invokeMethod("getValue", params);
    Thanks,
    Prasanna

  • Syntax for calling 1000 screen(abap o/p screen) from screen 200.

    Hi all,
    i need to change the SAP program relating to the transaction QA32.i have already changed the program & i added 2 screens in this program by using CALL SCREEN syntax.
    my problem is
    when i execute YQA32 (copy of QA32 with modification) transaction, i am getting the output in the screen 1000.when i double click on any material on that screen (1000), the control will go to screen 200 (CALL SCREEN 200).
      everything is going fine. but in screen 200, i have putted a 'BACK' push button. if i will press 'BACK' on screen 200, it should go to screen 1000 which is normal ABAP output screen(here,the output screen of YQA32).
    if i will put syntax like LEAVE TO SCREEN 1000 OR LEAVE PROGRAM OR LEAVE SCREEN, IT IS NOT WORKING. the control is directly going to program if i will add LEAVE PROGRAM.
    what syntax i need to use to come to screen 1000 from screen 200 in the BACK user command of screen 200.plz suggest.
    Thanks & Regards
    pabitra

    Hi joseph,
    thanks for ur help.The output of QA32 transaction  is comming on the sap standard selection screen '1000'. i am not creating this screen.i just modified sap program relating to transaction QA32 & named it as YQA32.This program is ALV designed.u can check transaction QA32.
      when i will put some data in the selection screen of YQA32 then i will go for execute, then my output comes on screen 1000 which is standard abap screen.i have not created screen 1000. from screen 1000, my control goes to other screen 200 by CALL SCREEN 200 statement.
    so when  i want to back to screen 1000 from screen 200 , i am writting LEAVE TO SCREEN 1000  in the  'BACK' user command of screen 200.but error is comming as screen 1000 does not exist.so plz suggest any syntax for this BACK operation.
    Regards
    pabitra

  • Any way to show a subvi's frontpanel within its parent with out the cumbersome "subpanel"?

    I'm writing an application, where several loops are running in parallel (e. g. read sensor data, receive UDP packets, send UDP packets, wait for input). Except for some configuration data, the loops are completely independent from each other (occasional communication is done via queues). Each of the loops will run indefinitely until told to stop by commands to a queue and is in its own subVI (otherwise the main blockdiagramm just containing the overall state machine would start to grow outside the screen, which is even worse than having to scroll in a text based language). Each of the subVIs also shows some information (status, sensor data, graphs, debugging).
    So the big question is: how can I show all these subVIs information in a single window?
    Using the "subpanel"-container is pretty much out of question. It adds almost as much clutter to the blockdiagram than the loops would do themselves (with "create vi reference", "insert vi", "run vi", "remove vi"; and that for every parallel subVI) and makes the code harder to maintain. Even worse, Labview is no longer able to tell me if one of the subVIs is currently broken (e. g. because there was a change in a typedef that requires changes in a subVI) until I run the complete program (or open each of the subVIs individually). Getting parameters into and out of the VIs isn't easy either that way (no more simple terminals).
    I thought about making the subVIs' appearance titlebar-/menu-/borderless and floating and hardcoding a pixel position for all of them. But I can't really control what resolution the PCs running this program will have. So I fear they will be all over the place with no possibility for the user to move them around. This would also mean the main windows would always have to stick to the top left, which in itself would annoy users.
    I remember having this problem already. My solution at this time was to make a copy of every frontpanelobject of the subVIs on the main VI (thereby cluttering the blockdiagram with heaps of unconnected terminals), creating a reference to that object, bundling them all together and writing it in a global variable. Then every subVI would pick out the references it needed and change the value with the value property node. Globals and changing the value per reference both being pretty bad Labview practice, it was still more manageable than dynamic calls to subVIs (which the subpanels comes to, although it shouldn't be needed). What making this approach not very practical this time, is, that some of the subVIs (and what they show) may be developed by other developers. This would mean for every frontpanel object they add/change/remove a reference needs to be added/changed/removed. While the reference list will be it's own cluster typedef, still all other subVIs will have to be updated, too.
    Maybe I missed something. But is there really no simple option like "show frontpanel when loaded at this position within parent frontpanel"? Would make things soo much easier and way easier to maintain.

    mikeporter wrote:
    I'm sorry I'm not aware of any "cumbersome" subpanels - unless of course you don't know what you're doing. There is this wonderful invention called a "subVI" that can be used to organize and simplify your code, or are they too "cumbersome" as well? You should really learn a bit about what you are pontificating over before you start running off at the mouth.
    Mike...
    I didn't want to step on your toes. No need to get personal.
    Subpanels make some additional code necessary that hasn't got to do anything with the actual program. And I AM using subIVs as I wrote in my first post, which is exactly the root of the problem.
    Nevertheless I now solved it in a way that comes close to what I wanted. I don't know if some of you meant your suggestions to be understood that way (at least I didn't ). The subVIs will now "insert" themselves (via invoke node) into a subpanel on the main vi, which they are given a reference of at call. This adds minimal aditional code, especially on the main VI which I want to keep as clean as possible. By clustering the panel reference into the parameters the subVIs are already given (not used in the example I attached below), there isn't even a change on the terminals of the subVIs.
    I got to check now if this works well with event structures within the subVIs or if it can create the same problems like multiple event structures within a single VI.
    So no global variables anymore and no writing values by property node. I don't know if this just wasn't possible in previous Labview versions I had a try at that (I guess it was 8.6 and/or 2009) or I just didn't come up with the idea back then.
    And if the text wasn't that helpful, here are two screens:
    Parent VI:
    SubVI:
    Attachments:
    main.png ‏2 KB
    subvi.png ‏5 KB

  • What is the syntax for calling function from class file by jsp

    does anyone here knows what is the syntax of how to call a function from java class file by javascript code or any way to call it?
    and where should i put the calling function code? because the function is called depend on the user click.
    for example
    <%=pc.functionName(a,b)%>
    for the variable a and b, how can i get the value from html textbox and put it in a and b...
    urgent needed...
    thx

    Jsp's are executed before the Html forms are created and loaded. Dont try to use a java code function calling on a javascript click. You'll have to explicitly redirect it into a servlet where in you can call the function you want.
    Well! another way could be using AJAX. That seems to be powerfull enough and it might also serve your purpose.
    Hope this helps

  • Syntax for calling a form & passing a query condition

    I have a stored PL/SQL procedure where I am attempting to link to a master detail form from a button created in the procedure. The procedure is called from a form based on a table.
    I want to pass an id from the first form to the second when the user clicks the button and have that id bring up the master record in the calling form (query condition to be automatically executed).
    I am using the Portal technical FAQ 10.10 as a reference. However, I must be off in the syntax. Here's what I have:
    objectId - contains id from calling form
    OBJECT_ID - column name in called MD form
    elsif (button = 'Subject Matters') then
    PORTAL30.wwa_app_module.link(
    p_arg_names =>
    PORTAL30.wwv_standard_util.string_to_table2('_moduleid:_show_header:OBJECT_ID:_OBJECT_ID_cond'),
    p_arg_values =>
    PORTAL30.wwv_standard_util.string_to_table2('2215270925:YES:'&#0124; &#0124;to_char(objectID)&#0124; &#0124;':%3D'));
    The best I get is the id passed and the called form opened in INSERT mode.
    I have been playing with this for days!
    If anyone spots the error in my code and could point it out, I'd greatly appreciate it.
    Regards,
    Judy

    try this
    String b = (String)am.invokeMethod("getValue", params);
    Thanks,
    Prasanna

  • DLL C/C++ syntax for Call Library Function Node

    Hello,
    I am interested in calling DLL from Labview and found several intersting tutorials on the Call Library Function Node. One interesting tutorial is Building a DLL with Visual C++ http://zone.ni.com/devzone/cda/tut/p/id/3056
    One can notice in the example presented in this tutorial that the parameters that are outputs of the exported function are of type pointers. And I am curious about the theory behind this. 
    I looked also at the example in LabVIEW Call DLL.vi and it seems that all outputs are pointers to the desired data type.
    I tried to write a short code where I assign a new value for one parameter in the export function. But this value is not updated in Labview. To make it clear: assume 50 is passed to an input parameter (on the left side of the Call Lib func Node). In the function, i assign 100 to this variable and expect this value on the output in Labview (right side indicator of Call Node) but the output remains 50.
    I am trying to change my code but i get errors in linking (compiling is ok) that I cannot understand. LINK : fatal error LNK1168: cannot open Debug/DoseDLL.dll for writing
    Error executing link.exe.
    I don't get any error with the code provided in the above tutorial   so i am trying to reproduce a similar code...
    Thank you

    Hello,
    Please find attached the source code in C, the DLL and the vi. 
    you notice in the C code that I set variable dose=100 and this is the value I would like to export as an output for labview (right side of Node) for whatever value in the input (i put 50 for input dose). In the current code, the same value of input dose (50) is passed to the output (i assume it has to do with the reference ?). The idea is that variables dose and rate should be set/calculated in the DLL function. 
    Thank you!
    Attachments:
    DoseDLL3.cpp ‏1 KB
    DoseDLL.vi ‏8 KB

Maybe you are looking for

  • Multiple Macs... sharing same iTunes folder....

    Not sure if there's a solution or not.... I have an external drive hooked up to my Airport Extreme. it's a shared drive for 3 of my Macs. That's where the iTunes folder is located for all machines as well (The drive is specifically for shared media).

  • Trying to run EBS within JDeveloper - GettingArrayIndexOutOfBoundsException

    I need some guidence with JDeveloper.... I had previously extended a page (CheckoutDistsPG - personalized Controll with a bit of edit check). It is working fine in Production. Now I need to make some changes to it so I copied down all the components

  • Canon powershot s5 image acquisition

    Hi. Am I able to control/acquire images from a Canon Powershot S5 IS digital camera in LV 8.6? I have managed to get this working with a simple USB webcam, using the NI-IMAQ for USB, but I can't find the Canon camera in IMAQ (it works with its own so

  • How do i get my stuff off icloud to my iphone

    how do i get all my stuff off icloud onto my new iphone?

  • What can I do to work with leadtools and IMAQ products?

    I'm a Microsoft Visual Basic Developer and I'm trying to work with IMAQ devices and ActiveX libraries such as LeedTools. My problem is that this ActiveX objects need to work with TWAIN devices and National Instruments doesn't support TWAIN's standard