Setting a variable that I can call it's value from any symbol.

Hey everyone!
I'm working on an edge animate game and I'm learning as I go you can say
The way I have it set up is I have a container that holds different symbols depending on which button you click on. They symbols open you up to a deeper part of the game.
However I want to be able to set a variable on the stage that I can later manipulate when the different symbols are open.
What I have so far is my limited understaning of jquery, in the stage I start off by setting a variable
var variable1 =     5,
    variable2 =     10;
Then in my symbol I want to be able to do something like this
if(variable1 > variable2) {
Then do something
else {
Then do something else
variable1 = 10
variable2 = 5
However the problem I am having is that when I set the variable value in the stage the entire variable name and value is not rememembered in the symbols.
So is there any code I could write in the symbols that can call the variables defined in the stage into the symbols.
Thank you so much for any help. It is greatly appreciated .

Hi, I've literally just solved this problem for myself! I've been unable to get variables remembered within symbols too. This will be familiar if you've accessed the Stage from within a symbol already, like so (this kind-of takes a step back and takes you to the main stage from within the symbol):
sym.getComposition().getStage().$("anElement").hide();
The way I've updated the score (displayed on the stage) from within a symbol it is to GET the variable from the stage:
var score = sym.getComposition().getStage().getVariable("score");
score += 100;
sym.getComposition().getStage().$("valueDisplay").html(score);
sym.getComposition().getStage().setVariable("score", score);
So for you I'd recommend:
var variable1 = sym.getComposition().getStage().getVariable("variable1");
var variable2 = sym.getComposition().getStage().getVariable("variable");
if(variable1 > variable2) { this }
else { that }
If you wanted to update the variables and store them on the stage, then you'd do that similarly:
variable1++;
sym.getComposition().getStage().setVariable("variable1", variable1")
Hope this helps, I may not be 100% and it may be explained better as I'm learning as I go myself!
Ray

Similar Messages

  • Is there a way that I can call a Swing application

    Hi all,
    Is there a way that I can call a Swing application from html page.
    fox example when user clicks on the url in html will activate a swing local application
    thanks

    Assuming the local swing application is running, and you have an applet in the browser that has permissions to communicate with a server other than the originating server, you could use RMI or a regular socket connection.
    Due to the obvious security issues to letting javascript or an applet free access to the local machine, this is not something that a browser really supports.

  • UCCX8 Is There a Sesion Variable that contains the Call Control Group ID

    Hello,
         Is there a session variable that contains the Call Control Group ID of the trigger that called the script?
    -Lauren

    Hi Lauren,
    sorry, after two hours of analysing call hierarchies and running debugs, I gave up. I can't see any way of getting that value programmatically, in other words, I don't see any public field or method that would yield the desired value.
    However, if you want to use this only for debugging purposes, then getting the contact using the Get Trigger Info step, assigning it to a variable named contact (of type Contact) then calling the following method on it:
    contact.getTask().getTrigger() (which automatically calls the toString() method) would return a String similar to this - and it contains the ID of the Call Control Group apparently:
    "ContactApplicationTrigger[time=1356102368509,locale=en_US,cfg=JTAPITriggerConfig[schema=ApplicationTriggerConfig,time=2011-09-14 18:28:25.0,recordId=414,desc=Cisco JTAPI Trigger,name=82152,type=Cisco JTAPI Trigger,appName=TRAPPA,enabled=true,sessions=5000,idleTimeout=5000,locale=en_US,parms={},taskGroups=[],controlClass=class com.cisco.call.CallControlChannel,controlGroupId=1,contactGroups=[GroupInfo[class=com.cisco.dialog.DialogChannel,id=0]],dn=82152,redirectCSS=redirecting.party,cmDeviceName=TRAPPA_82152,cmDeviceInvalid=false,cmDescription=TransRouting IVRA,cmDevicePoolUUID={978D6B59-356E-FC92-81A9-3AAE9F843120},cmDevicePoolName=DP_Main_C,cmCallingSearchSpaceUUID={87083019-FEBF-9B48-742B-7658396D1D5C},cmCallingSearchSpaceName=CSS_mobily_normal_HelpDesk_IS,cmLocationUUID={29C5C1C4-8871-4D1E-8394-0B9181E8C54D},cmLocationName=Hub_None,cmPartitionUUID={10003B1B-F235-16A7-927D-01EB3DCCB57C},cmPartitionName=P_operatori,cmVoiceMailProfileUUID=,cmVoiceMailProfileName=None,cmCallPickUpGroupUUID=,cmCallPickUpGroupName=,cmDisplay=,cmExternalPhNumMask=,cmFwdBusyVM=false,cmFwdBusyDest=,cmFwdBusyCSSUUID=,cmFwdBusyCSSName=None,cmAlertingNameAscii=,cmPresenceGroupUUID=ad243d17-98b4-4118-8feb-5ff2e1b781ac,cmPresenceGroupName=Standard Presence group],contact=JTAPICallContact[id=16548,implId=3206772/2,state=STATE_ANSWERED_IDX,inbound=true,App name=TRAPPA,task=38000443987,session=17000062888,seq num=0,cn=82152,dn=82152,cgn=0725099603,ani=0725099603,dnis=null,clid=null,atype=REDIRECT,lrd=78866,ocn=78866,route=RP[num=82152],OrigProtocolCallRef=000000000030EE740228F81300000000,DestProtocolCallRef=null,TP=81122]]"
    Looks like the cfg field cannot be accessed, but the automatic toString() method is kind enough to dump all this information.
    Hope this helps.
    G.

  • I have one contact that I can call but cannot text. A return text states it is an invalid number. How can I fix it?

    I have one contact that I can call but cannot text. A return text states it is an invalid number. I have erased and re-entered the contact, changed phone identification and tried resetting the network - none have worked. What else can I try?

    What kind of phone is this person using? If this is an iPhone, are you logged into iMessage. If this is not an iMessage, then I suggest you both contact AT&T. SMS which is what is used between non-iPhone devices or between an iPhone and non-iPhone device are a carrier function. There is no setting in iOS or on the iPhone that deals with SMS. If you are able to send iMessage and/or SMS to other people, then AT&T needs to either look into your account to ensure SMS is configured, or they need to look at this other person's phone to see what it is reporting as its number since it is coming back invalid for you.

  • My iPod touch keeps telling me that my Apple ID has been disabled - I have changed my password twice. Is there a phone number that I can call to actually talk with someone about it?

    My iPod touch (3rd gen - 64 gig)
    keeps advising me that my Apple ID has been disabled - it doesn't say for security reasons
    I have reset the device, changed my password twice, and left it overnight but it still will not allow me to update OR install any new apps (that have been paid for).
    Does anyone have a phone number that I can call that will reach a person who can get it sorted out???

    Unfortunately, I don't have a number, but if you go the apple.com/support/itunes, it'll give you the pathway to connect with iTunes support. You can also just go straight to Express Lane. Hope this helps!

  • My photoshop 10 has stopped working  is there a telephone number for support that I can call to find out how to fix the problem???

    My photo shop 10 program has stopped working.  Is there a telephone number that I can call for support to find out how to fix the problem???Jenny

    Please read this (in particular the section titled "Supply pertinent information for quicker answers"):
    http://forums.adobe.com/docs/DOC-2325
    http://blogs.adobe.com/crawlspace/2012/07/photoshop-basic-troubleshooting-steps-to-fix-mos t-issues.html

  • How can I install and config Jolt for IIS so that I can call the services advertised by tuxedo?

    How can I install and config Jolt for IIS so that I can call the services advertised
    by tuxedo?

    It appears that you have apps that need updating that were pruchased from more than one account
    - Go to settings>Store and sign out and sign into your account.
    - Apps are locked to the account that purchased them.
    - To update apps you have to sign into the account that purchased the apps. If you have apps that need updating purchased from more than one account you have to update them one at a time until the remaining apps were purchased from one account.

  • My sons ipad uses my user name (i have an ipad and iphone).  I want to set his up with his own username and password.  How do i do that and can it be done without losing any of his apps, songs or video?

    my sons ipad uses my user name (i have an ipad and iphone). i want to set his ipad up with his own username and password.  How do i do that, and can it be done without losing any of his apps, music or video?

    Go to http://appleid.apple.com.
    To clarify, the mere act of changing the Apple ID on the device will not remove any content. But you cannot update the apps or re-sync them if they get deleted without the old Apple ID. It may be best to download them again with the new ID.

  • As I can call to a API from ABAP (46C) ?

    Hello.
    As I can call to a API from ABAP (46C)?
    Any idea?
    THANKS.

    The answer to that question really depends upon the SAP WebAS (or Basis as it used to be known) release you are on.  
    Did you have a look at the weblog mentioned earlier in this thread:
    /people/thomas.jung3/blog/2004/11/17/bsp-a-developers-journal-part-xiv--consuming-webservices-with-abap
    It shows some examples on 620 and 640.  Let us know what you have to work with, and we will see if we can help.

  • Updated to Mavericks and I get the upper left quarter of the screen blacked out on Time Machine. This means that I can't see the files. Any suggestions for getting rid of the black square?

    Ive tried disconnecting and reconnecting the Time Machine. And I've tried rebooting the iMac, but I still get the top left hand quarted of the screeen blacked out. I can scroll back through the back-ups but the back square means that I can't see the details of any file.

    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It’s unlikely to solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
    The purpose of the test is to determine whether the problem is caused by third-party software that loads automatically at startup or login, by a peripheral device, or by corruption of certain system caches. 
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards. Boot in safe mode and log in to the account with the problem. Note: If FileVault is enabled on some models, or if a firmware password is set, or if the boot volume is a software RAID, you can’t do this. Ask for further instructions.
    Safe mode is much slower to boot and run than normal, and some things won’t work at all, including sound output and  Wi-Fi on certain models. The next normal boot may also be somewhat slow.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin. Test while in safe mode. Same problem? After testing, reboot as usual (i.e., not in safe mode) and verify that you still have the problem. Post the results of the test.

  • [MDX]can't get the value from two variables (@FromDimTimeFiscalYearMonthWeekLastDateDay &(@ToDimTimeFiscalYearMonthWeekLastDateDay

    can't get the value from two variables when execute MDX : Anyone who can help ?
    ================================
    with member [Measures].[APGC Replied Volume] as
     ([Measures].[Question],[Dim Replied By].[Replied By].&[APGC])
    member [Measures].[APGC Moderated Volume] as
     ([Measures].[DashBoard Thread Number],[Dim Moderated By].[Moderated By].&[APGC])
    member [Measures].[APGC Answered Volume] as
     ([Measures].[Question],[Dim Answered By].[Answered By].&[APGC])
     SELECT
     NON EMPTY
     [Measures].[Forum Thread Number],
     [Measures].[Reply In24 Hour],
     [Measures].[Question],
     [Measures].[Deliverale Minute],
     [Measures].[Working minutes],
     [Measures].[Answered],
     [Measures].[1D Answer],
     [Measures].[2D Answer],
     [Measures].[7D Answer],
     [Measures].[APGC Replied Volume],
     [Measures].[APGC Moderated Volume],
     [Measures].[APGC Answered Volume],
    [Measures].[Avg HTR],
    [Measures].[Avg HTA],
     [Measures].[Total Labor]
     } ON COLUMNS, 
     NON EMPTY { ([Dim Engineer].[SubGroup-Alias].[Alias].ALLMEMBERS ) } DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS
    FROM (
     SELECT ( STRTOMEMBER(@FromDimTimeFiscalYearMonthWeekLastDateDay, CONSTRAINED) : STRTOMEMBER(@ToDimTimeFiscalYearMonthWeekLastDateDay,
    CONSTRAINED) ) ON COLUMNS
    FROM [O365]) CELL PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING, FONT_NAME, FONT_SIZE, FONT_FLAGS

    Hi Ada,
    According to your description, you can't get the member when using the strtomember() function in your MDX. Right?
    In Analysis Services, while the member name string provided contains a valid MDX member expression that resolves to a qualified member name, the CONSTRAINED flag requires qualified or unqualified member names in the member name string. Please check if the
    variable is a Multidimensional Expressions (MDX)–formatted string.
    Reference:
    StrToMember (MDX)
    If you have any question, please feel free to ask.
    Simon Hou
    TechNet Community Support

  • HT1338 I have an HP Printer/scanner, and since upgrading to Mountain Lion I can no longer scan on my HP.  HP tells me that I can get an upgrade app from 'Apple Software Upgrade' .  Does anyone know how to do this?

    I have an HP Printer/scanner, and since upgrading to Mountain Lion I can no longer scan on my HP.  HP tells me that I can get an upgrade app from 'Apple Software Upgrade' .  Does anyone know how to do this?

    HP couldn't find its own apps with both hands and a flashlight.
    As of Lion all scanning functions are incorporated natively in OS X. You can scan three ways:
    Use Preview: File > Import from scanner
    Use Image Capture
    (Preview and Image Capture are both in your Applications folder.)
    System Preferences > Print & Scan. Select your HP and use the Scan tab.
    If you have HP's "Image Zone" software installed, you no longer need it and it no longer works anyway.

  • I have a iMac with a built in airport extreme card.  Does the imac act as a wireless router so that I can connect to the internet from my iPad by tethering through my iMac?

    I have a iMac with a built in airport extreme card.  Does the imac act as a wireless router so that I can connect to the internet from my iPad by tethering through my iMac?

    Depends which iMac exactly and your network setup, you can go into System Preferences and under the Sharing pane you can enable internet sharing from ethernet (or whereever you get your internet from) to Wi-Fi.

  • Is there anyway that I can receive my money back from a recent purchase download

    Is there anyway that I can receive my money back from a recent purchase download

    You can try contacting the support staff for the stores at http://www.apple.com/emea/support/itunes/contact.html but reportedly, if they grant that it is a one time only event.

  • I have two accounts with iTunes.  Can they be merged or somehow combined so that I can have access to everything from both my old iPod Touch and my new iPhone5?

    I have two accounts with iTunes.  Can they be merged or somehow combined so that I can have access to everything from both my old iPod Touch and my new iPhone5?

    No.
    You can authorize your computer for both accounts.  Put all of the music on one computer.  Sync your devices to that computer.

Maybe you are looking for