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!

Similar Messages

  • NSURLErrorDomain error -1012 keeps coming up when I go to the app store to check for any updates.

    When I go to the App store to check for any updates it will not proceed and gives me the following error message NSURLErrorDomain  error 1012.
    Can anybody help please.
    Thanks,
    Bernard

    I am receiving the same error when I try to refresh the updates page but was able to download the Digital Camera Raw update without issue (this update was displayed on the page).
    Have not tried the 10.9.3 update...
    Curt

  • When I check for software updates only itunes and random other updates show up but not security updates or safari update. When i check installed updates I realized my last security update was 2011-004 and I still have safari 5.0.6. Can anyone help me?

    When I check for software updates only itunes and random other updates show up but not security updates or safari update. When i check installed updates I realized my last security update was 2011-004 and I still have safari 5.0.6. Can anyone help me?

    Don't panic. OS X 10.5.8 is the most popular PowerPC OS out there. People run it everyday without security breaches, including myself. It isn't Windows!
    If you're really that worried, I highly recommend Sophos Anti-Virus for Mac Home Edition. Supports PowerPC & Intel and Mac OS X 10.4-10.7.
    http://www.sophos.com/en-us/products/free-tools/sophos-antivirus-for-mac-home-ed ition/system-requirements.aspx
    Direct download: http://downloads.sophos.com/home-edition/savosx_73_he.dmg

  • Itunes says that the version of software on my ipod touch 3rd gen is up to date, but IOS 5 is avaliable. I have checked for software updates for days but it keeps saying that 4.2.1 is the current version. Why cant i get IOS 5?

    itunes says that the version of software on my ipod touch 3rd gen is up to date, but IOS 5 is avaliable. I have checked for software updates for days but it keeps saying that 4.2.1 is the current version. Why cant i get IOS 5?

    bradenfromwaikerie wrote:
    itunes says that the version of software on my ipod touch 3rd gen is up to date, but IOS 5 is avaliable. I have checked for software updates for days but it keeps saying that 4.2.1 is the current version. Why cant i get IOS 5?
    because you do not have a 3rd generation device. The OS Version says so , otherwise you would be at 4.3.5 minimum and also Itunes is also always correct in determining if you have the latest OS ( if not it fetches the newest from Apple's Servers ) . And because a 2nd generation iPod stops at 4.2.1 you can't get the newest OS, because your device is old. Buy a new iPod , they have iOS5 preinstalled.

  • ERROR 801881e1 while checking for phone update

    i get the following ERROR 801881e1 while checking for my phone update. I really want some solution. pls help if anyone knows about this. i really want the amber update.

    Try this ..
    Go to settings-->keyboard-->add keyboard and select any .. let it download to the phone .. 
    Now check for the update ...
    If it goes thru' fine, you may remove the added keyboard by again going to settings-->keyboard and long press on the one you want to .. then select 'remove' ..

  • Itunes 10.6.1.7 will not install...goes back to check for new update then goes back to original install screen

    I tunes 10.6.1.7 won't install....when I click Install....it checks for an update and then goes back to the original install screen without doing anything..... I have tried repairing I tunes first before doing the update and also tried unchecking ICloud and Safari to let I tunes update alone but still does not work...even tried to update ICloud and Safari by themselve's and those will not update either...
    thanks

    I have tried repairing I tunes first before doing the update and also tried unchecking ICloud and Safari to let I tunes update alone but still does not work...even tried to update ICloud and Safari by themselve's and those will not update either...
    It's sounding a bit like a problem with your Apple Software Update.
    Restart the PC. Now go into your Uninstall a program control panel. Can you see Apple Software Update in the list of programs? If so, select Apple Software Update and click "Repair".
    If the repair goes through okay, can you get the updates to go through properly now?

  • IPad and iTunes cannot check for iOS updates. And iTunes cannot restore the iPad to 6.1.2.

    Hi.
    I have iPad 4G 32GB A1460. NO JAILBREAK EVER. Recently I installed iOS 7 Beta 3 on it. And now when I go to Settings -> General -> Software Update I get the error message "Unable to Check for Update. An error occurred while checking for a software update." And that's all. No useful information actually.
    I have tried to reboot the device but no luck. I have also tried to connect it to a PC and check for updates from iTunes. iTunes shows me a little different error message: "iTunes could not check for an update to the carrier settings for your iPad. An unknown error occurred (1651). Make sure your network settings are correct and your network connection is active, or try again later." I checked the connection just in case and was convinced that the Internet connection is active. Does anyone know what's happening? I really don't like this.
    OK, maybe the next iOS version isn't out yet. But what will happen if it is? Will I be forced to use 7.0 Beta 3 forever? I don't want to))
    Another thing that I've tried to do is to restore my iPad to iOS 6.1.2. But the iTunes shows another error: "The iPad "<iPad name>" could not be restored. An unknown error occurred (3194)." I tried this on Windows and Mac. On Mac I have a different message: "This device isn't eligible for the requested build" which seems to be the same thing as 3194-error on Windows.
    Can anyone help me? Is there a reasonable explanation of this? Is this related to Apple's developers web site unavailability (http://devimages.apple.com/maintenance/)?
    Thanks in advance!

    Read https://discussions.apple.com/thread/4604596?start=0&tstart=0

  • Officejet Pro 6830 all in one - screen stuck on "checking for printer updates"

    Windows 7 X64 install
    I ran through the entire installation process and while the printer will print and will scan - the printer is hung on the message "checking for printer updates" with a red x below that message.  I let it set all night and no change.  The printer is setup as a wired network connection and can be seen with any of the tools.  I have not errors on my system.  I have uninstalled the software and reinstalled twice without success.  I tried running a firmware update, but the firmware update states that I have the latest firmware rev.  I even unplugged the printer and plugged it directly into the wall - n o change.  Evertime I startup the printer screen, just hangs on that screen. 
    Please help.

    I have the exact same problem with my new HP Officejet Pro 6830 printer.  Please could you provide a solution else I guess it will have to go back to the shop as I only picked it up this afternoon.
    Setup went ok and it even managed to print a couple of pages.  But next time it started up (with wired ethernet connection) this problem occurred and happens every time ever since.  (It is possible to use the printer for printing and scanning via PC, but the whole time its display is showing the "checking for printer updates" message.)
    This even happens if the ethernet cable is not connected on startup (meaning the printer cannot be used as a standalone printer / copier either at the moment).
    If I press the red cross (which I guess cancels the update searching) then I get a blue screen saying "B871634E" for a second or so, afterwhich I get a black screen with the message "There is a problem with the printer. Turn the printer Off, then On." and cannot do anything else.  (The problem is the same after doing a printer off then on - even when following the "hard reset" procedure already mentioned.)
    On checking the firmware version via the PC utility (while the printer sits there "checking for printer updates"), the PC utility app reported that the firmware was the latest version.

  • When i connect my ipad2 to iTune, it show "iTunes could not check for an update to the carrier settings for your iPad. An unknown error occured (1651)". What should i do to solve this problem? My iTune version is 10.1.4.10 and my ipad is 4.3.5.

    When i connect my ipad2 to iTune, it show "iTunes could not check for an update to the carrier settings for your iPad. An unknown error occured (1651)". What should i do to solve this problem? My iTune version is 10.1.4.10 and my ipad is 4.3.5.

    If you have iOS 7.1 then you must be a developer, so you should be posting in the developer forums : https://devforums.apple.com/index.jspa

  • I am trying to sync my ipad with my computer and keep getting the following message: iTunes could not check for an update to the carrier settings in your ipad.  an unknown error occurs (1631).  what do I do??

    am trying to sync my ipad with my computer and keep getting the following message: iTunes could not check for an update to the carrier settings in your ipad.  an unknown error occurs (1631).  what do I do??

    The search bar can be very valuable...........
    In using it, I found out other's have had this issue and it likely means you have a 3G iPad?  If you do, go into settings and turn off cellular data, then try to update again and you should be OK........

  • I upgraded to Mountain Lion yesterday, but since doing so I find that my 1Password app will not work. I have checked for 1Password updates but there are none. Is there a compatibility issue

    I upgraded to Mountain Lion yesterday, but since doing so I find that my 1Password app will not work. I have checked for 1Password updates but there are none. Is there a compatibility issue

    Hmmm...I'm using 1Password Version 3.8.20 (build 31499) with a fresh install (scrape and pave) of Mt. Lion on my iMac and it's working fine.
    I use Dropbox to sync 1Password so for my fresh install I simply downloaded 1Password from Agilbits website and installed it.
    Have you tried reinstalling 1Password?  Depending on how you purchased it, download it from their website or from the Mac App store to reinstall/replace it.  (IIRC v3.8.x comes directly from Agilbits and v3.9 from the Mac App store.)  You shouldn't have to uninstall it, the new download should overwrite the existing copy.
    As with anything else, be sure to run a  backup first!
    More here:
    http://support.agilebits.com/discussions/1password-38-for-mac-from-agilebits-web site/17861-finding-existing-data-file-when-reinstalling-1password
    http://support.agilebits.com/discussions/1password-in-mac-app-store/3377-how-to- reinstall
    http://support.agilebits.com/discussions/1password-38-for-mac-from-agilebits-web site/13769-reinstall
    http://support.agilebits.com/discussions/1password-in-mac-app-store/2394-reinsta lling-1-password
    Hope that helps.
    D'oh!  Mende1 beat me to it! 

  • Check for source updates

    Hi,
    I mantain a couple of PKGBUILDs and I was wandering if there is a (simple) way to automatically check for upstream updates.
    P.S.: Happy new year. ^^

    I've been using websec for years - it emails you the page if it changed, and *highlights* the changes.
    Here are the 2 programs - websec and webdiff, tweaked to remove the useless progress messages, so websec can be conveniently run by cron.

  • My mac mini is running slow.  Bought it in 2009.  Activity monitor shows nothing running that should not be.  Someone suggested it might be my operating system?  Check for software updates, and I am current.  Suggestions?

    My mac mini is running slow.  Bought it in 2009.  Activity monitor shows nothing running that should not be.  Someone suggested it might be my operating system?  Check for software updates, and I am current.  Suggestions?

    Open Activity Monitor, Show:>All Processes, sort on CPU%, see if anything using too much CPU% when this happens, click on Memory tab, do you have many Pageouts?
    Open Console in Utilities & see if there are any clues or repeating messages when this happens.
    Check the S.M.A.R.T. status of the drive in Disk Utilty by highlighting the Drive & looking at the bottom of the window.

  • How to fix different execution plan for different bind variable values?

    Please find the below query. The execution plan is fine. The problem That I am facing is in some cases for different bind variable values execution plan gets changed and degrades performance. I have used 6 tables here and all of the tables have histogram on all columns. Database version is Oracle 10g and the value of method_opt is 'For all columns size auto'
    SELECT l.LineNumber INTO :b0
    FROM Lines l ,LineVersions lv ,Statuses s
    WHERE (((((((((((l.serviceContractId=:b1 AND l.LineId<>:b2)
    AND lv.LineId=l.LineId) AND lv.StatusId=s.StatusId)
    AND s.Code IN ('EPR','ERE','EEP','ERP','PRP','PRD','AAC'))
    AND NOT (s.CODE='AAC' AND lv.activeto<TO_DATE(:b3,:b4)))
    AND lv.EquipmentDetailId=:b5) AND lv.RouteDetailId=:b6)
    AND (lv.cargoDetailId=:b7 OR lv.cargoDetailId IN
    (SELECT i_cd1.cargoDetailId
    FROM CargoDetails i_cd1 ,CargoDetails i_cd2 ,CargoCommodities i_cc1 ,
    CargoCommodities i_cc2 WHERE
    ((((((i_cd2.cargoDetailId=:b7 AND i_cd1.cargoDetailId<>:b7)
    AND i_cd1.ServiceContractId=:b1) AND i_cd1.cargoTypeId=i_cd2.cargoTypeId)
    AND i_cc1.cargoDetailId=i_cd1.cargoDetailId)
    AND i_cc2.cargoDetailId=i_cd2.cargoDetailId)
    AND i_cc1.commodityId=i_cc2.commodityId))))
    AND ((lv.customerGroupId IS NULL AND :b11=0) OR lv.customerGroupId IN
    (SELECT cgm1.customerGroupId
    FROM CustomerGroupMembers cgm1 ,CustomerGroupMembers cgm2 ,CustomerGroups cg1
    WHERE (((cgm2.customerGroupId=:b11 AND cgm1.customerNoId=cgm2.customerNoId)
    AND cg1.CustomerGroupId=cgm1.CustomerGroupId)
    AND cg1.ServiceContractId=l.ServiceContractId)))) AND lv.linetype='C')
    AND ROWNUM=1)
    After searching in several blogs I have found the below solutions. Please see it and let me know it is correct or not
    Solution 1:-Get rid of histogram that does nothing but messes up execution plan by giving below command
    exec dbms_stats.gather_table_stats(owner, tablename, method_opt => 'for all columns size 1', cascade => true);
    As 6 tables are there I need to execute above command 6 times.
    Solution 2:- Use stored outline. Not sure how to get the best execution plan.
    I am looking for answers ASAP. Thanks in advance

    As you have probably read, bind variables and histograms do not mix well.
    Histograms suggest that you have skew in your data such that different values should get different plans
    Bind variables exist so that SQL with different supplied values can be shared.
    Mix the two together and at parse time with bind variable peeking you get plans for specific values shared for all values.
    The solutions you have mentioned are the common approaches, together with a third - use literals not binds if you've got data skew (i.e. your histograms are justified) and don't want shared SQL.
    I would have thought that getting rid of some of these histograms may be the right approach if you're none of your application SQL is using literals to benefit from them.
    Can you confirm your version of Oracle.
    Further reading:
    http://jonathanlewis.wordpress.com/2009/05/06/philosophy-1/
    http://structureddata.org/2008/03/26/choosing-an-optimal-stats-gathering-strategy/
    http://richardfoote.wordpress.com/2008/01/04/dbms_stats-method_opt-default-behaviour-changed-in-10g-be-careful/

  • Why is there no option to check for app updates in the latest version of ITunes?

    I downloaded the latest version of ITunes but Apple took away the button to check for app updates. Why?

    Thanks. I just figured it out. Siri was not enabled. As soon as Siri was back on, the mike reappeared. But thanks for your help.

Maybe you are looking for

  • Recording Audio and Midi at the same time in Logic 7 Express Can it be done

    I am wondering if I can record audio and midi at the same time in Logic 7 Express. I am running my guitar thrugh a Roland GR 33, and a line out and using the GR 33 to trigger sounds in the Logic's synth section but cant seem to record all three track

  • Issue in using XSLT in XI

    I am trying to import an XSLT for use in XI. I followed the steps outlined in the XI manual to import the XSLT program: (1) created a zip file called transform.zip that contains the XSLT file transform.xslt (2) created an Imported Archives object cal

  • JMS Mantaray implementation on tomcat throws exception  on shutting down

    Hi All, I have deployed two war file say warfile1.war and warfile2.war on a tomcat server. Both have their own spring-jms.xml file and on deployment mantaray in initialize twice for each war file . And also Mantaray is running on auto - discovery mod

  • Saving space in table

    Hi, Any idea on how you got into this situation ? i have storage problem in table. when i delete row in table. deleted rows also take space. how will release that space when database is working in 24*7 enviroment Regards, shahique

  • 'Do Not Disconnect' but not showing up in iTunes!

    I just got done syncing my iTouch and remembered I have an old Classic layin' around. So I get it, and I plug it in. It says 'Do Not Disconnect' BUT it doesn't show up in iTunes. The hardware wizard on my computer said, "iPod Found" and "USB Storage