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

Hey everybody!

I'm working on a lively game of edge and I'm learning I'll you can tell

The way I put it in place is that I have a container that contains different symbols depending on the button you clicked on. They symbols open up to a deep part of the game.

However, I want to be able to define a variable on the stage that I can handle later when different symbols are open.

What I have so far is my limited understaning of jquery, in the scene that I'm leaving 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'm having is that when I put the value of the variable in time the name of the variable value and whole isn't rememembered in the symbols.

So is there any code I could write in symbols that can call the variables defined in the scene in the symbols.

I thank very you much for any help. It is greatly appreciated.

Hi, I have solved literally just this problem for me! I was unable to include variables in the symbols to remember too. It will be familiar if you have access to the care of in a symbol, like this (this kind - of takes a step backward and takes you to the main stage of symbol):

sym.getComposition () .getStage ().$("anElement").hide ();

How I updated the score (shown on the stage) to in a symbol, it's to GET the variable from the scene:

var score = sym.getComposition () .getStage () .getVariable ("score");

score += 100;

sym.getComposition () .getStage ().$("valueDisplay").html (score);

sym.getComposition () .getStage () .setVariable ("score", notes);

So for you I recommend you:

var variable1 = sym.getComposition () .getStage () .getVariable ("variable1");

var variable2 = sym.getComposition () .getStage () .getVariable ("variable");

if(Variable1 > variable2) {this}

Else {who}

If you want to update the variables and store them on the scene, then you'd in the same way:

Variable1 ++;

sym.getComposition () .getStage () .setVariable ("variable1", variable1")

I hope this helps, I am not 100% and it can be better explained as I learn I will myself!

Ray

Tags: Edge Animate

Similar Questions

  • a Q dumbo? ~ is elements Photoshop (a) a unique, one device download dvd? (b) a load of multi dvd device? (c) an account that I can access it from any device. , and finally, it is an account of the life, a single payment? Sorry, if it comes to TR

    a Q dumbo? ~ is elements Photoshop (a) a unique, one device download dvd? (b) a load of multi dvd device? (c) an account that I can access it from any device. , and finally, it is an account of the life, a single payment? Sorry, if it's simplistic, but nowhere in the contract the descriptions are these addressed facts?

    PES is a one-time purchase. You can buy a DVD at retail in an electronics store or as a download from Adobe. You have 2 activations for non-simultaneous use and the license is croos-platform for Windows and OSX if you wish.

    Mylenium

  • I have DV files on my HDD how set up so that I can import them into a first draft?

    I have DV files on my HDD how set up so that I can import them into a first draft?

    Try with a single to put the suffix .avi and .mov to see if that fixes it so the file can be imported into the BODY.

    If that works, it should be possible to run a simple package adds the suffix

  • Is there a UK sales / support phone number that I can call you please. I would like to talk to someone before you buy a product, but your website retains just direct me to this forum

    Is there a UK sales / support phone number that I can call you please. I would like to talk to someone before you buy a product, but your website retains just direct me to this forum

    Hi Joanne,

    Please see the link:

    http://www.Adobe.com/UK/company/contact.html

    I hope this helps.

    Concerning

    Megha Rawat

  • Is there a phone number that I can call to the Netherlands for the after-sales service?

    Is there a phone number that I can call to the Netherlands for the after-sales service?

    .. like another company in the world?

    http://www.Adobe.com/products/request-consultation/marketing-cloud.html

    Netherlands

    + 32 2 416 40 57

  • How to set a variable in the main timeline of in a symbol?

    Just get started with Animate and coming from Flash, it may be apparent to my question. How do you define a variable for the main timeline of in a symbol?

    I have 24 pairs of clickable elements, each in their own symbols, and 24 of these symbols to sit inside another symbol. I want every 24 to set the global variable even when you click on it. I do not find that this question is anywhere, which makes me think that I can be stuck in a mentality from Flash and approaching the task in a bad way. (However, there are MANY discussions address showing how objects to different levels in the hierarchy.) Which is well covered).

    By the way, how to access a function on the main timeline of in a symbol?

    Adobe should consider putting on foot (or pages) support just for people migration form Flash. In the documents that I've met so far there seems to be a studied effort to refrain from mentioning Flash somehow. I imagine that there are many people out there like me who have a deep background in coding Flash, but start with Animate. We don't need help with most of the basic concepts, but we still have some pretty basic questions on how to achieve certain things in Animate because our knowledge of Flash gets in the way.

    Hi Bill,

    There are a lot of discussions here on the scope, but here's a way to create a global variable:

    code on Stage.compositionReady

    sym.myGlobalVar = 1;

    Then, anywhere in your project, you can check/set this var as follows:

    sym.getComposition () .getStage () .myGlobalVar = 2;

    And here is a way to create a global function:

    code on Stage.compositionReady

    sym.myGlobalFunction = function() {}

    Console.log ('myGlobalFunction');

    }

    Then, anywhere in your project, you can call this function as follows:

    sym.getComposition () .getStage () .myGlobalFunction ();

  • Is it possible to save the current tabs and groups so that they can be recharged at any time?

    My Firefox crashes sometimes, and when I start it up again, my groups and tabs that I had are lost, so I need to recreate my history window. Is there a way I can save the groups that I have with the tabs on the inside so that I can retrieve them at a later date.
    "I say that Firefox does not save the whenever I close the browser, so I'm güssing there a file somewhere that contains this information, if I know how is called this file I could save it on my regular schedule and retrieve them if I had to, of course the best solution would be to have a ' save the groups ' & 'Support groups' in the menu.

    Thanks in advance
    DayoJ

    (PIN) App tabs and groups of tabs (Panorama) are stored in session data in the sessionstore.js file in the Firefox profile folder.

    You can use this button to go to the Firefox profile folder currently in use:

  • How can I get my active headset so that people can hear me from my pc?

    So, how can I get the headphones to work where the people I call using google voice can hear my voice?  And how can I get the people I call the google voice, how can I get people that I can't hear sounds from youtube and google translate?  Thank you for all the answers.

    Hello

    (1) what is the brand and model of headphones?

    (2) is the specific question to Google Voice?

    If the problem is specific to Google Voice, I suggest you to contact the Support of Google to get better assistance.

    Here is the link: http://support.google.com/voice/?hl=en

    You can also see the following article for more information.

    Activate the sounds in cat helmet's life: http://support.Microsoft.com/kb/935749

  • I work with Windows Movie Maker; What should I do so that he can import music from iTunes?

    I work with Windows Movie Maker; I downloaded iTunes songs and when I try to import the audio track of the film, I get an error message, "movie maker has stopped working".  It then restarts automatically, but without the audio track.  What should I do so that he can import?

    Might be interesting to try to convert the files to the. WMA
    format before you import into Movie Maker.

    There are many programs that can do conversions...
    The following freeware is an example...:

    (FWIW... it's always a good idea to create a system)
    Restore point before installing software or updates)

    Format Factory
    http://www.videohelp.com/tools/Format_Factory
    (the 'direct link' is faster)
    (the file you want to download is: > FFSetup260.zip<>
    (FWIW... installation..., you can uncheck
    ('all' boxes on the last screen)

    First, you will need to decompress the file or just open the
    Drag FFSetup260.exe out of the folder
    and drop it on your desktop. To install left click.

    Next, after the download and installation of Format
    Factory... you can open the program and
    left click on the toolbar, the "Option" button and
    "Select an output folder to" / apply / OK.
    (this is where you find your files after they)
    are converted)

    Drag and drop your clips of music on the main screen...

    Select "while"WMA"/ OK...

    Click on... Beginning... in the toolbar...

    That should do it...

    Good luck...

  • What is the first event that we can call after clicking the run button.

    Hi all

    I want to call an event when I click the button run prior to any other action. Can someone suggest me one solution other that the event expire?

    Thank you

    Anfel

    You can associate an event to a (hidden) Boolean (or another control), and then the fire by writing to a value property (sgnl) of this node before the event loop starts.

  • I need a variable that I can use to display the total time spent in a course.

    I want to create a personalized certificate of completion that the learner can print at the end of a course.

    I would like to have the total time spent in the price that is displayed on it, but I'm not sure of the variable to use.

    Take a look at: time display information - Captivate blog

    After reading if you have any other questions, fire away.

  • Is there a number that I can call motorcycle?

    I wonder if there is a number where I can talk to the Motorola Support. The support forums are not reallly he cut for me, because it is most often answered by my peers. I would like to talk to someone on a motorcycle.

    I can help with that.

    Try here. https://Motorola-global-portal.custhelp.com/app/chat/chat_launch/

  • BB maps is paralyzed by ATT, all other cards that I can call him by program on "BOLD"?

    I inserted a MenuItem "display the location of the sender" display Email menu. I hope that when a user opens an e-mail and selects the location of the sender 'show' in the menu, it will bring BB maps and show the current location of the sender.

    However, BB maps did not appear and then I've debugged it on the "BOLD" device. (Define criteria and get an instance of LocationProvider) went well until it reached LocationProvider.getLocation(-1).

    Here is the code segment:

    System.out.println ("view our locations');

    try {

    location = provider.getLocation(-1);

    System.out.println ("get location");

    ..........

    } catch

    (LocationException e) {

    System.out.println ("could not get (LocationException) location:"+ try () ") ;}

    catch (InterruptedException e) {

    System.out.println ("could not get the (InterruptedException) location:"+ try () ");

    }

    Only 'show the locations' has been printed, but 'get location' has never printed. Feels like the thread stopped at the place = provider.getLocation(-1) and never returned.

    I've read a lot of online messages and seems ATT disabled and hidden BB cards to promote the browser. The trick of using non Att theme not working anymore. Several people have complained that their BB icon cards disappeared at the end of March 2009.

    That's why cards BB no-show in my application? Is there a way to fix this?

    Thank you

    Hua

    LWG is OK - BB Maps has nothing to do with LocationProvider.

    However, you can start programmtically than Google maps if installed, using the ApplicationManager interface. O check for both and prefer BB Maps, but allow the customer to select Google given that some people prefer.

    See this thread on the BB Forum a tip on this:

    http://www.BlackBerryForums.com/developer-forum/143263-heres-how-start-Google-maps-landmark.html

  • Hello. Is it possible that I can call an external swf button?

    I create a game and I want to call a button from an external swf object. Is this possible?

    If the file is not responsible he cannot do anything to the file which is an impact.

  • Hello everyone. How can I make the styles for tables, I mean the table itself not the cells. A style that I can call for a table instead of copy paste an existinf one. Thanks for your help!

    And of course a table with cells embeded style styles...

    Have you tried to table styles (window > Styles > table style)?

Maybe you are looking for