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

Similar Messages

  • Using variables within GETurl

    Having issues with getting a simple script working...
    I've created a 'flashvars' tag in my embed code (aid=test), which I simply wish to add to the end a GetUrl statement, contained in within a button (which is on the first level of the flash movie). This is the code I've added to the button...
    on (release) {
        getURL("http://www.platinumselect.com?id="+aid);
    But this doesnt seem to work!? Is there anything else I need to do?
    Thanks in advance! (p.s. using actionscript 2.0)

    Where are the 3 places?? I've got it in two at the minute.
    Date: Tue, 10 Nov 2009 07:53:55 -0700
    From: [email protected]
    To: [email protected]
    Subject: Using variables within GETurl
    in as2, there is no LoaderInfo class and you don't need to do anything in flash to parse the flashvars.
    but, as i mentioned in a duplicate post, you do need to define your flashvars in 3 places in your embedding html file.  failure to do that is the most common reason for a problem with flashvars.
    >

  • Using Components within a Symbol

    Project. To create a flash box that allows a visitor to enter 1) email 2) phone number 3) preferred method of contact. Then they can hit submit. That information is sent to a php which sends an email to the administrator letting them know to contact someone.
    Reason it is done in flash. I have a "tab" graphic appear and in the tab is the entry form. When they hit submit the information is sent and the tab lowers out of site then raises back up with a confirmation message that the message was sent.
    Problem: The tabs work in annimation. I know that the code works to send information to php and that the php works to send the email. But, my issue is with the GUI. When the flash is rendered, the field boxes do not show up. See image below.
    Setup: To get the fields to move with the tab I have them as separate objects within the symbol of the tab that moves. Could this be the issue? If so, any ideas around this problem?
    AS3 Code:
    var request:URLRequest = new URLRequest( "http://mySiteName.com/phpCode.php" );
    var variables:URLVariables = new URLVariables();
    variables.email = emailAddress;
    variables.phone = phoneNumber;
    variables.contact = contactBest;
    request.data = variables;
    request.method = URLRequestMethod.POST;
    sendToURL(request);
    PHP Code:
    <?php
    $emailAddress = $_POST['email'];
    if ($_POST['phone']){
         $phoneNumber = $_POST['phone'];
    $contactBest = $_POST['contact'];
    $to = "[email protected]";
    $subject = "You have a quote request";
    if ($phoneNumber){
         $body = "A visitor with email ".$emailAddress." submitted the form on your web site requesting a painting quote. Their phone number is:                   ".$phoneNumber.". They stated that the best way to contact them would be by ".$contactBest.".";
    }else {
         $body = "A visitor with email ".$emailAddress." submitted the form on your web site requesting a painting quote. They did not provide a                     phone number.";
    if (mail($to, $subject, $body)) {
         echo("Your message was sent");
    } else {
         echo("There was a problem.");
    ?>

    Thank you Ned for that information. I have finally got some time to get back to this project. Here is what I have found. I put a trace on those objects and they are defined as TextInputs and RadioButtons.
    And here is what my Timeline looks like. They are on the form layer and as is shown they animate upward from frame 1 - frame 10. Then in frame 20 the actionscript is called that I have listed previously, as well as a stop(); command. Then when the form is submitted the player proceeds and there is an animation to drop the form layer down and raise a Thank You prompt verifying that the form was submitted. And then in frame 50 another stop(); is called.
    I am just missing why these objects are invisible when the .fla is rendered. Any help is appreciated to get this problem solved.
    I have done preliminary testing to have the form there (no animation in) and when the form is submitted the Thank You slide covers the form. This graphically works, I have not tested the code yet. So, I may have found a round about way to fix the problem. I would still like to know though why when the textInput and RadioButton elements are placed in a graphic to be animated, they disappear.

  • Using variables within the definition of ExcelWorkbook in the Data Services 4.2

    Hi Together
    We have installed the Datas Services 4.2 with a matching SAP BO 4.1 Installation
    The Repositories are hosted on a MS SQL Server 2012R2.
    The System is a Windows 2012 R2 Server
    Within a Repository I try to define an ExcelWorkbook.
    Within this Definition I need a
    Format name,
    the Directory where the Excelfile is in the File System,
    the name from the ExcelFile.
    To define the Access method I will use the Namend Range.
    Is it possible to use for the Namend Range a defined variable with a namend Range.
    I’ve tried a lot notations, but I am not able to use that Variable.
    What is a possible Solution ?
    Regards
    Ralph

    Hello Friend,
    You indicate to go to the Central Management Console (http://server/BOE/CMC), click the Data Services option.
    Select the Configure a new Data Services Repository, complete all fields and click Test Connection. If everything is ok and return success message, click save.
    The repository created will appear in your repositories list, then right click it and select the User Security option. Make sure that the Data Services Administrator Users group is present and with Full Control access. To ensure that your user has access, you can also add it through the Add Principals option. Select the desired user, pass to the other side and click the Add option and Assign Security and include Full Control permission and apply.
    In version 4.2 the ability to create access groups within the Central Repository was added.
    To create and manage such groups need access SAP Data Services Management Console:
    http://server/DataServices/launch/launch.do
    Once you have successfully logged on, click the Administrator button.
    On the left side there are some options, espanda the Central Repositories option and if you have properly created the Central Repository it will appear in the list.
    Click User and Groups note that by default comes a set created (digroup), select the User tab and click the option later add.
    Then enter the information which user, group, status and description and apply the changes.
    Made these procedures you can enable your central repository through the DS Designer and create new groups.
    Hope this helps.
    Hugs

  • Using Variable within Filter expression will not parse.

    IN ODI 11.1.1.3.0, I defined a Variable (SelectionDate) of type "Alphanumeric", Default Value = 01-JAN-1970 with the select query: select to_char( SYSDATE , 'DD-MON-YYYY') from dual.
    I intend to use this variable as a scenario variable (parameter) that receives a value in the form of 'DD-MON-YYYY', from the execution environment.
    I refreshed the variable and it received the value 16-JUN-2011 (today's date). So far so good.
    I then defined an Interface and used the variable in a filter expression:
    Active Filter: Checked
    Implementation Tab:
    SOURCE_VIEW.SELECTION_DATE BETWEEN TO_DATE('#PROJECT1.SelectionDate', 'DD-MON-YYYY') AND (TO_DATE('#PROJECT1.SelectionDate', 'DD-MON-YYYY') + 1)
    Execute on :Source
    When verifying the expression (click on the checkmark in the implementation tab) I always get: Expression is not valid for this DBMS. java.sql.SQLDataException: ORA-01858: a non-numeric character was found where a numeric was expected.
    I cannot get the filter to parse. Thank you for your ideas of what might be wrong.
    Jose.

    Yes, it worked when placed in the package.
    I think the expression editor is sending the string as it is written to the database in order to parse it, without replaceing the #variable for the actual value. Anyway thanks.
    Jose

  • Using variables in transform process

    Using file adapter to read multiple rows into the database. Its a basic transformation with a one to one match, e.g. what's on the left exist on the right.
    The issue is that I want to uniquely identify each file process with an ID. Therefore what I have done is set up a sequence which will be used as a batch ID. I assign this to a variable before I transform the file definition to the database definition.
    What I would like to do is assign this variable to a field in my database as a kind of dynamic constant. I don't seem to be able to use the getVariableData in the options. I want this ID to be loaded on every line without incrementing.
    Does anyone know if it is possible to use variables within the transformation.
    cheers
    James

    Using file adapter to read multiple rows into the database. Its a basic transformation with a one to one match, e.g. what's on the left exist on the right.
    The issue is that I want to uniquely identify each file process with an ID. Therefore what I have done is set up a sequence which will be used as a batch ID. I assign this to a variable before I transform the file definition to the database definition.
    What I would like to do is assign this variable to a field in my database as a kind of dynamic constant. I don't seem to be able to use the getVariableData in the options. I want this ID to be loaded on every line without incrementing.
    Does anyone know if it is possible to use variables within the transformation.
    cheers
    James

  • Use variables in a SELECT INTO FROM command

    Hi,
    How do I use variables within a select into from command? I want to loop through SYS.DBA_TABLES using a cursor and count the number of rows in a
    selection of tables an then insert into a cardinality table.
    The count of rows will be stored in a variable called CNT, that bit is easy however I need a variable in the FROM clause because that
    value changes with every iteration of the cursor.
    e.g.
    CNT := 0;
    TN := "MyTable";
    select count(*) into CNT FROM TN;
    insert into cardinality (table_name, row_count) values (TN, CNT);
    This is Oracle 9i and I need the row counts in a separate table as they are shipped over to a different environment for analysis purposes.
    Any ideas?
    Regards
    Dave
    Edited by: Yorky001 on Sep 15, 2010 10:32 AM

    Hi,
    Thanks for the info, unfortunately I can get neither example to work on this 9i system, could well be pilot error as I only ever get
    to do any Oracle about once per year. In the first query I have tried both "user_tables" and SYS.DBA_TABLES, same result.
    set serveroutput on size 1000000;
    DECLARE
    row_count INTEGER;
    vstr VARCHAR2(500);
    vstr1 VARCHAR2(500);
    BEGIN
    vstr := 'SELECT count(*) FROM ';
    dbms_output.put_line(vstr);
    FOR i IN (SELECT table_name FROM user_tables WHERE rownum < 10) LOOP
    vstr1 := vstr || i.table_name;
    EXECUTE IMMEDIATE vstr1
    INTO row_count;
    dbms_output.put_line(i.table_name || ':' || row_count);
    END LOOP;
    END;
    This one complains about the execute immediate line.
    Error report:
    ORA-00933: SQL command not properly ended
    ORA-06512: at line 12
    00933. 00000 - "SQL command not properly ended"
    *Cause:   
    *Action:
    BEGIN
    FOR i IN (select
    table_name,
    to_number(
    extractvalue(
    xmltype(
    dbms_xmlgen.getxml('select count(*) c from '||table_name))
    ,'/ROWSET/ROW/C')) count
    from user_tables
    where rownum<6) LOOP
    dbms_output.put_line(i.table_name || ':' || i.count);
    END LOOP;
    END;
    ORA-19206: Invalid value for query or REF CURSOR parameter
    ORA-06512: at "SYS.DBMS_XMLGEN", line 121
    ORA-06512: at line 1
    ORA-06512: at line 2
    19206. 00000 - "Invalid value for query or REF CURSOR parameter"
    *Cause:    The queryString argument passed to DBMS_XMLGEN.newContext was not a valid query, or REF CURSOR.
    *Action:   Rewrite the query so that the queryString argument is a valid query or REF CURSOR.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Using variables to go to a section of a swf

    Hi,
    I have been working on a project that I finally realized
    could have been, and will be, easier if I used variables within my
    AS. So I came home this evening and started working on my idea and
    after several hours of it not working, working part way, and
    googling like mad I decided to try you all. I hope you can help.
    The site I'm working on I've actually split up into multiple
    swfs for easier maintenance and I'm using one container swf to load
    everything in. The problem I have is that there is a "past" section
    where the user can select a year and view everything about the
    company that happened in that year (containing text, links to
    photos, sometimes video, etc.).
    So the past section is loaded into level 1 and when the user
    clicks on a year I'm creating a variable called year given the
    value of that year (2007, 1984, etc). The year button also unloads
    the past section swf and loads another swf in level 1. I have some
    actionscript at the beginning of that swf that says
    if (year=2007) {
    gotoAndPlay("2007");
    } else if (year=2006) {
    gotoAndPlay("2006");
    For each year I'll have some links, more buttons, and/or
    video come in and there's also a button to go back to the past
    section. One of my problems is that it always goes to the frame
    labelled "2007". I did get it to go to 2006 once, but I was using
    two if statements instead of the if and else if. The second problem
    is that when the user clicks back to the past section I need to
    empty out the variable so that they can choose another year and
    pass that variable.
    Can anyone offer any advice, suggestions or examples?
    Thanks!
    phej

    I have been having a similar problem, and being quite new to
    Flash, I'm at a loss on how to fix it. My issue is with a template
    I purchased. This template has the main content pages nested a
    couple layers deep. I need to be able to send people to a specific
    URL that I'm hoping to get to load the movie and bring up the one
    specific clip and not the main start.
    I had tried using a dynamic text field to check if the
    variables I was passing in through the URL were making it in (with
    the correct code placed in the embed and object tags). I gave the
    var box of the dynamic text the name of the variable I was passing
    in: showPage.
    This is what was displayed in the text box instead:
    _level0.pages001.pages.instance115.showPage
    Can I glean any information as to how to get this one clip to
    be bookmarked? I have tried by passing in variables and also by
    setting a Named Anchor in the key frame that loads this clip. That
    code worked only as far as putting the NA in the url like it was
    supposed to, but the actual link when pasted back in the browser
    brought you back to the main start.

  • How to access a variable from within a symbol.

    How do I access a variable set outside a symbol from within that symbol?
    Thanks

    If you set a variable on stage ,say
    sym.setVariable("stageVariable", "I am stage variable");
    You can access it from within  a symbol using :
    var myVariable = sym.getComposition().getStage().getVariable("stageVariable");
    Basically you need to get handle to the symbol in which the variable is defined.

  • How do I use a variable within a sql statement

    I am trying to use a local variable within an open SQL step but I keep getting an error.
    My sql command looks like this "SELECT BoardDetailID FROM BoardDetails WHERE SerialNumber = " +  locals.CurrentSerialNo
    If I replace the locals.CurrentSerialNo with an actual value such as below the statement works fine.
    "SELECT BoardDetailID FROM BoardDetails WHERE SerialNumber = " +  " 'ABC001' " 
    Can someone tell me how to correctly format the statement to use a variable?

    Hi,
    Thanks for the reply. I have changed the required variable to a string, but with no success. I have reattached my updated sequence file and an image of the error.
    When looking at the Data operation step I see that the sql statement is missing everything after the last quotation mark.
    Thanks again,
    Stuart
    Attachments:
    Database Test Sequence.seq ‏10 KB
    TestStand error.JPG ‏37 KB

  • How to Set and Use a global variable within a session?

    Dear All,
    I'm new to jsp, and would like to ask how to set and use a global variable within a session?
    Thanks in advance.
    Regards,
    Cecil

    With session.setAttribute("name",object) you can store a Attribute in the session object.
    with session.getAttribute("name") you can get it.
    That's it.
    Regards,
    Geri

  • How do I set a variable on the main timeline from within a symbol?

    Just getting started with Animate and coming to it from Flash, as may be apparent from my question. How do you set a variable to the main timeline from within a symbol?
    I have 24 pairs of clickable elements, each in their own symbols, and all 24 of those symbols sit inside another symbol. I want all 24 to be able to set the same global variable when clicked. I can't find that this question is addressed anywhere, which makes me think I may be stuck in a Flash mindset and approaching the task in the wrong way. (There are however MANY discussions of how to address objects at different levels in the hierarchy. That's well covered.)
    Relatedly, how do you access a function on the main timeline from within a symbol?
    Adobe should consider putting together a support page (or pages) just for folks migrating form Flash. In the materials I've encountered so far there seems to be a studied effort to refrain from mentioning Flash in any way. I imagine there are a lot of people out there like me who have a deep background in Flash coding, but are just getting started with Animate. We don't need help with most of the basic concepts, but we may still have some pretty basic questions about how to accomplish some things in Animate because our Flash knowledge is getting in the way.

    Hi Bill,
    There are plenty of threads on here about scope, but here's one way to create a global variable:
    // code on Stage.compositionReady
    sym.myGlobalVar = 1;
    Then, anywhere in your project, you can check/set that var like so:
    sym.getComposition().getStage().myGlobalVar = 2;
    And here's one way to create a global function:
    // code on Stage.compositionReady
    sym.myGlobalFunction = function(){
              console.log('myGlobalFunction');
    Then, anywhere in your project, you can call that function like so:
    sym.getComposition().getStage().myGlobalFunction();

  • Using a global variable within a function

    Hi all,
    I'm trying to learn how to use global variables, but can't quite get it right:
    Im trying to use two buttons, named UpButton and DownButton to control one global variable, p1
    A text field, named "Value" displays p1.
    Here's my code:
    p1 = 0;
    ButtonClick("UpButton", p1, 100,"Value");
    ButtonClick("DownButton", p1,(-100),"Value");
    function ButtonClick(ButtonName,Var,Increment,TextToChange){
                        sym.$(ButtonName).click(function(){
                        Var = Var + Increment;
                        sym.$(TextToChange).html(Var);
    However, it seems to be treating p1 as two different variables.
    Here's a link to the page to show you what I mean, apologies but this link wont work in google chrome because I'm using dropbox as a server temporarily
    In other browsers you may need to click "Show all content" or similar to any security warnings...
    https://dl.dropboxusercontent.com/u/83693404/ButtonTest/buttons.html
    Here are the project files:
    https://app.box.com/s/0shocivto8fl295h62uq
    Any help greatly appreciated, sorry if this is a stupid question,
    Katherine

    Hi Katherine,
    However, it seems to be treating p1 as two different variables.
    Indeed, your code created two different variables in two different scopes (I guess it as to do with JavaScript closures, but do  not ask me more, I am still a bit foggy about that idiosyncrasy ).
    In JavaScript, a primitive parameter – this is the case here with p1, a Number value –, is passed by value. In other words, a copy of the value is made. Your code handles two copies of the value stored in p1.
    This contrasts with an object parameter, which is passed by reference (address in memory), without copy. Your code would work if Numbers were passed by reference : the two Var (p1) would then point to the same address.
    The intent behind your trial is a global variable.
    1) Let us be as simple as possible :
    Stage : document.compositionReady event handler
    p1 = 0;
    buttonClick = function( Increment)
      p1 += Increment;
      sym.$( "Value").html( p1);
    Stage : DownButton.click event handler
    buttonClick(-100);
    Stage : UpButton.click event handler
    buttonClick(100);
    Without being preceded by the var keyword the variables are global.
    So the Number variable p1 can be accessed inside function buttonClick.
    And the Function variable buttonClick as well, is accessible inside click event handlers, everything (function definition +function calls) being inside the same symbol (Stage).
    2) Now, suppose this is no longer the case : you want to access a variable from another symbol.
    We create a new GraySquare symbol, instantiated both in the DownButton symbol (instance name DownSquare) and in the UpButton symbol (instance name DownSquare).
    Stage : document.compositionReady event handler
    p1 = 0;
    sym.buttonClick = function( Increment)
      p1 += Increment;
      sym.$( "Value").html( p1);
    The sym. prefix is now necessary to make the variable (here a Function, but you would proceed exactly the same with a String, Number or Boolean) accessible in other symbols.
    DownButton symbol : DownSquare.click event handler
    sym.getComposition().getStage().buttonClick( -100);
    UpButton symbol : UpSquare.click event handler
    sym.getComposition().getStage().buttonClick( 100);
    From these other symbols, the sym.getComposition().getStage(). prefix is necessary to acces to our global variable (function).
    The two examples are downloadable here : https://app.box.com/s/6vkyiqk7i8zwlw0j1wk1
    Gil

  • Using variables: Statement must appear within on handler

    I would like to use variables in my flash app. The app is quite simple, has many buttons, and on each of those buttons I have a simple script: on-rollover and on-release. For both actions I use the same value, which I want to put in a variable. The following script results in an error message: Statement must appear within on handler. When I have to declare the variable inside the on-handler, I have to declare it twice, which makes it useless as I have to enter the value twice. How can I get this working?
    country = "uk"
    on (rollOver)
        gotoAndPlay(country)
    on (release)
        getURL("/"+country+"/", "_self");

    try:
    Select a frame on the timeline where your buttons live and then move the buttons handlers there:
    e.g.
    myButton1.onPress = onPressFunction
    myButton2.onPress = onPressFunction
    myButton3.onPress = onPressFunction
    etc.etc.
    myButton1.onRelease = onReleaseFunction
    myButton2.onRelease = onReleaseFunction
    myButton3.onRelease = onReleaseFunction
    etc.etc.
    country = "uk"
    function onPressFunction(){
         this.gotoAndPlay(country)
    function onReleaseFunction(){
        getURL("/"+country+"/", "_self");
    If you use this approach you MUST remove the scripts from buttons themselves.
    I hope this helps.

  • Using jsp variables within JSP tag

    I have a variable defined within a JSP:
    <%
    String cust_id = request.getParameter("cust_id");
    %>
    I want to use this variable as a parameter to a custom tag:
    <%@ taglib uri="/tlds/DBTags.tld" prefix="db" %>
    <db:MultiColumnSelect columns="c.id, c.po" name="ccar_id" table_name="ccar_headers c, ccar_rmas r" selectString="r.ccar_id = c.id AND c.cust_id = <%= cust_id %>"/>
    The selectString value that is passed to my tag is:
    r.ccar_id = c.id AND c.cust_id = <%= cust_id %>
    The <%= cust_id %> is not replaced by the actual variable value.
    How would I accomplish using this variable within my JSP tag?

    Your definition of the selectString attribute must indicate that it can accept runtime expressions.
    <%
    String cust_id = request.getParameter("cust_id");
    String selectString = new String("r.ccar_id = c.id AND c.cust_id = " + cust_id);
    %>
    <%@ taglib uri="/tlds/DBTags.tld" prefix="db" %>
    <db:MultiColumnSelect columns="c.id, c.po" name="ccar_id" table_name="ccar_headers c, ccar_rmas r"
    selectString="<%= selectString %>"/>

Maybe you are looking for

  • Log states some files are not being transferred...why?

    I've been uploading for months with no problems but all of a sudden the pages that I'm uploading shows the connection and shows the log but when I actually check the page no change has been made. Any ideas?

  • Safety days supply not followed due to change in Means of Transport in SNP

    Hello All, I am facing a strange issue regarding the SNP heuristics and means of transport. We observed that the system was not respecting the safety days supply. For example if we had a receipt in bucket 'N' and there is a violation of safety days s

  • Run time error with exception 'EXTRACT_RESOURCEHANDLER_FAILED'

    Runtime Errors        EXTRACT_RESOURCEHANDLER_FAILED Short text      Internal error: Error when logging on to delete the extract file. What happened?      Error in the SAP kernel.      The current ABAP "RAKOPL02" program had to be terminated because

  • Can't add second child to StackPane repeatedly

    Hi, I have a StackPane array, which is filled up with two ImageViews. First ImageView is an unique picture, second ImageView is the same for every StackPane:        StackPane[] cards = new StackPane[gisView.length];         for (int i = 0; i < cards.

  • Low audio volume in DVD SP

    I've been experiencing low audio volume with burned DVDs in DVD SP 4. The audio volume is fine in FCP, and also in the self-contained exported QT file. But once imported into DVD SP and burned to a DVD, the volume is almost cut in half on multiple pr