Variables used within timeline

If I create a variable at Frame 1 of the timeline. Say:
var i:Number;
I use i as a for loop counter several times in the code in frame 1.
Eventually the execution proceeds to frame 2, 3, 4 etc.
Then somewhere down the timeline code says
goandplay at frame 1 to restart the process at the beginning.
Will it encounter var i:Number and choke.
And: how do I clean up my vars?
THanks

it will encounter your var declaration again but it won't choke.  flash will just see that as superfluous.  i has already been declared a Number.  re-declaring won't cause a problem during playtime and the compiler won't see that as a namespace conflict.
if you have a variable initialized and you don't want it to re-initialize when the frame replays, use a boolean:
var alreadyInitialized:Boolean
if(!alreadyInitialized){
var i:Number=0;
alreadyInitialized=true;

Similar Messages

  • Praoblems in creating a variable using JSP - el

    Posting this again :
    Please help
    How to create a variable using <c:set> whose value is
    specified within the tag body . I want to use this
    variable created as one of the parameters in a
    javascript method call . But my problem is when I run
    my application and do the view source , the HTML page
    shows me the variable as it is without substituting
    its value .
    can anyone help ??? its urgentThis is my code :
    <c:forEach var="photo" items="${photos}" varStatus="status" >
    <c:set var="photolink${status.index}" >
    Click to view full-size:<br><img style=margin-left:20px src='http://147.147.2.91:7001/pfk-deploy/thumbnail.do?photo="{photo.photoid}"' border=0 width=75 height=56><br><br>
    </c:set>
    doSearch( "<%=desc%>", '{c:out value="${photolink}"/}');
    </c:forEach>
    Iam using weblogic 8.1 and my web.xml says Web Application 2.3.
    Can this be a problem.

    Posting this again :
    Please helpWhy? How'll that help - you should have posted the extra info in your original post - http://forum.java.sun.com/thread.jspa?messageID=4327403. Double post.
    ram.

  • Need help with setting a variable using actionscript

    So I am trying to import in XML and this is working fine, But
    once in flash I need to reference this variable in a later script.
    Here is what I got.
    function loadXML(loaded) {
    if (loaded) {
    /////this is the variable, which is working, it pulls the
    info from the xml document properly.
    var node1 =
    this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;
    ////another variable, etc...
    var node2 =
    this.firstChild.childNodes[0].childNodes[1].firstChild.nodeValue;
    /////when traced it outputs the proper value.
    trace(node1);
    ////////does not work here though.
    xmlData = new XML();
    xmlData.ignoreWhite = true;
    xmlData.onLoad = loadXML;
    xmlData.load("co.xml");
    var latmin = 37;
    var latmax = 41;
    var lonmin = -109;
    var lonmax = -102;
    this.geoPlotter_gp.setRange(latmin, latmax, lonmin, lonmax);
    this.geoPlotter_gp.setNodeSymbol("geoPloterNodeSymbol");
    this.geoPlotter_gp.addNode(40.48, -107);
    ////////////////This is where I need to now use the variables
    defined above//////////////
    this.geoPlotter_gp.addNode(node1);// Boulder
    this.geoPlotter_gp.addNode(node2);// Denver
    /////any ideas all? I am sure this is something simple...I am
    just overlooking something.

    when you prefix a variable using var within a function,
    you're making it local to that function. ie, node1 and node2 are
    undefined outside loadXML().
    to remedy, don't prefix with var.

  • Variable scope within an interface and some questions

    I am creating a DataStorage interface with a member variable (can I call it a member variable when it is in an interface?) called dataObject. From what I remember, and what the compiler is telling me, the scope declarations "private," or "protected" can not be used on either methods or member variables in an interface.
    Now I have another class DataInput that implements DataStorage and I want to make the dataObject private and put in accessor methods to get to the dataObject. But I also remember reading something that said, during inheritance you can not make the scope of the method (and variable?) more narrow. Meaning if a method was defined as default in the parent class, the subclass can not override that method to give it private access all of a sudden.
    Now a couple of questions with this...does that rule only apply to subclassing (that is with extends) or does it also apply to implementing interfaces. Second question, I am pretty sure that rule applies to methods that are being overriden, but does it also apply to variables in an interface...because if that is the case, I can't re-declare the variable in the class that implements the interface to be private...and then there is no way to protect that variable.
    By the way I did re-declare the variable in the subclass (implementing class) and declared it as a private, and it works...but I'm still trying to figure out the general rule.

    well if the interface variables are implicitly public static final, how come I am able to re-declare the variable name within the class that implemented the interface.
    If for example in interface Car there is a variable color, how come in class Honda implements Car, I can redeclare the variable color, and give it public access. I thought final meant final, no redeclaring...but does that not hold for static variables?

  • Reference Variable Set Within CFDIV

    I've got a .cfm page in which a CFDIV is called near the top.
    Variables are set within the CFDIV file that I then want to
    reference further down the calling .cfm page.
    Does anyone know a way to reference the values of the
    variables set within the CFDIV without using javascript? I'd like
    to reference the variables within a CFIF tags.

    Thanks Gordon,  it seems my syntax was correct but my logic failing.  My filterFunction was (item[fieldName]!="" || item[fieldName]!=null) instead of &&  I had no confidence in the syntax. Hate it when I doubt myself
    Thanks again. This is going to be a pretty slick SQL generator for reporting once complete. Here we are selecting the WHERE criteria for the fields included in the report.  My previous question (unanswered) instead of rendering ComboBox for each row, only fields with lookup tables would have had a ComboBox and these other potentially null fields were going to render TextInputs - but never could get that working with dynamic dataProviders.  This may be a better solution, just need to make the non-lookup ComboBoxes editable.
    Thanks again.

  • How to assign a value to ODI Variable using ODI Procedure

    Hi ,
    Is it possible to assign a value to a ODI Variable using ODI Procedure ?
    If it is possible how we can do that.
    BEGIN
    IF #Counter=1
    Then
    #Next_Increment:=#Counter+1;
    End if;
    END;
    In my example I have 2 ODI Variables #counter and #Next_increment.
    I am trying to assign VALUE TO A ODI VARIABLE #next_increment from another ODI Variable #counter.
    thanks
    prasanna

    Prasanna,
    I have a similar requirement where I need to assign values to ODI variables within a procedure. How do we make use of an ODI package to accomplish this ?
    Actually, I have a sequence of ODI steps, and there is a call to a procedure 'LOG ERROR' from every step which gets called in case error occurs in any step. I just need to identify from which step the error came.
    Please help.

  • Php parse variable using javascript

    hey there,
    i am trying to parse a php variable using the allwebmenu
    program. Never done this before and wondering what javascript needs
    to be created and inserted to replicate the
    http://www.backyardcanvas.com/coremember/profileview.php?recordID=<?php
    echo $row_table['field'];?>
    normal syntax.
    Help greatly appreciated
    Thanks

    Hi there,
    Thanks for the reply, and yes you're right it IS a bit of an elephant.  However, when I posted it, I had formatted it so that one little bit was highlighted showing the problematic portion of code.  The rest was just there for background (and was formatted to be much friendlier to read).
    For some reason this forum wipes all text formatting.  Anyway, here's the query - now extracted from the elephant...
    Let's say that stored in my form1.SCO variables object there is the following...
    var Cityscope_NorthSydney_CostUser1 = 120.55;
    Now let's also say that in the scope of a specific form object...
    var ScopeAreaSelected = "NorthSydney";
    Within the form object scope (same scope as ScopeAreaSelected), I am trying to create a variable called "CostUser1" that stores the price of the variable in the form1.SCO as follows...
    var CostUser1 = sco.window["Cityscope_" + ScopeAreaSelected + "_CostUser1"];
    I've used both "window" in Javascript before to make such frankenstein variable names work (using "window" to reference the top-level variable scope) but the code I am using here doesn't work.
    While it's probably not the greatest all-round solution, do you know how I would get this to work?
    Cheers,
    Stanbridge

  • Variable code within code

    I was wondering how you can make variable code within code, for example, normally, you can use this["blabla"+variable]; to make the code say blablavariable.
    But now i want to make new variables by using this code, within a for loop [using teller1 as the increasing value]
    this["var ringsegment_mc:Ring_"+teller1+"=new [Ring_"+teller1+"]()"];
    which i basically want to have say:
    var ringsegment_mc:Ring_1=new Ring_1();
    but this doesnt work, it doesnt make a variable called ringsegment_mc.
    why I want to do this, is because i need to make an add child which makes 16 parts, from 16 different movieclips.
    here is the code for that for loop:
    for(var teller1=0; teller1<16; teller1++) {
        kernplaats += Number(Math.random()*200+300);
        this["var ringsegment_mc:Ring_"+teller1+"=new [Ring_"+teller1+"]()"];
        ringsegment_mc.x=xco[teller1]+kernplaats;
        ringsegment_mc.y=yco[teller1]+kernplaats;
        ringsegment_mc.geklikt = Number(0);
        ringsegment_mc.score = Number(ringscore);
        ringsegment_mc.speedmodded = Number(0);
        ringsegment_mc.kerngroep = Number(1);
        ringsegment_mc.addEventListener(Event.ENTER_FRAME,vernietig);
        addChild(ringsegment_mc);

    Hmm, i already fixed it, though im still not really sure why it happened:
    i have a for loop adding the addchilds 16 times, using a different movieclip for each instance
    loading the x and y coordinates from an array, containing 16 values [which ive changed to 17 now, to make it work]
    the arrays:
    var xco:Array = [121,180,233,271,292,292,270,231,179,124,74,34,11,9,30,70,121];
    var yco:Array = [11,11,33,73,124,181,232,270,290,291,271,234,183,125,72,33,11];
    the part of the for loop and positioning:
    for(var teller1=1; teller1<17; teller1++) {
        //var ringsegment_mc:Ring_1=new Ring_1();
        var ClassReference:Class = getDefinitionByName("Ring_"+teller1) as Class;
        var ringsegment_mc:MovieClip=new ClassReference();
        ringsegment_mc.x=xco[teller1]+kernplaatsx;
        ringsegment_mc.y=yco[teller1]+kernplaatsy;
    i traced the x and y coordinates, and it appeared that Ring_16 got 0.0 as coordinates.
    so i added the first coordinate to the end, and it works fine now.
    and while typing i realise that the first value in an array is number 0 and not 1
    DOH!
    Thanks for the help guys!
    Especially you, Hakan!

  • Variables in different timelines

    If I define a variable in the main timeline, can I modify its
    value in another timeline (i.e. inside a movieclip timeline)? If,
    so how do I call on this variable from within a movieclip's
    timeline?
    Thanks.

    You get a reference to the clip the variable is in, and then
    access it with
    dot notation. Example, if you're in root, and you want to set
    the value of
    the variable 'myName', within the movieClip 'pic' you could
    do:
    pic.myName = "someName";
    Or, if you were in pic, and you want to set a var on the main
    timeline you
    could do:
    this._parent.myVariable = someValue;
    Dave -
    www.offroadfire.com
    Head Developer
    http://www.blurredistinction.com
    Adobe Community Expert
    http://www.adobe.com/communities/experts/

  • Why do text variables using Running Header character style translate forced returns as a word space in the running head on the first page but close up the space on subsequent pages?

    In an InDesign document that requires 3 different Chapter head paragraph styles (to cope with differrent length headings) I've set up the running heads on the master page with a text variable using the Running header (character style) option. The character style I've assigned to this is an empty character style that is applied to all 3 chapter head paragraph styles.
    Some chapter heads require a forced line break, so that the line breaks are aethesically pleasing. On the first page the text variable translates this forced line break as a word space in the running head, but on subsequent pages it ignores the forced line break. This means that if you have a word space before the forced line break, on the first page you get a double word space and on subsequent pages the running head sets correctly with a single word space. But if you remove the word space before the forced line break in the chapter head text, the first running head sets correctly with forced line break interpreted as a single word space, but on subsequest pages the space is closed up.
    This only seems to be a problem when the character style option is used for header text variables. If a paragraph style is used the forrced line break is interpreted as a a single word space in all instances, both on the foirst page and subsequent pages.
    This would appear to be a bug in how text variables are applied when using the Running header (character style) option. I can't see any other reason why the text variable would beheave differently on the first page and on subsequent pages. There is only one master page, so it isn't a case of their being an error between a main master page and a chapter opener master page.
    Does anyone have any solutionss, or know if this problem has been fixed in subsequent releases of InDesign (I'm using CS6 ID version 8.0)
    Thanks

    Ask in the ID forum...
    Mylenium

  • Control global variable used in sub vi

    Hi,
    I've created a vi to read an instrument and to initiate its calibration with labview. This VI stores data in a global variable containing measurments and status of the instrument.
    Now what I'm trying to do is create a sub vi with this to read&write 2 exactly identical instruments so I can finally create a VI that read all 3 instruments simultaneously.
    How could I create a control on the global variable used by the sub VIs since it is the only thing that will change along with its COM port ?
    I included a screetshot of the current VI.
    Thanks,
    Attachments:
    Read_Calibrate.PNG ‏61 KB

    I would make an array of values and then you just pass in which value to update.  I would actually take it a step further and make an Action Engine that can update the data and return the data.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Formula variable using Replacement path not working

    Dear All,
    I am using a query to calculate YTD values in the report. I am using a formula variable to calculate the number of months. Formula is
    Month To - Month From+1
    When I am giving the range from 001 to 006 for period in th evariable screen,
    I am gettung Month To as 6 and Month From as 6 with total no . of months as 1.
    I think Month From is not being caculated properly. I created another formul variable using Replacement path, for characteristic Posting period, replace with a Key and dimension ID as number with out any offset.
    Still not working.
    Any suggestions.
    Thanks and Regards,
    Srini
    Edited by: Srinivas on Apr 24, 2008 11:13 AM

    Hello,
    I have seen this document already. It is slightly different from what I am trying to do here than what the post shows. How ever,  I did everything right, atleast seems to be and don´t know why I am not getting the From value from the posting period selected. To value variable is coming right.
    Any more sugegstions.?
    Thanks and Regards,
    Srini

  • Building an AppCloud App for use within your organization only.

    I am re-posting this from, Register your App because, it was a good point this should have been a separate discussion.
    Scott
      Scott Kent Jul 14, 2014 4:56 PM
    I am trying to get more details on how to Build/Register "Private" AppCloud Apps and confirm at design time that we can deploy our in-house AppCloud Apps on several of our Eloqua instances without publishing them.
    My assumption is that one would setup the App under the Provider section for each of the Eloqua instances so that each Eloqua Instance can see and install our our in-house private app and use it without publishing. I worry about this method because it give the impression the AppCloud App is in development or testing.
    Or
    I was hoping there was some way to officially register our app so we are using a production workflow but our app is not published or listed anywhere?
      T.J. Fields Jul 14, 2014 6:06 PM (in response to Scott Kent)
    Hi Scott,
    The best practice here would be for you to:
    1. Register as a Provider in a development instance of Eloqua.
    2. Build out your app and Register it, along with your Service(s) under that Provider.
    3. Whitelist any Eloqua client installs that you wish to allow to use your App.  Do this by clicking the Publish to Another Site button.
    4. Give the App install URL (found at the bottom of the App Details page under Catalog) to any of those clients that you whitelisted to use your app.
    This way, only those clients that you've specified will be able to install and use your App, and it's not listed anywhere.  You could also click the Publish to App Cloud button, which simply whitelists every install.  The App will never actually be listed anywhere, as there is not yet a mechanism in the framework to do this.  The only way to find and install your App is by using that install URL, so you'd have to give it out.
    If you are a client that is building an App for use within your organization, you could also use your company's Eloqua install to register your provider, but as a development partner, your developer instance is intended to be used to register and manage your services.
    Hope this helps.

    Thanks, scott.kent ! I'm sure many will benefit from your great post!

  • Is it possible to export, and include AE compositions used within a Premiere Pro project, via project manager?

    I've several Premiere Pro CC 2014 projects I want to relocate via project manager (one at a time). They're excessive in size (many long and unused footage files), so "Create New Trimmed Project" is the setting-option, within project manager, most attractive. BTW I love how project manager does this... However, when I check on its new location, I don't see any linked AfterEffects files. Fine, I try the other setting "Collect Files and Copy to New Location". This option allows me to now copy everything including rendered scenes featuring my AE compositions (and a lot of excess, unused files)... but still no AE files!
    Is it possible to export a Premiere Pro project, excluding unused files, yet include all used files... especially linked files such as AE compositions?

    Though not exactly the solution I seek, I've tried an alternative approach... it works (if anyone's interested)... but my original question still stands.
    Alternative approach (and probably the only option now):
    When I copy & trim my Premiere Pro project via project manager to its new location, I can open the new file and see the track editor now includes broken links to AfterEffects compositions. Since I don't wish to relink these to the current .AEP file, I may package** the original AE project to a location near my newly-located Premiere Pro project folder. To do this, I open the original .AEP file containing any compositions linked to my original Premiere Pro project, and use File < Dependencies < Collect Files. This feature copies all files (and a new .AEP copy) from this AE project to my newly selected destination (as long as no files are missing).
    So at this point, when I open my newly-located PP project, I can relink the broken AfterEffects composition links in PP to the new .AEP file. Yay!
    **package (for those unaware) is the term used within Adobe InDesign. This feature gathers all linked files that makeup the overall design and layout, and copies into a new folder.

  • How to set a value to a Presentation Variable using GO URL?

    Hi All,
         I am working on a drill (GO URL) from Dashboard page1 to Dashboard page2.
         The problem I am facing is, I am not able to pass a value to the presentation variable through GO URL. (I have to pass "Customer Category" static
    value to The presentation variable present in Dashboard Page2 ).
         The Dashboard page2 is having a view select in which we are using presentation variable to select the report based on the value selected in
    View Select.
         For example: If the user selects "Customer Category" value in View select and clicks on GO button Customer Category report will show the out put.
         When i am drilling from Dashboard Page1 I have to pass a value to the presentation variable used in view select and also pass some filter condition in
         GO URL.
         Please let me know if it is feasible to pass a value to the presentation variable through GO URL in OBIEE 10.1.3.4.
         It will be greate if you can provide me with the syntax to set a value to the presentation variable of dashboard page2 through GO URL.
    Thanks and Regards,
    Sagar Vishwanathwar.

    1) You have to navigate to dashboard page, not to answer request = you have to use "Dashboard URL API" not GO URL API.
    2) On the target page, you have to place dashboard prompt, which sets required presentation variable.
    3) Refer to the target using Dashboard URL API and set filter on prompt column using URL parameters. Example: http://localhost:9704/analytics/saw.dll?Dashboard&PortalPath=%2Fusers%2Fadministrator%2F_portal&Page=page%201&Action=Navigate&P0=1&P1=eq&P2=D_TIME.YEAR_CODE&P3=%221996%22
    Do not forget to use Action=Navigate. The syntax for setting filters using url parameter is the same as for GO URL API described in Business Intelligence Presentation Services Administration Guide.
    This is the way, you can implement navigation to parametrized direct SQL reports including passing filter values...
    Regards K.

Maybe you are looking for

  • Home Sharing of iTunes on the same machine between two accounts

    So, is it possible to share itunes purchases between seperate login accounts on the same computer? Would like my wife to be able to access music while she is logged in on her side. Any help would be appreciated. R/ Wm

  • Error produced when trying to pass variables to a Matlab script

    For some reason, LabVIEW produces an Error 1047 (Unable to pass variable to the script server) whenever I create an input variable to a Matlab code block. Outputs work fine (for example, connecting an output "a" to a Matlab code block that says "a=ra

  • FM to create & update Shipment Cost Condition Records (TK11/12)

    Hi All,    I am looking for a FM which can update Price and Validity dates in existing Shipment Cost condition records and also able to create a new shipment cost condition record. I have tried using BAPI_PRICES_CONDITIONS. It returns a success messa

  • WIndows IME in JAVA Component

    I am using Windows IME for HIndi input but I get only ? in my JAVA components.PLease help

  • Synchronisation ipad/phone with outlook

    I keep losing appointments between outlook on PC, iPad and iPhone. What do I do wrong? during synchronisation is the file with last modification copied to the other device? Or per item? I missed an appointment again yesterday....