AS3 swf doesn't update variables set via javascript

Can't figure this one out:  I've got a C4 project with 2 slides.  First slide has a button that executes a Javascript call:
SetStringVariable("myVar");
Where myVar is an internal C4 user variable with a default value of "Hello World".
The second slide has myVar being displayed in a text caption.
I publish the swf (AS3) and add this javascript function to the .htm file:
function SetStringVariable(n)
     document.getElementById('Captivate').SetVariable(n, "I set my variable!");
     alert("my var: " + document.getElementById('Captivate').GetVariable(n));
When you run the project on the web, the alert comes up with "I set my variable!" but the caption on slide 2 still says "Hello World".  Not sure why this occurs since I've just done a round trip with the variable.  It's as if C4 assigns the variable behind the scenes, but the UI doesn't update.  This does not occur if the C4 project is published in AS2.
Anyone experience this?  Any workarounds?  I'd like to be able to use the SetVariable function in AS3 projects.
TIA,
Jim Leichliter

Steve Howard noted that you can edit the CaptivateMainTimeline.as file typically located C:\Program Files\Adobe\Adobe Captivate 4\ActionScript 3.0\.
First, I added an external callback:
try{
               if((ExternalInterface.available == true) && (parent==stage))
                    myTrace("ExternalInterface is available");
                    ExternalInterface.addCallback("cpSetValue", cpSetValue);
                    ExternalInterface.addCallback("cpGetValue", cpGetValue);
                    ExternalInterface.addCallback("mycpSetValue", mycpSetValue);
                    ExternalInterface.addCallback("mycpSetValue2", mycpSetValue2);
                    ExternalInterface.addCallback("cpSetValueJim", cpSetValueJim);
Then I wrote my handler for the callback function which was a slight modification to the cpSetValue function that was already there:
     //JBL: For External Interface setting any type of value
          public function cpSetValueJim(variable:String, val):void
          //myTrace("cpSetValue variable1 " + variable + " ; val  " + val);
          var arr:Array = variable.split(".");
          var ref = this;
          for(var i=0; i < arr.length -1; i++)
               ref = ref[arr[i]];
          ref[ arr[arr.length -1] ] = val; // This works fine for numbers, booleans and strings
Just make sure you publish your project in AS3.
You can place some js in a captivate button:
SetStringVariable("NameOfYourUserVariable");
Modify the published .htm file by placing in this js function.
function SetStringVariable(n)
     document.getElementById('Captivate').cpSetValueJim(n, "I set my variable!");
     alert("my var: " + document.getElementById('Captivate').GetVariable(n));
That's powerful stuff.  Thanks Steve (ACE) for pointing this out!  This opens up a whole new world of possibilities.

Similar Messages

  • My ipod touch 4g doesn't show option for os update in setting-general page. Can i update it via itunes by connecting it to computer?

    My ipod touch 4g doesn't show option for ios update in setting-general page. Can i update it via itunes by connecting it to computer?

    Try:
    - iOS: Not responding or does not turn on
    When it says place the iPod in recovery mode ue one of these programs:
    For PC
    RecBoot: Easy Way to Put iPhone into Recovery Mode
    If necessary:
    Download QTMLClient.dll & iTunesMobileDevice.dll for RecBoot
    For MAC or PC
    The Firmware Umbrella - TinyUmbrella
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - Try on another computer
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
    Apple Retail Store - Genius Bar       

  • TS4083 Is there a way or a setting my folders in Mail to automatically update across all devices? if I transfer an email to a folder for follow-up on my PC, my folder in Mail on my iPhone doesn't update until I actually go into the folder and update manua

    Is there a way (or a setting) for my individual folders in Mail to automatically update across all devices? For example, if I transfer an email to a folder for follow-up on my PC - say 10th of the following month - the same folder in Mail on my iPhone doesn't update until I actually go into the folder and update manually.  Interestingly though, if I create a new folder on any of my devices they automatically appear on the other devices so it is just the actual contents that I am referring to here.  Appreciate any help or guidance.
    Regards
    Justin

    You can turn mail off in the settings but then you can't use it for anything, including the "test" that you want to perform.
    Settings>Mail, Contacts, Calendars>Account Name>Mail>Off. That totally turns off the mail account.
    As long as mail is turned on and you launch the app, it will look for an download new mail.

  • How to set variables values via VBA.

    Anybody please help.
    How to set variables values via VBA in workbook. SAP Netweaver 2004s.

    Pass variable values with VBA and BI 7.0 funtions to Query
    At first a remark u2013 Iu2019ve read a lot of threads saying that passing values to a query can be done by using VBA code only. Iu2019ve tested it but Iu2019m not sufficient with the new BEX 7.0 API and therefore I use a mixture of BEX 7.0 funtionality and VBA. I create a BEX 7.0 design item button passing the values to a query u2013 I hide this button somewhere on the sheet or on a hidden sheet and I then raise the event to click the button from VBA code. Works fine and the maintenance is easier if something changes in the API in the future again.
    How to start:
    Switch to design mode in BEX Analyzer:
    Implement a BEX 7.0 design item u201Cbuttonu201D
    Click on the button to implement the properties
    Make the input for the commands
    data_provider = dataprovider_1
    cmd = process_variables
    subcmd = var_submit
    No comes the part with the variables u2013 Letu2019s assume a query has 4 variables but you only want to change 1 with the button u2013 an organizational unit for instance.
    Make a range somewhere in the excel with the following structure:
    Name    Index   Value
    VAR_NAME_1      1       Variablename
    VAR_VALUE_EXT_1 1       variablevalue
    Value should contain the name of your variable of course and u201Cvalueu201D the value of your variable
    Set a name for this range with EXCEL functionality but without the header:
    Back to the properties of the button: Insert the name of the range with the variables in the field Command Range:
    If you have more variables to process you can of course enhance your Filterrange!
    In the left upper Corner you have a name for your button:
    Now you can raise the button-click in vba like this:
    Application.Run "'" & ThisWorkbook.Name & "'!Sheet2.BUTTON_35_Click"
    regards, Lars

  • Safari preferences home page setting doesn't update

    Safari preferences home page setting doesn't update . After upgrade from Snow Leopard To Mavericks, Safari continues to start up & open new windows to last window open. It doesn't respond to resetting prefs home page to current page,, although it saves the pref home page http://address in the box. Help
    are there any more known issues I might need to know about? I just started using Mavericks

    Safari > General
    Safari opens with:
    "A new window" selected?

  • Moving files doesn't update Flash Skins in DW CS 4?

    Hello,
    on a page I've got a flash movie (.swf with skin (via
    importing/converting a qt in adobe media encoder, then importing
    video into flash, adding a skin, them exporting to site folder an
    opening in DW CS4).
    it works fine in the browsers.
    now when I want to change the position of the page in my site
    folder (move it into different folder) DW asks me if to update
    links, I click okay, but it doesn't update the code/links whatever
    (to show me the skin for controlling the movie). What have I
    forgotten to consider? Maybe alsready at exporting the file(s) from
    Flash?
    Thanks in advance,
    beatrice

    beatrice posted in macromedia.dreamweaver
    > As far as I understand the .swf holds the url of the flv
    in it's
    > code, so those should be kept together. and the skin swf
    is
    > connected to the ?large' .swf, so those should be kept
    together,
    > too.
    (I will assume you're using the FLVPlayback component in
    Flash)
    The .swf that holds the url of the flv (let's call that
    player.swf for
    now) uses whatever link you give it. You can give it a root
    relative
    location so it will work from anywhere on your site.
    /videos/flvs/film1.flv for example.
    And, depending on the object/embed code generated, you should
    be able
    to edit that in the code view in DW. Something like
    &streamname=/videos/flvs/film1
    And you can then store player.swf in a different location.
    /media/swfs/player.swf for example.
    I think DW will update links to player.swf if you move
    player.swf to a
    different location, but I don't know if it will update
    object/embed
    code.
    However, it seems that .swf files created with the
    FLVPlayback
    component are hard-coded to look for the skin file in the
    current
    location - that is, the location of the html file with the
    object/embed
    code.
    > But I don't want my pages/html folders be cluttered with
    .swf
    > files and I
    > don't want the videos folder get cluttered by pages
    files ... but
    > keep them clean sorted in their kind of media folders
    .... and be
    > able ot separately shovel them around or move them to
    subfolders
    > if neccessary and to rename html pages with the
    sitemanagement in
    > DW to update the links automatically...
    Understandable.
    >
    > Or the other way, I thought that .swf and flv plus .swf
    skin
    > could be put onto
    > any other html page, but then the skin does not appear.
    it seems
    > connected with the html code, but how and why?
    Oops. I think I answered this above. I think it is the
    FLVPlayback
    component that creates a hard-coded path to the current
    directory.
    > it would mean that once created video holding html pages
    cannot
    > be moved in
    > the site folder anymore. (or that the swfs must be
    published from
    > within flash again with different name/target folders...
    > That would not be a very flexible sitemanagement...
    > There must be sth I am missing here...
    Again, you can store the player .swf files anywhere, and the
    .flv files
    anywhere, but AFAIK, the skin .swf files must be in the same
    folders as
    the .html files that reference them.
    There's a chance that somebody in the Flash forums has
    created a work-
    around, but I haven't been there in a while.
    I haven't tested, but you /might/ be able to set a BASE href
    element to
    get around it. Of course, all other links in that page would
    need to be
    root relative after doing so.
    Another method (if supported by your host) might be using
    .htaccess
    with a rewrite directive.
    If you're feeling adventurous, you can edit (a copy of) the
    FLVPlayback
    component or one or more of its actionscript files found in
    the
    Flash configuration folder.
    Mark A. Boyd
    Keep-On-Learnin' :)

  • Windows 7 can´t find the driver for HP Officejet 5510. (Windows Update is set to automatic.)

    Hello everyone, I just installed Windows 7 - 64 bit. Supposedly the driver for the HP Officejet 5510 will install automatically in Windows 7 when connected via a USB, which is not happening.
    http://h10025.www1.hp.com/ewfrf/wc/document?docname=c01796879&lc=en&dlc=en&cc=us&os=4063&product=311...
    I am getting the message that Windows 7 can't find the driver. I don´t understand why?
    My Windows Update is set  to automatic.
    I see the device under printers. But when I click on it it says driver missing.
    Is there any solution? Possibility to get the driver some other way? Unfortunately HP doesn't provide a download on their website. 
    Can anyone help me, pleease?
    Honza

    I have the same problem. I spent all this money to get more features, not less so Windows 7 should run all of my XP stuff. Now I see that my HP Officejet 5510 all-in-one won't scan and I can't save in pdf format. C'mon HP....give us a driver! If I wind up having to buy another printer, I swear it won't be an HP if I get abandoned on this one. And I'll also switch vendors for all of the printers I'm responsible for replacing at work too.

  • Convert AS2 swf to AS3 swf

    I have a swf (written in AS3) that loads other swfs into it.
    There are no issues when loading other AS3 swfs but there is a
    problem loading AS2 swfs. I get the following error:
    TypeError: Error #1034: Type Coercion failed: cannot convert
    flash.display::AVM1Movie@35d3a51 to flash.display.MovieClip.
    Is there any way to convert the AS2 swf into a AS3 swf so it
    will be compatible with my loader? I cannot go back and change the
    AS2 swfs because I do not have the fla files. Or is there any way
    to incorporate AS3 code that will load AS2 swfs properly? It seems
    hard to believe that Adobe would neglect this backwards
    compatibility issue. Thanks

    Hello Andrei1,
    Thanks for looking at my simple AS3 code. The AS2 swfs that
    I've been working (and having difficulties) with are components
    that I've purchased from places like www.flashden.com. Some are
    image transitions (such as "Dynamic Image Draw found at
    http://www.flashden.net/item/dynamic-image-draw/7532)
    while another is used to create a looped banner rotator animation
    (IMG_loop, a free d/l from www.afcomponents.net). I have another
    that uses an .xml file to configure a slideshow animation.
    You mention "needing to do more" if AS2 scripts inside its
    swf are to be run by the parent AS3 fla; what would these lines of
    code be?
    In researching my problem further I've since realized that
    most of these issues deal both with the version of AS used, as well
    as the version of the Flash player the fla is set up to animate
    for. In particular, the "Dynamic Image Draw" component requires
    that Flash Player 8 or 9 be used with AS2.
    Given that many of my purchased components are like this,
    I've since changed my main fla movie from AS3 back to AS2 and have
    learned that the scripting needed to call individual multiple swfs
    into it at various points in the timeline is MUCH simpler!!!!! One
    single, easily interpreted, line of code vs. 5 lines using
    variables and much more arcane (to me) function calls.
    I started my file with AS3 figuring that I'd be better off
    learning the new version of the language; much stress and
    forehead-rubbing later, I've seen just how much easier and
    understandable AS2 is to learn.
    I recognize that there are likely very strong arguments for
    the more structured coding approach used by AS3, but for someone
    like me who wants to generate customized Flash presentations with
    little fuss, I'm not qualified to make them.
    Perhaps this is a no brainer for those many flash gurus out
    there, but for me this tiny bit of wisdom has been hard fought for!
    That being said, is there an easy way to convert a swf file
    created using AS2 to something that AS3 can work/interact with?
    I've come across a free d/l product called actionscript bridge, but
    haven't been able to understand how to get it to work.

  • Audio controller doesn't update

    HI
    I've got a problem with the folio overlays audio controller .
    in an article, i've imported an mp3 audio file and in folio overlay set the folder with the images.
    It works great on the first page. with the the content collector tool, i placed the audio block on the other page.
    The sound continues to play on page changing but the audio controller doesn't update.
    Any Ideas ?
    Thank you.

    hi Bob
    Yes, the overlay panel shows always the links to the primary folder.(copy-paste method or content collector method)
    BTW : Our purpose was to propose to our readers a different audio ambiance in each article wich go along several pages. Not in in entire folio. We thought it would be nice if the readers could have the control of the audio via the controler during the reading. (it doesn't work with buttons). Does it make sense for you ? Or may be we were wrong ?
    Waiting for an evolution of the overlay panel...we have to find another way.
    Thank you for your help.
    Best regards

  • Updating variable problem

    i am writing some code that updates a variable but the facing variable never seems to change, i want it to be updated at the end of every call from the main class
    it seems to keep the value of Zero
    any help would be great Eoin
    public class RobotMover
    Navigator robot;
    private final int NORTH = 0;
    private final int SOUTH = 180;
    private final int WEST  = 270;
    private final int EAST  = 90;
    int facing = 0;
    int clockWise  = 90;
    int antiClockWise  = -90;
    public RobotMover(Navigator newRobot)
    robot = newRobot;
    public void north()
         //if facing north : forward ()
              if(facing == NORTH)
                   LCD.drawString("north", 0, 3);
                   robot.travel(25);
                   int facing = NORTH;
         //if facing south : rotate180(); forward ()
              else if(facing ==SOUTH)
                   LCD.drawString("south to north", 0, 3);
                   robot.rotate(180);
                   robot.travel(25);
                   int facing = NORTH;
         //if facing west  : rotate90Anticlockwise(); forward()
              else if(facing ==WEST)
                   LCD.drawString("west to north", 0, 3);
                   robot.rotate(clockWise);
                   robot.travel(25);
                   int facing = NORTH;
         //if facing east  : rotate90Clockwise(); forward()
              else if(facing == EAST)
                   LCD.drawString("east to north", 0, 3);
                   robot.rotate(antiClockWise);
                   robot.travel(25);
                   int facing = NORTH;
    } the rest of the methods are similar setting facing in the given directions. however when called from main doesn't update from 0;
    Edited by: Chuckie on Aug 9, 2009 2:26 PM

    stevejluke wrote:
    In each of your if statements you are creating a NEW locally scoped (to the IF statement) variable named facing, and assigning the direction to that.
    Get rid of the int before each of the facing assignments:
              if(facing == NORTH)
                   LCD.drawString("north", 0, 3);
                   robot.travel(25);
                   facing = NORTH;
    After you get rid of the local declarations, please also notice that you are always setting facing to NORTH

  • Code doesn't update when uploading new files to website.

    code doesn't update when uploading new files to website.   I was using an old DW version for a long time then forced to upgrade when I bought my MacBook Pro. Now when I make changes to my pages and link to new files etc on my harddrive, when i upload the pages it won't image because the code still points to harddrive (this did not used to be a problem)... I manually changed the code on the web host site to point to the site and it loaded fine. But now my files on my harddrive also point to the web host files and now don't image on my computer. I never had to worry about this so far and wonder if the new version has a setting I'm supposed to be aware of so that I can design on my hardrive and upload and it knows that the files are being uploaded with it?  Ugh hpe this makes sense - I'm NOT a webs designer and the new DW is way more than I use in it's technology.

    Hi
    This sounds like you have not defined your site in the site definition.
    Follow the steps in these 2 tutorials to set-up your site locally and for the remote server -
    http://www.adobe.com/devnet/dreamweaver/articles/first_website_pt1.html
    http://www.adobe.com/devnet/dreamweaver/articles/first_website_pt6.html
    PZ

  • HELP, My SWF doesn´t work in latest versions of IE and Safari

    I have a swf made in Flash CS4. It works fine in firefox and older versions of flash player in IE, but it doesn't work in recent versions of IE and Safari In this case just I can hear the music.
    Could help me please, my URL is:
    http://www.quecolor.com.mx/UAT/

    Hi,
    Did you try embedding swf using SWFObject via JavaScript ? Here is more information on how to embed swf using swfobject. http://code.google.com/p/swfobject/wiki/documentation
    Thanks,
    Karthikeyan R.

  • How do I get at a variable set in the On Start macro?

    Within the On Start macro of an Access Web App, I set the variable CurrentUserEmailAddress to =UserEmailAddress.  I would like to be able to access this variable somehow from a table On Update event macro.  How can I pass this variable along?

    For those following this thread, some of the suggestions don't apply to Access Web Apps, unfortunately.
    Access Web Apps have an On Start macro (accessible from the 'Advanced' button on the Home ribbon), which runs when the app is launched in the browser.  This is a UI Macro.
    The OnUpdate event is a table event, and runs a data macro.
    As you've noticed, you can't access the UserEmailAddress() function in a data macro, and you also can't access variables set in a UI Macro.
    UI Macros and data macros run in different contexts (the former locally in the browser, and the latter on the server) so the sharing available between them is limited.
    There may be alternatives, but one possibility is to keep a table to hold variables (in this case just CurrentUserEmailAddress, but if you have more, you could use the same table).
    I would try creating a table called Vars, with a column called CurrentUserEmailAddress.  Add a single row to it (the value for CurrentUserEmailAddress is not critical, since we will override it in the OnStart macro).
    Create a data macro called SetEmailVar, that takes a Value as a parameter.  It will set the value in the Vars table.
    <?xml version="1.0" encoding="UTF-16" standalone="no"?>
    <DataMacros xmlns="<DataMacro><Parameters><Parameter">http://schemas.microsoft.com/office/accessservices/2010/12/application"><DataMacro><Parameters><Parameter
    Name="Value" Type="Text" Description="Value"/></Parameters><Statements><LookUpRecord><Data><Reference>Vars</Reference><WhereCondition><Expression><Original>[ID]=1</Original><FunctionCall
    Name="="><Identifier Name="ID" Index="0"/><IntegerLiteral Value="1" Index="1"/></FunctionCall></Expression></WhereCondition></Data><Statements><EditRecord><Data/><Statements><Action
    Name="SetField"><Argument Name="Field">CurrentUserEmailAddress </Argument><ExpressionArgument Name="Value"><Expression><Original>[Value]</Original><Identifier Name="Value"/></Expression></ExpressionArgument></Action></Statements></EditRecord></Statements></LookUpRecord></Statements></DataMacro></DataMacros>
    Then create a corresponding GetEmailVar macro that will fetch the value and return it:
    <?xml version="1.0" encoding="UTF-16" standalone="no"?>
    <DataMacros xmlns="<DataMacro><Statements><LookUpRecord><Data><Reference>Vars</Reference><WhereCondition><Expression><Original>[ID]=1</Original><FunctionCall">http://schemas.microsoft.com/office/accessservices/2010/12/application"><DataMacro><Statements><LookUpRecord><Data><Reference>Vars</Reference><WhereCondition><Expression><Original>[ID]=1</Original><FunctionCall
    Name="="><Identifier Name="ID" Index="0"/><IntegerLiteral Value="1" Index="1"/></FunctionCall></Expression></WhereCondition></Data><Statements><Action Name="SetReturnVar"><Argument
    Name="Name">Value</Argument><ExpressionArgument Name="Value"><Expression><Original>[Vars].[CurrentUserEmailAddress ]</Original><Identifier Name="Vars.Email"/></Expression></ExpressionArgument></Action></Statements></LookUpRecord></Statements></DataMacro></DataMacros>
    Now in the OnStart macro you can call SetEmailVar and pass it =UserEmailAddress(), and in the tables OnUpdate macro, you can call GetEmailVar to get the value.
    Note that there is a limitation to this solution, which is that if multiple users are using the app at the same time, the variable will reflect the most recent user, so any user which gets the value will get that value, which may not be what you want.
    Another potential approach is to remove the built-in Save button from the action bar, and to write data macros to do update/insert, and call them from a custom action bar button and pass in the value from the UI macro for the button.  However, that
    solution is somewhat complicated, and won't work at all for datasheets since you can't force users to save only through the action bar button since just changing the current row will trigger a record save.

  • My iTunes doesn't keep track of my listening history anymore. It doesn't update play counts and default "Recently Played" playlist.

    My iTunes doesn't keep track of my listening history anymore. It doesn't update play counts and default "Recently Played" playlist. But it still tracking plays from my iPhone and syncing them.
    I've tried to repair it with setup file. Nothing's changed.
    Can you help me with that?
    NOTE: Now I tried disabling the crossfade feature and it worked, started to count again. But I like crossfade, I don't want to keep it off.

    I think I got this figured out. The playcount does update, but not how the previous iPod models update their playcount. Instead of immediately updating the playcount right after you finish the song like the older iPod models, iPod Touch keeps the updates in memory. The next time you connect to iTunes it'll sync those playcounts in memory to the actual songs itself, effectively updating the playcount of the songs only after connecting to iTunes. I have set my syncing manually. That's why after connecting to iTunes, my playcounts are updated. BUT it doesn't solve the mystery of my Smart Playlist. Even though in iTunes, the correct songs are listed, in the iPod Touch, it shows the old playlist.
    Don't you just hate that? It was working fine before on non-iPod touch models. Now we have to live with this new bug. I just hope when they release software 2.0 it fixes these bugs and that they *give it for free!* People shouldn't be charged on something they should have gotten as a support!

  • 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!

Maybe you are looking for

  • Mail etc migration from Snow Leopard

    Hi Folks. My new iMac has just arrived. Previously I have moved everything from my old imac to a new one as a single operation. But this has left me with a lot of Power Mac software and loads of other stuff that is now irrelevant. So this time I'm go

  • Backup/Restore VM Manager (3.2.3) with new machine

    Dear All Experts, I try to backup from old manager configuration file to new manager machine as below: $exp ovs/Heng123456 grants=y compress=y file=/tmp/ovsbackup.dmp Then I try to restore this backup file on new manager as below: drop user ovs casca

  • Changing view settings not working

    I have been able to change the view settings for many different types of messages where I specify the sender or the subject, But when I ask to search is the body of the message contains a word when from a particular sender, nothing changes.

  • OSX 10.9.2 iMac won't scan for new Wifi networks.

    Sometimes I will tether the mac to my cell phone (because roomates hog bandwidth).  The problem is that when I click the Wi-fi icon in the upper-right hand corner, it shows Wifi networks it has found before but it will not scan for new ones (such as

  • Firmware upgrade to 7.6 causes audio jumps

    I've just updated my two Airport express boxes to firmware 7.6. Now every few seconds there is a jump or glitch playing audio that sounds like a buffer overflowing causing data loss. I've tried unplugging & restarting them both without success. One i