Any ideas why this "if" statement is not working?

I have this code inside a click command. The first part works, will change variable to 5. But if variable = 5 animation does not play: 
if (position != "5"){
                              sym.setVariable("position", "5");
                              var position = sym.getVariable("position");
                                        sym.$("Text3").html(""+position);
else if(position==5)
sym.play("animation")
Thanks

Hi there, can you put a console log before the if statement to confirm that you have a valid value for the "position" variable, at that click scope?
console.log('position = '+position);
Run it in your browser and open the JS console to check the log output of the above test.

Similar Messages

  • Any idea why command-shift-delete is not working?

    I have had a MacBook Pro for a few years, and recently purchased a new iMac. the iMac arrived, and I transferred everything from the MBP to the iMac using the Migration Assistant. Worked very well, from what I can tell. The only thing I am unable to do is delete using shift-delete and empty the trash using command-shift-delete.
    I should also say that I did the initial setup of my iMac with a separate Admin account, then deleted that account to use the old account from my MBP on the iMac. I suspect this is a permissions issue, and I have seen articles that suggest deleting this trash account and letting OS X recreate.
    Any thoughts on what else to try?
    Thanks in advance for any help!
    Ineed911

    baltwo - I acknowledge that I wrote this incorrectly as shift-delete. That said, I am unable to delete a file/folder using command-delete. Also, unable to empty the trash using command-shift-delete.
    I had already tried resetting my keyboard shortcuts, and this did not help either.
    And these shortcuts worked on my MBP prior to the migration.
    do appreciate the reply and attempt.

  • Dropped my phone in water and now the camera doesn't work, any ideas why its' the only thing not working

    I somehow knocked my iphone 4s in the sink of water and everything seems to work except the camera.  Is there a way to reinstall  the software or does anyone know what I can do other than using phone protection insurance?  All my pictures are there and they upload and share but just can't get the camera to take pictures.

    The device is damage, it was dropped in water.  You are lucky that the device works at all.

  • When I compose an email in either gmail or yahoo, the cursor lags behind for about 2 seconds. This does not happen when I compose an email with Safari or Chrome. I am using a Mac with Firefox version 3.6.3. Any idea why this happens?

    When I compose an email in either gmail or yahoo, the cursor lags behind for about 2 seconds. This does not happen when I compose an email with Safari or Chrome. I am using a Mac with Firefox version 3.6.3. Any idea why this happens?
    == This happened ==
    Every time Firefox opened

    try
    The Reset Firefox feature can fix many issues by restoring Firefox to its factory default state while saving your essential information.
    Note: ''This will cause you to lose any Extensions, Open websites, and some Preferences.''
    To Reset Firefox do the following:
    #Go to Firefox > Help > Troubleshooting Information.
    #Click the "Reset Firefox" button.
    #Firefox will close and reset. After Firefox is done, it will show a window with the information that is imported. Click Finish.
    #Firefox will open with all factory defaults applied.
    Further information can be found in the [[Reset Firefox – easily fix most problems]] article.
    Did this fix your problems? Please report back to us!
    Thank you.

  • I am trying to softproof an image using a CMYK .icc file. I sent an image from LR 5 to PS CC 2014, opened the Camera Raw FIlter, but the hyperlink to access workflow is not showing up in the CR dialogue box... Any ideas why this might be?

    I am trying to softproof an image using a CMYK .icc file. I sent an image from LR 5 to PS CC 2014, opened the Camera Raw FIlter, but the hyperlink to access workflow is not showing up in the CR dialogue box... Any ideas why this might be?

    I am trying to softproof an image using a CMYK .icc file. I sent an image from LR 5 to PS CC 2014, opened the Camera Raw FIlter, but the hyperlink to access workflow is not showing up in the CR dialogue box... Any ideas why this might be?

  • Iphoto will not re-install after disappearing during a software update, any ideas why this happened?

    Before i ran the software update i had to iphoto icons in the launch pad, both had exactlly the same content so i just ignored it for a wile till i needed to update my photos, which i was hoping to do after the update.
    However when i restarted both iphoto icons had gone and iphoto seems to have been wiped off my mac completelly, I have got a back up of all my pic and videos so this is not a problem of recovering them.
    i have then tryed to instal iphoto from the app store, resulting in there being a perminant downloading icon making no progress over the last two hours.
    If any body has any idea why this happened and what i can do to provent it happening again as well as getting iphoto back the help wil be much apricated.

    In addition to Larry's questions what software update did you apply? Do you still have an iPhoto Library in your Pictures folder? If you do what happens if you double click on it?
    OT

  • I have noticed recently that deleted e mail messages do not disappear from the screen.  Instead they turn grey until I switch to another mailbox.  When I return, they are gone.  Any idea why this has started to happen?

    I have noticed recently that deleted e mail messages do not disappear from the screen.  Instead they turn grey until I switch to another mailbox.  When I return, they are gone.  Any idea why this has started to happen?

    I have noticed recently that deleted e mail messages do not disappear from the screen.  Instead they turn grey until I switch to another mailbox.  When I return, they are gone.  Any idea why this has started to happen?

  • The crop tool in my tool bar is not showing up. Any ideas why this is? Please Help

    The crop tool in my tool bar is not showing up. Any ideas why this is? Please Help

    It's the 3rd one on Photoshop standard.  As Curt implies, each little icon position has several possibilities you can display, allowing you some customization of your Tools panel.  Click and hold the mouse button to see each of the choices.
    -Noel

  • I use MAIL exclusively. I have a number of Mailboxes set up. My messages will not load on one particular Mailbox on my MacBookair, but do load in that Mailbox on my IOS devices. Any idea why this is happening?

    I use MAIL exclusively. I have a number of Mailboxes set up. My messages will not load on one particular Mailbox on my MacBookair, but do load in that Mailbox on my IOS devices. Any idea why this is happening?

    No idea at all, it might help if you gave more information, what type of mail, who provides it, any error messages etc.

  • I have attempted to update a few apps and the install has frozen on 'waiting' not allowing me to either access the app or delete it, any idea why this has happened and how do I get around it?

    I have attempted to update a few apps and the install has frozen on 'waiting' not allowing me to either access the app or delete it, any idea why this has happened and how do I get around it?

    See if either of these things works for you. In the future ... Only update one app at a time. Forget that the Update All button even exists. It causes more problems than it does good - IMO.
    Make sure that you do not have a stalled download in iTunes - a song or podcast .... if you have a download in there that did not finish, complete that one first. Only one thing can download at a time on the iPad so that could be what is causing the problem.
    If that doesn't work - sign out of your account, restart the iPad and then sign in again.
    Settings>iTunes & App Store>Apple ID. Tap your ID and sign out. Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.
    Go back to Settings>iTunes & App Store>Sign in and then try to update again. Tap one waiting icon only if necessary to start the download stream.

  • IE6/CSS browser issue- any idea why this is not working?

    http://www.wilmerdds.com/test/index.htm
    If you look at the left column, you will see a black box.  It shouldn't be black. it should match the bg color of the column.  Any idea why this is happening?

    Hi
    The problem is that you are using a png, and IE6 does not support png transparency. You could try using the iepngfix from - http://www.twinhelix.com/css/iepngfix/.
    PZ

  • Some photos from one day are showing up on my photo stream, and others from that same day are not. Any idea why this might be?

    Took a bunch of photos on vacation one day, and it seems like the first batch from one day are not showing up, but then all of a sudden, the ones from the second half of the day are there. They are not showing up on the photostream on my iPhone on which I took the photos, or on my iPad or in iPhoto on my computer. Any idea why this could be happening? All the other photos I took all week showed up on my Photostream.
    Is there anyway to force these photos into the photostream?
    Thanks! Any help would be appreciated!

    photo stream uploads photos from your photo app when it is connected to wifi and the photo app has been closed correctly.  That may be why your seeing photos pop up on different dates
    http://support.apple.com/kb/HT4486

  • My wifi goes down at least once a day and I have to unplug the time capsule and reboot it and then it works fine.  Any idea why this is happening/what I can do to fix it?

    My wifi goes down at least once a day and I have to unplug the time capsule and reboot it and then it works fine.  Any idea why this is happening/what I can do to fix it?

    I was having this problem while still using Mavericks -- it started after a Mavericks update last spring.  During the initial Yosemite beta runs over the summer, it seemed to be fixed, but after the official launch in October, I had all sorts of problems keeping connected.  Its gotten a little better, but still happens to at least one of my devices every day.  Weird that we still cannot figure out why the connection keeps dropping on some devices, but not others, and then the next day, one of the devices that didn't disconnect the previous day will disconnect, but the ones that did disconnect, stay connected.  It's just sloppy, poorly written software for technology that isn't working the way it should.  If you turn off Continuity and Handoff on all your devices, you will probably see that everything stays connected.  With those turned off on all devices, TC stayed connected to everything for over a month.  The day I turned Continuity back on, all the problems started again.  It had something to do with the bluetooth version being used, the wifi routine, and Apple's AirPlay technology not quite getting along with each other.

  • After clicking on my FF shortcut icon on my desktop, it takes FF 30-45 seconds to open. Any ideas why this happens?

    after clicking on my FF shortcut icon on my desktop, it takes FF 30-45 seconds to open. So i sit there and wai and wait and wait until it finally opens. Any ideas why this happens?

    In order to diagnose your problem you will need to download and install the below
    Try clicking the tap problematic apps while the trace is running
    Install the WPT (windows Performance Toolkit) 
    http://www.microsoft.com/en-us/download/details.aspx?id=30652
    Help with installation (if needed) is here
    When you have, open an elevated command prompt and type the following 
    WPRUI.exe (which is the windows performance recorder) and check off the boxes for the following:
    First level triage, CPU usage, Disk IO.  
    If your problem is not CPU or HD then check off the relevant box/s as well (for example networking or registry)  Please configure yours as per the below snip
    Click Start
    Let it run for 60 secs or more and save the file (it will show you where it is being saved and what the file is called)
    Zip the file and upload to us on Onedrive (or any file sharing service) and give us a link to it in your next post.
    Wanikiya and Dyami--Team Zigzag

  • On two occassions, all contacts were wiped off the Ipad. Any ideas why this would happen?

    On two occassions, all Contacts were wiped off the Ipad 2. Any ideas why this would happen?

    Did it happen during a sync or did they just disappear?  After they were gone, we you able to retrieve them during syncing?  Are you using any 3rd party apps to access your contacts or just the built-in Contacts app?
    In any case, I've not heard of or expeienced this on my iPhone 3G (synced with Outlook and now Google) or my iPad, although I've only had my iPad for a short time.

Maybe you are looking for

  • Best Buy may no longer be my first choice

    My husband and I purchased a dishwasher about a week ago.  We were able to snag a deal on the delivery and installation for 19.99- or so I thought it was a deal.  I did receive a call, several actually, about the delivery time and date, which is for

  • Cfdocument: How to design a PDF excactly the way I want?

    Hello everybody I'm trying to produce PDF files with cfdocument for a Clinique here in Switzerland. I'm using the developer version of CF8. A big issue is that I am supposed to make the PDF look like it would have been printed on a prefabed letter, m

  • Simple stub not compiling?

    I can't see anything wrong with this but I am getting errors. import mpt.*; import java.io.IOException; public class Program2 extends Thread public Program2() public void run() public void test() throws IOException Navigator nav = new BlockNavigator(

  • Can't reinstall iMovie '11

    When I try to reinstall iMovie '11 using a custom install, iMovie (and Garage Band) is grayed out and iPhoto (and iLife Support) cannot be unclicked. Can anyone suggest what to do?

  • Call native function fflush & strprn from java

    Hi, I need to call a native function fflush and stdprn from java for printing a file. How can i call this function? Can any one help me with sample code. Thanks, rpalanivelu