Getting script to stop after MC reaches x position

working on scrolling panel and trying to get the function to stop scrolling when the last frame in one direction is the last left to be displayed so it doesn't keep scrolling infinitely off the stage. here's what I have
rightscroll_mc.addEventListener(MouseEvent.ROLL_OVER, scrollRight);
rightscroll_mc.addEventListener(MouseEvent.ROLL_OUT, rremoveFast);
function scrollRight(e:MouseEvent):void {
     this.addEventListener(Event.ENTER_FRAME, goRight);
function rremoveFast(e:MouseEvent):void {
     this.removeEventListener(Event.ENTER_FRAME, goRight);
if(grds11_mc.x < 335.2) {
     function goRight(e:Event):void {
          for(var i:int = 1; i<12; i++){
               this["grds"+String(i)+"_mc"].x-=15;
} else {
     this.removeEventListener(Event.ENTER_FRAME, goRight);

Try rewriting that so the the function contains the actionscript rather than the reverse....
function goRight(e:Event):void {
     if(grds11_mc.x < 335.2) {
          for(var i:int = 1; i<12; i++){
               this["grds"+String(i)+"_mc"].x-=15;
     } else {
          this.removeEventListener(Event.ENTER_FRAME, goRight);

Similar Messages

  • Getting labview to stop after a certain time.

    I'm trying to get labview to stop running after a set time? I have a load cell attached to a NI ELVIS board and once the set load is read by labview it's outputting a voltage thourgh the board but continuesly till the load is removed. I would like to ouptut the voltage to stop after a certain amount of time with the load still on the load cell.

    bmira1 wrote:
    I would like to ouptut the voltage to stop after a certain amount of time with the load still on the load cell.
    Of course stopping LabVIEW (as described in the post title) and stopping an output voltage (as described in the post body) are two completely different things! Blindly stopping LabVIEW will not necessarily reset any active analog output to zero.
    Best would be a simple state machine that changes the output to zero after a certain elapsed time. This could for example be done with the timeout case of an event structure or even with the "elapsed time" express VI (or with the code fragments given above after you make sure there is a small wait in the polling loop)
    When the experiment starts, write a certain voltage to the output once (You don't need to do that over and over, only when the voltage changes) and, after the time has elapsed, write a zero voltage to the output.
    No need to stop LabVIEW. You should actually disable or catch "panel close?" events and other abnormal shutdown attempts, and reset the outputs in an orderly fashion before allowing the program to stop.
    LabVIEW Champion . Do more with less code and in less time .

  • HT204053 I was trying to sync my iPhone with my iPad & I caused a working message "Turning Off Safari Data...."  I can't get it to stop after a day

    I was trying to sync my iPhone & iPad, and caused a working message to appear "Turning Off Safari Data..."  It's been on for a day, and I can't make it stop.  Please help!

    You could use icloud to sync contacts and calendars.
    Both the ipad and iphone are intended to sync to a computer.
    You can redownload apps from the app store, assuming that they are iphone compatible.
    Downloading past purchases from the iTunes Store, App Store, and ...

  • "Stop running the script?" error after power-up and before starting Firefox

    I have a Windows 7 x64 Enterprise system with Firefox 10.0.02. I'm getting the error
    ''''''Stop running this script?'''
    '''A script on this page is causing your web browser to run slowly. If it continues to run, your computer may become unresponsive''''''
    after I power up my PC, but before I open Firefox.
    The error message, of course, does not identify what "this page" is, or tell anything about the script. The error message doesn't even say it's from Firefox (or Internet Explorer, for that matter).
    I've done a virus scan, a spyware scan, and an adware scan, but the error keeps popping up.
    Everything I've found on the web about this error assumes the problem is with Internet Explorer, but I don't use IE.
    Suggestions?
    Thanks.

    Start/All programs/Startup has only McAfee Security Scan Plus. After power-up, clicking on Show Hidden Icons lists Sound Effect, McAfee Total Protection, Spybot-SD Resident, Ad-Aware, and a flag labeled "Solve PC issues: 1 message".
    If I click the flag, it opens Windows Backup Troubleshooting Options. The message is "Check your backup settings. Windows cannot find the disk or network location where your backups are being saved". There are two options -- Change backup settings and Try to run backup again.
    This is because I do not usually have the external herd drive I use for backup attached. I ignore this message.
    Also, Sql Server 2008 R2 and Oracle 11gR2 start up, along with IIS. I use this PC for various courses.
    FWIW, I've attached screen grabs of the Services and Processes from Windows Task Manager.
    Thanks.

  • Render engine does not stop after reaching 100%

    It looks like to me that the render engine does not stop after reaching 100%. It does not affect the rendered file which is fine and complete
    -the Pause and Stop buttons are displayed but have no effect on pausing or stoping the render
    -when I want to quit SG, it locks up and have to Force Quit to get out of it.
    I really like the program though and hope you are going to fine tune the UI and make it look like After Effect and Premiere.
    I would encourage you to instaure round tripping between these two apps and SG.
    It would be nice to have curves as well.
    Thanks guys
    Brice

    Could you open the defaultTrace.X.trc files and check for the errors?
    Good from my point of view is to make a search if those files for some stack traces with the string ".dsr."
    Regards,
    Aleksandar

  • I dont have any Add-ons with my FireFox. After upgrade to the latest version 26.0 I'm keep getting Script error "chrome://global/content/binding/popup.xml:580"

    Quite frequently I'm keep getting the error like "Script is not responding....I dont have any Add-ons with my FireFox. After upgrade to the latest version 26.0 I'm keep getting Script error "chrome://global/content/binding/popup.xml:580" Stop or Continue Script.
    Currently I don't have any Add-Ons installed in my FireFox, so I can suspect any Add-ons.
    I'm facing this issue only after the upgrade to 26.0 recently.

    Ifound this article:
    https://support.mozilla.org/pt-BR/questions/746499
    in this article the problem is similar not the same, but sdmitch16 had a intersting idea disable the chrome options
    and i search more in the internet i also found this:
    https://support.mozilla.org/pt-BR/questions/760704

  • I am unable to set up my iphone 5 after reset since am getting a error stating 'unable to reach server' . i tried restoring the same from my computer  but  i get a error stating server unavailable' .  please help me as my phone is stuck at the set up page

    i am unable to set up my iphone 5 after reset since am getting a error stating 'unable to reach server' . i tried restoring the same from my computer  but  i get a error stating server unavailable' .  please help me as my phone is stuck at the set up page. so i have already tried recovery mode as well.

    Contact Apple support for warranty service.

  • Adobe Reader 10.1/ 11 get error "has stopped working" on windows 7 after installed 1 or 2 days, but Adobe Reader is fine==

    Adobe Reader 10.1/ 11 get error "has stopped working" on windows 7 after installed 1 or 2 days, but Adobe Reader is fine==

    Turning off the Protected Mode at Startup setting fixed the problem for me. Switched off all protected mode settings in Preferences exited Adobe Reader XI then restarted. Now I can successfully open files without the program crashing. I run the same versions of Adobe Reader and Norton Internet Security on Windows 7 and Windows 8 systems and the problem only occurred on Windows 7.

  • Getting itunes has stopped working message after downloading to Windows 8.1

    Getting ITunes has stopped working message after 10 seconds after downloading to Windows 8.1

    For general advice see Troubleshooting issues with iTunes for Windows updates.
    The steps in the second box are a guide to removing everything related to iTunes and then rebuilding it which is often a good starting point unless the symptoms indicate a more specific approach. Review the other boxes and the list of support documents further down the page in case one of them applies.
    Your library should be unaffected by these steps but there is backup and recovery advice elsewhere in the user tip.
    You could also try working through
    TS1717: iTunes for Windows Vista, Windows 7, or Windows 8: Fix unexpected quits or launch issues
    tt2

  • I am trying to create a PDF document that calculates Gains and Losses in Mutual Funds. The calculation scripts are repetitive from line to line. The scripts work well until I reach the line 32. Script stops calculating...

    I am trying to create a PDF document that calculates Gains and Losses in Mutual Funds. The calculation scripts are repetitive from line to line. The scripts work well until I reach the line 32. Although I am using the same script as the fields above in the columm, the script eventually stops calculating and I can't figure out why. Is there a limit of how many calculation scripts you can enter? I will attempt to attach my pdf as soon as I figure out how. Thanks.

    For e31 :
    var e30 = +getField("e30").value ;
    var c31 = +getField("c31").value ;
    if ( (e30 !== 0) && (c31 !== 0) ) event.value = e30 + c31 ;
    else event.value = "";
    for e32 :
    var e31 = +getField("e31").value ;
    var c32 = +getField("c32").value ;
    if ( (e31 !== 0) && (c32 !== 0) ) event.value = e31 + c32 ;
    else event.value = "";
    for e33 :
    var e32 = +getField("e32").value ;
    var c33 = +getField("c33").value ;
    if ( (e32 !== 0) && (c33 !== 0) ) event.value = e32 + c33 ;
    else event.value = "";
    Java console doesn't show any error... That's why I am wondering if it's not a limitation issue... or memory issue, because they are maybe too many rows or something....
    The c value is not calculated.

  • HELP!!!  Message - (One or more applications are using the iTunes scripting interface. Are you sure you want to quit?)  How do I get this to stop?

    I bought a new Sony Vaio Laptop running Windows 8, 64bit, i7 processor.  Everytime I open iTunes and then close out, the following message occurs: (i-tunes message - One or more applications are using the iTunes scripting interface. Are you sure you want to quit?) Then it starts counting down from 20 seconds unless I just click on the (Quit) button.  How do I get this to stop?  Please be specific, I am challenged when it comes down to computers.
    Thank You

    This was extremely annoying for me, also.  I started uninstalling unneeded Sony applications to try to narrow down the problem.  It turned out not to be a Sony application... it is some functionality built into the bluetooth driver software package by Broadcom.  Uninstalling the bluetooth package (via the control panel) takes care of the problem.  Itunes also boots up way quicker.  But uninstalling it will remove features related to bluetooth and nfc.   For me, that isn't an issue, since I don't use them.  Since you said you're "computer challenged" I would probably just send an email to sony complaining about the problem.  They'll get in touch with Broadcom eventually (the manufacture of the drivers) and get the problem fixed.
    Side note: the Broadcom package is huge...  nearly 1GB in size.  Which is crazy.  I can't imagine what it does considering the size of it.  Entire operating systems can take up less storage.  Also, I have no idea how it starts an itunes plugin without placing it into the standard plugin directories.

  • HT204306 After I updated my iPad Friday 4/24/2015 my iPad is always asking for my Apple password.  This is a pain in the neck.  How do I get it to stop doing this?

    I am frequently being asked by my iPad for my Apple ID.  This has only happened since the last update which I installed 4/24/2015.  I checked the settings but can find no way to disable this new feature.  It is very annoying.  How do I get it to stop asking for my ID?

    Hello, Elanhui.  
    Thank you for visiting Apple Support Communities.  
    I understand that you constantly receive a prompt to enter your Apple ID password after an update.  After an update, you may be required to confirm the password for multiple services.  I am unsure what service is requesting your password as this sounds like one is missing.  However, the prompt should inform you what service needs this information.  I would recommend entering your Apple ID password for all services that are labeled iPhone, iPad, and iPod touch in the article below.  
    What to do after you change your Apple ID email address or password
    Cheers, 
    Jason H.  

  • I have a macbook with Iphoto 8.1.2. How do I get it to stop importing duplicates even after I checkbox tell it not to.

    I have a macbook with Iphoto 8.1.2. How do I get it to stop importing duplicates even after I checkbox tell it not to.

    How do I get it to stop importing duplicates even after I checkbox tell it not to.
    That checkmark will only prevent iPhoto from importing exact duplicates - the exact filename, image format, exactly the same size,
    What kind of duplicates are you asking about? Have the files been renamed or converted in any way?

  • In ADDin JAVA upgrade , SAPJup is getting stopped after CHANGE_UME phase

    Hi ,
    We are upgrading our ECC 5.0 (ABAP + JAVA) to ERP2005 EHP4 SP level 5.
    In the Downtime phase of the upgrade, SAP Jup is automatically getting stopped after CHANGE_UME phase. I am not able to find out the error. Why it is getting stopped even i started it many times, it goes to the CHANGE_UME phase then automatically stopped.
    There is no error in CHANGE_UME_***_09.LOG file.
    <!LOGHEADER[START]/>
    <!HELP[Manual modification of the header may cause parsing problem!]/>
    <!LOGGINGVERSION[1.5.3.7185 - 630]/>
    <!NAME[J:\DV2ERPUpgrade\jupgrade\log\CHANGE_UME_***_01.LOG]/>
    <!PATTERN[CHANGE_UME_***_01.LOG]/>
    <!FORMATTER[com.sap.tc.logging.ListFormatter]/>
    <!ENCODING[UTF8]/>
    <!LOGHEADER[END]/>
    #1.5 #C000AC101E650000000003F25B6DF84B00048B183E648670#1278836149094#/System/Server/Upgrade/Phases/UPGRADE/UPGRADE/CHANGE_UME##com.sap.sdt.ucp.phases.AbstractPhaseType.initialize(AbstractPhaseType.java:758)#######Thread[main,5,main]##0#0#Info#1#com.sap.sdt.ucp.phases.AbstractPhaseType.initialize(AbstractPhaseType.java:758)#Java###Phase has been started.#1#UPGRADE/UPGRADE/CHANGE_UME#
    #1.5 #C000AC101E650000000003F35B6DF84B00048B183E648670#1278836149094#/System/Server/Upgrade/Phases/UPGRADE/UPGRADE/CHANGE_UME##com.sap.sdt.ucp.phases.AbstractPhaseType.initialize(AbstractPhaseType.java:759)#######Thread[main,5,main]##0#0#Info#1#com.sap.sdt.ucp.phases.AbstractPhaseType.initialize(AbstractPhaseType.java:759)#Java###Phase type is .#1#com.sap.sdt.j2ee.phases.PhaseTypeUMEHandling#
    #1.5 #C000AC101E650000000003F45B6DF84B00048B183E648670#1278836149094#/System/Server/Upgrade/Phases/UPGRADE/UPGRADE/CHANGE_UME##com.sap.sdt.ucp.phases.AbstractPhaseType.logParameters(AbstractPhaseType.java:412)#######Thread[main,5,main]##0#0#Info#1#com.sap.sdt.ucp.phases.AbstractPhaseType.logParameters(AbstractPhaseType.java:412)#Java###  Parameter =#2#connect#standard#
    #1.5 #C000AC101E650000000003F55B6DF84B00048B183E648670#1278836149094#/System/Server/Upgrade/Phases/UPGRADE/UPGRADE/CHANGE_UME##com.sap.sdt.ucp.phases.AbstractPhaseType.logParameters(AbstractPhaseType.java:412)#######Thread[main,5,main]##0#0#Info#1#com.sap.sdt.ucp.phases.AbstractPhaseType.logParameters(AbstractPhaseType.java:412)#Java###  Parameter =#2#inputFile#UMEHandling.xml#
    #1.5 #C000AC101E650000000003F65B6DF84B00048B183E648670#1278836149094#/System/Server/Upgrade/Phases/UPGRADE/UPGRADE/CHANGE_UME##com.sap.sdt.ucp.phases.AbstractPhaseType.logParameters(AbstractPhaseType.java:412)#######Thread[main,5,main]##0#0#Info#1#com.sap.sdt.ucp.phases.AbstractPhaseType.logParameters(AbstractPhaseType.java:412)#Java###  Parameter =#2#action#change#
    #1.5 #C000AC101E650000000003F75B6DF84B00048B183E64FF88#1278836149125#/System/Server/Upgrade/Phases/UPGRADE/UPGRADE/CHANGE_UME##com.sap.sdt.j2ee.phases.PhaseTypeUMEHandling.checkParameters(PhaseTypeUMEHandling.java:233)#######Thread[main,5,main]##0#0#Info#1#com.sap.sdt.j2ee.phases.PhaseTypeUMEHandling.checkParameters(PhaseTypeUMEHandling.java:233)#Java###Checking phase parameters .#1#action, connect, inputFile#
    #1.5 #C000AC101E650000000003F85B6DF84B00048B183E64FF88#1278836149125#/System/Server/Upgrade/Phases/UPGRADE/UPGRADE/CHANGE_UME##com.sap.sdt.j2ee.phases.PhaseTypeUMEHandling.checkParameters(PhaseTypeUMEHandling.java:249)#######Thread[main,5,main]##0#0#Info#1#com.sap.sdt.j2ee.phases.PhaseTypeUMEHandling.checkParameters(PhaseTypeUMEHandling.java:249)#Java###Phase parameters have been checked. All required phase parameters have been set.#1#3#
    #1.5 #C000AC101E650000000003F95B6DF84B00048B183E6578A0#1278836149156#/System/Server/Upgrade/Phases/UPGRADE/UPGRADE/CHANGE_UME##com.sap.sdt.j2ee.phases.PhaseTypeUMEHandling.execute(PhaseTypeUMEHandling.java:169)#######Thread[main,5,main]##0#0#Info#1#com.sap.sdt.j2ee.phases.PhaseTypeUMEHandling.execute(PhaseTypeUMEHandling.java:169)#Java###Backing up UME settings from configuration manager.##
    #1.5 #C000AC101E650000000003FA5B6DF84B00048B183E6578A0#1278836149156#/System/Server/Upgrade/Phases/UPGRADE/UPGRADE/CHANGE_UME##com.sap.sdt.j630.configutils.ConfigUtils630#######Thread[main,5,main]##0#0#Info#1#com.sap.sdt.j630.configutils.ConfigUtils630#Java###Reading properties of service on node .#2#com.sap.security.core.ume.service#server#
    #1.5 #C000AC101E650000000003FB5B6DF84B00048B183E66E7D0#1278836149250#/System/Server/Upgrade/Phases/UPGRADE/UPGRADE/CHANGE_UME##com.sap.sdt.j630.configutils.ConfigUtils630#######Thread[main,5,main]##0#0#Info#1#com.sap.sdt.j630.configutils.ConfigUtils630#Java###Batch config tool has been initialized.##
    #1.5 #C000AC101E650000000004025B6DF84B00048B183EA4A868#1278836153297#/System/Server/Upgrade/Phases/UPGRADE/UPGRADE/CHANGE_UME##com.sap.sdt.j630.configutils.ConfigUtils630#######Thread[main,5,main]##0#0#Info#1#com.sap.sdt.j630.configutils.ConfigUtils630#Java###Reading properties of service on node .#2#com.sap.security.core.ume.service#ID8895050#
    #1.5 #C000AC101E650000000004035B6DF84B00048B183EA4A868#1278836153297#/System/Server/Upgrade/Phases/UPGRADE/UPGRADE/CHANGE_UME##com.sap.sdt.j630.configutils.ConfigUtils630#######Thread[main,5,main]##0#0#Info#1#com.sap.sdt.j630.configutils.ConfigUtils630#Java###Batch config tool has been initialized.##
    My ABAP upgrade is ruuning fine in the downtime phase.
    Please suggest me ASAP.
    Thanks,
    Chetan

    Hello - we are facing the exact same problem while uprading a dual stack system.  How did you fix the problem?  We also opened up a ticket to SAP and we are waiting to hear back from them.  Any information you can share will be greatly appreciated.  
    Thank you.
    Nameeta

  • After ejecting SD card by pulling it to trash in iphoto, the wheel is spinning.  How do I get it to stop?  What happens if I force quit it?

    After ejecting SD card by pulling it to trash in iphoto, the wheel is spinning.  How do I get it to stop?  What happens if I force quit?

    After ejecting SD card by pulling it to trash in iphoto, the wheel is spinning.  How do I get it to stop?  What happens if I force quit?

Maybe you are looking for

  • My Product descriptio​n doesn't match (searching by Product number on Lenovo site)

    Hi, I bought Thinkpad X200s on eBay - new, not used. I received it sealed with tape, not opened, hw configuration was exactly as was described/ordered. The numbers on the box are the same as on the notebook. But when I go on Lenovo site, and check it

  • Batch remove word doc pages from library

    Hi, I see there are ways to batch remove or add information to word docs and i have successfully removed the cover page from word docs and put into one document.  Is there any way to remove cover and end pages from word docs in a batch?  I need to re

  • Unable to Rotate Some Pictures After Importing from iphone4S

    When I upload my pictures to my computer (Windows), half of the pictures will not allow editing/rotating.  A message pops up that says "This picture can't be saved because of a problem with the picture file's properties.  I've checked the properties

  • Noise when uploaded to Vimeo

    Hi, I'm having a problem and I cannot find any solution, so I would be very grateful to any possible solution or any advice. - I have composed some music for a work of video art and I have given the music to the videoartist. - She adds the music to h

  • Copying control for Adress Tab Page

    Hello All , We trying to implement CRM_copy_badi for copying fields. We succeeded to copy customer_h fields. Now we are trying to copy fields from Adress tab page of activity .We use Method Activity_h.In structure CS_activity_h we tried to use : name