Targeting variables in other symbols

I am trying still to simulate a collision funcionality, so i tought that if i put a bullet, wich will say, close, far, not so far, and a matching enemy variable i could make illusion of this. so i been able to compare variables in symbol and if else acording the response, but i want to do a & statement to compare the 2 variables in the 2 symbols and i been unsuccesfull, this is what i have:
sym.setVariable("bala", "close");
//obtener el valor de un símbolo de variable
var mybala = sym.getVariable("bala");
//alert(mybala);
if (mymalo == "close" & mybala == "close"){
          //sym.getComposition().getStage().getSymbol("colores").play("verde");
          //sym.getComposition().getStage().getSymbol("gradient").play("tres");
          alert("both true")
          // detener la línea de tiempo en la posición determinada (ms o etiqueta)
I know i must do a complete target path for the variables but dont know how to do it on edge! here is the files: http://mazatlanonline.net/canion2.rar
I try to do full path with this but it dint work
if (sym.getComposition().getStage().getSymbol("malo").getVariable("mymalo") == "close" & sym.getComposition().getStage().getSymbol("canion2").getSymbol("bala2").getVariable("myba la") == "close"){
          alert("both true")
          // detener la línea de tiempo en la posición determinada (ms o etiqueta)
but no alert!
thanks a lot for the help buddies

Hi there,
If you are doing an AND comparison, then you want to use the && operator, correct?
i.e., if (mymalo == "close" && mybala == "close")..
hth,
Joe

Similar Messages

  • Checking for an updated variable value in symbol timeline

    I'm making a puzzle which involves moving crates in a specific order to get a character from one side to the other. Take a look at http://tinyurl.com/c4vwcj9 to get the gist of it.
    Each crate is a symbol with it's own timeline. A crate may only move a pre-determined direction and distance once clicked. No more than 2 crates can be pulled out of the grid at any one time.
    The timeline of each symbol has three states: "Original", "Moved" and "Returned".
    If you have a play around with the puzzle as it stands so far, you will see most of the logic arguments work ok. However, the problem I have is when you pull a crate out of the grid and it needs to check if it can move back into place.
    To see what I mean:
    - Pull out the bottom left corner crate
    - Move the crate to the immediate right, thereby blocking the previous crate
    - Try to move the bottom left corner crate again (you should get an error message and it shouldn't move - this is fine)
    - Move the other crate back to it's original position to unblock the previous crate
    - Try to move the bottom left corner crate a final time (you still get the error message and it doesn't move - this is not fine!)
    A quick debug has revealed the second mouse click doesn't fetch the updated variable AFTER the symbol timeline begins to play, but the same methodology works just fine for crates that check for impeded movement BEFORE a symbol timeline is played (try one of the inner crates). Why isn't it getting the updated value and what can I do to solve it?
    Below is a sample of the code specific to the bottom left crate. I've highlighted the variable and arguments specific to the problem. Please excuse what is no doubt poor Javascript coding conventions - I only started learning this last week!
    //-- Get needed variables
    // Check to see if other crate is impeding movement and define value as a variable
    var myCrateCheck = sym.getComposition().getStage().getSymbol("_b_2x1crate_h").getVariable("Crate2");
    // Check to see what this crate's status is and define value as a variable
    var mySelfCheck = sym.getComposition().getStage().getSymbol("_bl_3x1crate_h").getVariable("Crate1");
    // Check to see if other crates have been moved out of the main grid. Parse value as an integer in base 10.
    var myGridCheck1 = parseInt(sym.getComposition().getStage().getSymbol("_br_2x1crate_v").getVariable("Crate3_ grid"),10);
    var myGridCheck2 = parseInt(sym.getComposition().getStage().getSymbol("_bl_4x1crate").getVariable("Crate4_gr id"),10);
    var myGridCheck3 = parseInt(sym.getComposition().getStage().getSymbol("_bl_2x2crate").getVariable("Crate5_gr id"),10);
    var myGridCheck4 = parseInt(sym.getComposition().getStage().getSymbol("_cl_2x1crate_h").getVariable("Crate9_ grid"),10);
    var myGridCheck5 = parseInt(sym.getComposition().getStage().getSymbol("_cl_1x1crate_1").getVariable("Crate13 _grid"),10);
    var myGridCheck6 = parseInt(sym.getComposition().getStage().getSymbol("_cr_3x1crate_h").getVariable("Crate16 _grid"),10);
    var myGridCheck7 = parseInt(sym.getComposition().getStage().getSymbol("_tl_2x1crate_h").getVariable("Crate17 _grid"),10);
    var myGridCheck8 = parseInt(sym.getComposition().getStage().getSymbol("_tc_2x2crate").getVariable("Crate18_g rid"),10);
    var myGridCheck9 = parseInt(sym.getComposition().getStage().getSymbol("_tr_2x1crate_h_1").getVariable("Crate 19_grid"),10);
    var myGridCheck10 = parseInt(sym.getComposition().getStage().getSymbol("_tl_3x1crate_h").getVariable("Crate20 _grid"),10);
    var myGridCheck11 = parseInt(sym.getComposition().getStage().getSymbol("_tr_2x1crate_h_2").getVariable("Crate 21_grid"),10);
    // Create a variable called myGridCheckSum, make sure it's a number and sum the above
    var myGridCheckSum = 0;
    myGridCheckSum = myGridCheck1 + myGridCheck2 + myGridCheck3 + myGridCheck4 + myGridCheck5 + myGridCheck6 + myGridCheck7 + myGridCheck8 + myGridCheck9 + myGridCheck10 + myGridCheck11;
    //-- Logic & Conditional Statements
    // If this crate is in any position other than "Moved", and more than 1 box is already out of grid zone - prevent move and alert
    if ((mySelfCheck != "Moved") && (myGridCheckSum >1)){
    alert('Too many boxes outside of grid zone');
    sym.stop();
    // Or else, if this crate is in any position other than "Moved", but less than 2 boxes are out of grid zone - allow move
    else if ((mySelfCheck != "Moved") && (myGridCheckSum <2)){
    sym.play();
    // If this crate has moved but the other crate hasn't moved, play remainder of symbol timeline
    else if ((mySelfCheck == "Moved") && (myCrateCheck != "Moved")){
    sym.play(3001)
    // If this crate has moved and the other crate is also moved, alert and loop back on timeline
    else if (myCrateCheck == "Moved"){
    // Alert user to say crate cannot be moved
    alert('This box is being blocked by another!');
    sym.play(2999);

    Resolved. Silly little syntax error on a variable rewrite on another symbol!

  • Accessing the variable in field symbol of nested internal table

    Hi,
    I am unable to access the variable in field symbol.
    The data in field symbol has nested structure. We need to access a variable in nested structure.
    Please find the code below:
          LOOP AT <i_fincorp> into <fs_fincorp>.
            l_madefor = <FS_FINCORP>-data_UI-ZZ0010.
          ENDLOOP.
    datatype of <i_fincorp> is type any table and <fs_fincorp> is type any.
    there is a structure 'data_ui' in <i_fincorp> and we need value of field 'ZZ0010' in data_ui structure.
    But, we are getting syntax error for statement in loop stating "There is no component like 'data_ui' in <fs_fincorp>".
    Can anyone please help me solving this issue.
    Regards,
    Santosh

    So simply access it dynamically
    data: nested_field type c length 50.
    field-symbols <nested_field> type any.
    "build the nested field name dynamically
    concatenate
           'DATA_UI'    "first give structure name
           'ZZ0010'  "then give field name (all in uppercase!)
    into nested_field
    separated by '-'.  "now you have DATA_UI-ZZ0010
    "so assing this nested field
    LOOP AT <i_fincorp> into <fs_fincorp>.
       assign component (nested_field) of structure <fs_fincorp> into <nested_field>. 
    ENDLOOP.
    Regards
    Marcin

  • XSLT Transform issue : Same target variable

    Hi all,
    I have to make 4 database transactions and each database output variable updates the schema output variable.
    so i have 4 db adapters (and their corresponding assigns) followed by 4 transforms. Now the problem is that all the transforms have the same target variable . And the final output has the data only from the last trasnformation. The previous three are getting overwritten.
    i have for-each ie unbouded element coming from all the database queries - so cant do away with the transformations.
    i am using Oracle BPEL 10.1.3.3 and JDev 10.1.3.3.
    Please reply fast.
    thanks and regards,
    vishal

    Hi,
    Create 4 global variables of type "Target schema in the transformation" and then whenever you get the response from the db adapter you just assign it to the corresponding variable.Finally you have 4 variable of the same schema type so you can append the four variabel or do what ever you want.
    Regards,
    Yuvaraja S

  • Reagrding write from variable to other...

    Hello,
    I want to know following difference. In case a), the date from variable v_fromdat exactly get copied into a field of internal table chg_roles-from_dat but in case of b) the v_fromdat gets copied with different format.
    a) chg_roles-from_dat = v_fromdat.
    b) write v_fromdat to chg_roles-from_dat.
    Regards,
    Rajesh.

    If we have v_formdat = sy-datum than it will:
    a) chg_roles-from_dat = v_fromdat.
    chg_roles-from_dat  will have 20080814
    Here chg_rols-from_dat should be TYPE D.
    b) write v_fromdat to chg_roles-from_dat.
    chg_roles-form_dat will have 08/14/2008 (based on your date settings MMDDYYYY or DDMMYYYY).
    Here chg_roles-form_dat should be type CHAR10
    Basically this statement WRITES the data to the target variable as it writes the data to output.
    Regards,
    Naimesh Patel

  • How to find the value of a variable in other program

    How to find the value of a variable in other program say I am in a FM and this FM is being called in from other program and I want to know some of the variable details of the program from the FM itself. Imagine if this is a txn. and I need to know the details from some of the programs while executing the same transaction
    Regards
    Vin

    Hi Vinayak,
         you will be having your first program values in internal table or some variables,
        when you are calling the second program you wii use like this,
        SUBMIT <Second Program Name> USING SELECTION-SCREEN '1000'
                           WITH s_emp(second program select-options)   IN t_emp(first program variables)
                           WITH p_chk   EQ t_chk
                           WITH p_r1    EQ t_r1
                           WITH p_month EQ t_month
                           WITH s_cust1 IN t_cust1
                           WITH p_r2    EQ t_r2
                           WITH s_cust2 IN t_cust2
                           WITH s_week  IN t_week
                           AND RETURN.
    you have pas like this to get your first program details.

  • How to access variables from other class

        public boolean inIn(Person p)
            if  (name == p.name && natInsceNo == p.natInsceNo && dateOfBirth == p.dateOfBirth)
                 return true;
            else
                 return false;
        }//returns true if Person with same name/natInsceNo/dateOfBirth as phello,
    here am trying to compare the existing object with another object.
    could you please tell me how to access the variables of other class because i meet this error?
    name cannot be resolved!
    thank you!

    public class Person
        protected String name; 
        protected char gender;      //protected attributes are visible in the subclass
        protected int dateOfBirth;
        protected String address;
        protected String natInsceNo;
        protected String phoneNo;
        protected static int counter;//class variable
    //Constractor Starts, (returns a new object, may set an object's initial state)
    public Person(String nme,String addr, char sex, int howOld, String ins,String phone)
        dateOfBirth = howOld;
        gender = sex;
        name = nme;
        address = addr;
        natInsceNo = ins;
        phoneNo = phone;
        counter++;
    public class Store
        //Declaration of variables
        private Person[] list;
        private int count;
        private int maxSize;
    //constructor starts
        public Store(int max)
             list = new Person[max];//size array with parameters
             maxSize = max;
             count = 0;
        }//end of store
    //constructor ends
    //accessor starts  
        public boolean inIn(Person p)
           return (name == p.name && address == p.address && natInsceNo == p.natInsceNo);
        }//returns true if Person with same name/natInsceNo/dateOfBirth as phope it helps now!

  • Read variable from other method

    i am coding a method which required a reading from a variable in another method.
    what's the syntax for getting the variable???
    I tried.....
    ++++++++++++++++++++++++++++++++++++++++++++++++++
    public static void main (String[ ]args)
    range_1
    private static double area (int radius, final double pi)
    radius = range_1
    return radius * radius * pi
    ++++++++++++++++++++++++++++++++++++++++++++++++++
    but it doesn't work

    "private static double area (int radius, final double pi)"
    final double pi? as the method parameter? ROFLHAHAHAHAHAHAHAHAHAHAHA
    That made my day.
    As for your question, make range_1 a global variable, in other words, declare it outside your main method
    Something like
    public class gary{
    int range_1;
    public static void main (String afgfg[]){
    range_1=//something;
    private static double area (int radius)
    radius = range_1
    return radius * radius * 3.14

  • How do I add a video time trigger to control other symbols?

    I would like to use a video to trigger when other Symbols appear on the Stage at different times in the video. I've used the following code:
           var vid = sym.$("VideoSymbolName")[0];
           vid.addEventListener("timeupdate", function() {
                 if (this.currentTime >= 4) {
                   // Do Something This code loads a symbol into a container
                      var firstS = sym.createChildSymbol("SymbolName", "ContainerName");
            }, false);
    However, that loads the picture repeatedly, and several instances appear on the stage, so I tried using this code:
           var vid = sym.$("VideoSymbolName")[0];
           vid.addEventListener("timeupdate", function() {
                 if (this.currentTime >= 4) {
                   // Do Something This code loads a symbol into a container
                    var con= sym.$("PicPortal");
                    con.empty();
                      var firstS = sym.createChildSymbol("SymbolName", "ContainerName");
            }, false);
    However, that makes the loaded Symbol "flash", as it is constantly loaded and unloaded in the container.
    Any other ideas?
    Thanks

    The only method available to show current time in Keynote used Quartz Composer, however the current version of Keynote 6.2, does not support Quartz.

  • Pronounciation of - and other symbols in OO ABAP

    Hello experts,
    Since I am new to object oriented abap, please tell me how the symbol -> is pronounced in OO ABAP?
    how the symbol => is pronounced in OO ABAP?
    For example:  CALL METHOD l_ref_idoc->parse_segment
    What are the other symbols those are used in OO abap?
    Thank you,
    anand.

    Hi,
         Instance components exist separately in each instance (object) of the class and are referred using instance component selector using u2018u2019.
         Static components can be used without even creating an instance of the class and are referred to using static component selector     u2018 =>u2019 .
    CLASS c1 DEFINITION.
    PUBLIC SECTION.
      data : i_num type i value 5.
      class-data :   
        s_num type i value 6 .
    ENDCLASS.
    CLASS c1 IMPLEMENTATION.
    ENDCLASS.
    START-OF-SELECTION.
    DATA : oref1 TYPE REF TO c1 .
    CREATE OBJECT : oref1.
    write:/5 oref1->i_num.
    write:/5 c1=>s_num .
    write:/5 oref1->s_num.
                             Instance, self-referenced, and static methods can all be called dynamically; the class name for static methods can also be determined dynamically:
    u2022     oref->(method)
    u2022     me->(method)
    u2022     class=>(method)
    u2022     (class)=>method
    u2022     (class)=>(method)

  • Calling one variable to other variable ( alphanumeric)

    Hi All,
    I have scenario where I am calling one variable to other variable in ODI.
    For example.
    Lets say I have two variable V_SET1 & V_SET2
    V_SET1 :
    Variable type : alphanumeric , Historize,
    Refreshing : SELECT #V_SET1 FROM DUAL to historize value.
    Now I am using V_SET1 in V_SET2
    V_SET2:
    Variable type : alphanumeric , Historize,
    Refreshing :
    select SOURCE_NAME from EXTRACT_PGSQL_DETAIL where OE_DETAILS = # V_SET1
    Both variables are inside scenario I am passing value of V_SET1 at run time as parameter 'TEST'
    V_SET1 is executed sucessfully & TEST is stored is historized
    BUT in V_SET2 V_SET1 value is getting passed in " quotes & i am geeting error of INVALID IDENTIFIER "TEST"
    select SOURCE_NAME from EXTRACT_PGSQL_DETAIL where OE_DETAILS = # V_SET1 ( "TEST") -- error inavlid identifier.
    How can I covert the value of TEST from "TEST" to 'TEST' in second Variable V_SET
    Edited by: neeraj_singh on Jun 24, 2011 3:15 AM

    Hi,
    Try this if not,
    select SOURCE_NAME from EXTRACT_PGSQL_DETAIL where OE_DETAILS = '#V_SET1'
    Thanks,
    Guru

  • Retreive int variable from other pages.

    Hi,
    My program is something like this:
    Content.jsp
    <script type="text/javascript">
    function clicked2()
    var x2;
    for (var i = 0; i < form1.radio.length; i++)
    if (form1.radio.checked)
    x2=(form1.radio[i].value );
    document.form2.hiddenTextBox.value = x2;
    </script>
    <%int i=0;
    for(int l=1;l<=(Ress.size()/4);l++){ //Ress is my vector of results
    %>
    <tr>
    <td width="10%">
    <form method="get" name="form1" action="Update.jsp">
    <fieldset>
    <input type="radio" name="radio" value="<%=l%>">
    </fieldset>
    <input type=submit name="submit" value="Update" onclick="clicked2()">
    </form>
    <br><br>
    <form name="form2" method="get" action="content.jsp">
    <input type=submit name="submit" value="Delete" onclick="clicked2()"><br>
    <input type="hidden" name="hiddenTextBox"><br>
    </form>
    <br>
    <% int y2 =0;
    if(request.getParameter("submit") != null){
    y2 =Integer.parseInt(request.getParameter("hiddenTextBox"));
    session.setAttribute("num",new Integer(y2));
    //For deleting data
    String Result="";
    Result=mb1.deleteRow(y2);
    if (Result.trim().toLowerCase().equals("deleted")){
    out.println("Deleted from the database");
    }else{
    out.print(Result);
    }%>
    update.jsp
    <%Integer i1=(Integer) session.getValue("num");
    int i2=Integer.parseInt("num");%>
    <td width="65%">
    <input type=text name="textno" value="<%=i2%>">
    </td>
    <%String first=request.getParameter("textfirst");
    String middle=request.getParameter("textmiddle");
    String design=request.getParameter("textdesig");
    String dept=request.getParameter("textdept");
    String Result="";
    Result=mb1.Updating(first,middle,design,dept);
    if (Result.trim().toLowerCase().equals("done")){
    out.println("Updated");
    //response.sendRedirect("content.jsp");
    }else{
    out.print(Result);
    }%>
    I am getting null value error when I click on update button for update.jsp.I know it's a looooong one.Sorry for taking u r time.Plz help. I am just submitting the abstract.

    "private static double area (int radius, final double pi)"
    final double pi? as the method parameter? ROFLHAHAHAHAHAHAHAHAHAHAHA
    That made my day.
    As for your question, make range_1 a global variable, in other words, declare it outside your main method
    Something like
    public class gary{
    int range_1;
    public static void main (String afgfg[]){
    range_1=//something;
    private static double area (int radius)
    radius = range_1
    return radius * radius * 3.14

  • Inserting variables into other variables

    I have several objects that have similar names, like slot1, slot2, slot3, etc. I also have a function that is supposed to do something to the first object, then the next, then the next, etc each time a button is pressed. Is it possible to insert variables into other variables? So say I have a variable called n that is increased each time the button is pressed. The function is then applied to slot"n" each time the button is pressed. How would I do this?

    use:
    var n:Number=1;
    function f(){
    // do something to parentmovieclip["slot"+n]
    n++
    p.s.  please mark this thread as answered, if you still can.

  • Hide/show element on click out of an other symbol

    Hi,
    i want to hide an element by click. The element which is clicked is inside an other symbol, which the one that should be hidden.
    Please tell me how i can handle this.
    Thank you very much

    // Get the symbol element "kitten_1" and hide the element "kitten_paw"
    sym.getComposition().getStage().getSymbol("kitten_1").$("kitten_paw").hide();

  • AdobeEdge - Using variables within a symbol

    I am completely new to Adobe edge, but I do have a little development experience (VB, VBA, C#). I would like to create a global variable when the animation starts (strClicked = "No" - or similar).  When one of the buttons is clicked on I would like to set this variables to "Yes".  Finally, I want several symbols to stop playing (their fade-out), if the variable has been set to "Yes".  I'm sure this is quite a straightforward thing to do, but have having a little trouble, and finding it difficult to find good documentation (any suggestions would be greatly appreciated).
    Any help would be greatly appreciated.

    Hi Andrew,
    You should nest each animation in a symbol, say pink, green, yellow. Each is instanciated on stage and given respectively the IDs
    pink1, green1, yellow1.
    Then your button has a click event handler with code
    sym.getComposition().getStage().getSymbol("pink1").stop();
    sym.getComposition().getStage().getSymbol("green1").stop();
    sym.getComposition().getStage().getSymbol("yellow1").stop();
    sym = the button's timeline
    getComposition().getStage() = back to the stage's timeline
    getSymbol("xxx") = select a symbol's instance with name "xxx"
    Here is an example : https://www.box.com/s/h38s2oexqdumm46v4q7d
    I didn't used any global variable : may be you have a good reason to use it ?
    Gil

Maybe you are looking for