Delaying statements

I've read some of the topics on delaying statements in this
forum, but am still confused. I want to use an alpha tween on a
movieclip and once the tween finished, I want the movieclip to wait
5 seconds before it reverses tween. My code is as follows:
Thank you in advance!

Shandy, I appreciate the time and effort you put into
responding to my posting. Thank you. I'm a newbee to AS, so I don't
quite understand all the lines in the code you provided me. I kept
researching this issue after submitting my posting and was able to
use the code below that seems to do the same thing.
I've now ran into another issue :). Now that I have mc_1
fading in/out, I want it to fade in, wait for 5 seconds, fade out,
and wait for 20 seconds before looping. Currently, the amount of
time that it waits between fading in and fading out is the same. In
other words, I want mc_1 to be fully visible for 5 seconds and once
it fades out, fully invisible for 20 seconds, and then loop again.
I hope this makes sense.
Thanks again Shandy.

Similar Messages

  • Browsing---long delays states it is 'loading' second third attempt works fine.

    When I enter a search topic---there is a long delay--tool bar states 'searching'. If I then re-enter after going out of the screen and then in again---the same thing happens. If I repeat the above---after two or three times search commences like normal.
    I find this very frustrating. If I go to another search engine this does not happen.

    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]
    A possible cause is security software (firewall) that blocks or restricts Firefox without informing you about that, possibly after detecting changes (update) to the Firefox program.<br />
    Remove all rules for Firefox from the permissions list in the firewall and let your firewall ask again for permission to get full unrestricted access to internet for Firefox and the plugin-container process.<br />
    See [[Server not found]] and [[Firewalls]] and http://kb.mozillazine.org/Firewalls<br />
    Other things that need attention, see http://www.mozilla.com/plugincheck/
    Your above posted system details show outdated plugin(s) with known security and stability risks that you should update.
    # Shockwave Flash 10.0 r32
    # Next Generation Java Plug-in 1.6.0_18 for Mozilla browsers
    Update the [[Managing the Flash plugin|Flash]] plugin to the latest version.
    *http://www.adobe.com/software/flash/about/
    Update the [[Java]] plugin to the latest version.
    *http://java.sun.com/javase/downloads/index.jsp (Java Platform: Download JRE)
    Update the [[Shockwave|Shockwave for Director]] plugin to the latest version.<br>
    *http://www.adobe.com/shockwave/welcome/

  • Idle socket causing delayed data transfer

    I have a telnet type client written that has a thread to continually read data from the socket with the server. The problem is, that when the connection is idle for a significant amount of time (no data transfered), the connection enters "delay state" (that's what I'll call it). In this state, if data were to begin transferring again, nothing is read from the InputStream until a while later (minutes).
    From my observations, I believe the delay time reduces if more data is queued up.
    Here is my thread code:
              public void run() {     
                   inputField.requestFocusInWindow();
                   if(!init()) return;
                   byte[] buff=new byte[buf_size];
                   int nch;
                   thread:while(this==Thread.currentThread()) {
                        try {
                             if ((nch = in.read(buff, 0, buff.length)) == -1) {
                                  addMessage("Natural disconnection from host.");
                                  disconnect();
                                  break thread;
                             outputArea.append(buff,nch);
                        } catch(Exception e) {
                             if(e instanceof IOException)
                                  addMessage("Forcibly disconnected from host.");
                             else if(e instanceof DataFormatException)
                                  addMessage("Fatal error - data corrupted. Disconnecting.");
                             else  //else I don't know what happened, so print the raw data
                                  addMessage(e.toString());
                             disconnect();
                             break thread;
              }You'll notice a lot of references to my own methods. I think their naming is fairly self explanatory, but if you need clarification, feel free to ask.
    Message was edited by:
    natmaster

    With ejp's pedigree on this forum, i think he understands threads!
    <p>I think you've misinterpreted that tutorial. In the tutorial i found this code:
    <p>
    public void run() {<br>
    ��Thread myThread = Thread.currentThread();<br>
    ��while (clockThread == myThread) {<br>
    ����repaint();<br>
    ����try {<br>
    ������Thread.sleep(1000);<br>
    ����} catch (InterruptedException e) {<br>
    ������//The VM doesn't want us to sleep anymore,<br>
    ������//so get back to work.<br>
    ����}<br>
    ��}<br>
    <p>which i presume you're referring to, but that only works because the code is run from an applet with a stop method that sets clockThread to null. It's nothing to do with fairness of executing threads.
    <p>Think about which thread is executing the statement "this == Thread.currentThread". Unless you're calling this run method from yet another unspecified thread, it's going to be "this", and if "this" is having a chance to execute any statements at all, then it's also going to be the current thread, so that statement will always be true.
    <p>If you want to be sure to be nice to other threads, you could call Thread.yield(). I never had much joy with using this method though, and the current JVMs seem to be pretty good at being fair to all threads even if none of them sleep or yield at all
    <p>
    [Sorry about formatting, damned forum seems to be shagged to tried to do it manually with html tags]

  • Delay in background jobs..Need some info

    Hi experts,
    We have a background job scheduled for every 2 hours in our system.But this job is going to delay state intermittently and not getting triggered at the right time.Could anyone tell the reason for the same and let me know the transactions I have to look in .
    Regards,
    Srikanth.

    >
    Thomas Zloch wrote:
    > Oh I thought you were picking on me, so I picked back. Never mind if I got that one wrong
    > Thomas
    No pickiness intended. I simply meant that there may be some authorization issues with changing the priority of a job. But basis should be able to do it.
    Rob

  • Timing for Data Acquisition Using Notifiers

    I'm trying to use notifiers to transfer data from an acquisition (master) loop to the slave loop. I want data to be transferred for analysis only when the VI is in a certain state - not in all states. That's why I'm preferring to use notifiers instead of queues (I want all data collected during the other states to be disregarded). I have attached a simplified version of what I'm trying.
    The master loop generates a data point every second. The slave loop is in a "delay" state for 5 seconds and then in "acquire" state for 3 seconds. Given this architecture I would expect no data for 5 seconds and then 3 data points to be plotted during "acquire" state because only one data point is generated per second. But for some reason I get 5 or 6 data points during every acquire cycle. I haven't figured out why I get 5-6 data points instead of 3. It probably has to do with the timing functions I'm using.  
    Thanks!
    -Arnie 
    Attachments:
    Notifier Data Transfer Template.vi ‏62 KB

    Here is an example of a race condition without the use of local or global variables.  What is happening is that the notifier is already queued up with a value even before the Elapsed Timer has even started.  So one extra value will be in the output array.  Also, depending on how the parallel loops perform (which goes first), there may be an extra value queued up before the Time Elapsed event could fire.  Typically, when I ran it, I got an array size of 6 at first, and then it went down to 5.  Clearly the architecture is not right for what you want to do.  Instead of depending on timers and parallel loop timing, you could receive all the values queued and just discard the ones you don't want.
    - tbob
    Inventor of the WORM Global

  • Running OpenScript tests in OTM does not work

    Hi,
    I added an OpenScript functional script (for Siebel) in OTM, and when I click on "Run this test", and I see no action. In the Run History, OTM shows in the "Results" column that the test is "Running", although more than hour has passed since starting the test run.
    Are there any settings/configurations I should do to get this to work?
    Another questions, could I use OTM to run a group of OpenScript functional scripts as batch testing? If not, how could I run batch OpenScript testing?
    Thanks,
    Shadi

    Hi again,
    I have solved the issue of openscript tests running with OTM. I opened the System manager from OTM (Tools-> Systems) and enterd my Windows account password and clicked "Test", then went back and ran my openscript test and it satarted to work. I wonder why this was not mentioned in any of the documentation files.
    I also face the common issue that OTM ignores the think() statement, and don't know how efficient using the delay() statement is and if it actually works.
    ISSUE1 Is there a way to force OTM to perform the think() statement? It would be great if we have it as an option.
    Regarding batch testing, I created a Schedule Task in OTM, and selected some tests to run as a batch, and it worked. The issue I have here is when I want to clone the Task I ran previously by clicking on the "Clone", it does not include the list of tests I selected in the cloned Task.
    ISSUE2 For example, if I have ceated a Task and added 10 tests to it, and later after it was run I want to clone it in order to run it again, the 10 tests are not inculded and I will have to select them manually.
    ISSUE3 Is this the only way to run batch testing for openscript (using Task)?
    I will try to find a work around for this issue, but hope you guys could help.
    Thanks,
    Shadi

  • Setting Enterprise Call Info Step Within An HTTP Triggered CRS Script

    IPCC Enterprise 7.5(6)
    CAD 7.5(6)
    IPIVR 7.0(1)sr05_build504
    We had a vendor develop some IVR & ICM scripts a few years back to take a website triggered request and pass along it’s value from the header, store it into Call Peripheral Variable 1 and place a call to a queue with agents (using CAD).  It then sets off a work flow group macro to populate this value (from PV1) into another application along with a repeating message to the agent that says they have a new request.  Since we recently upgraded our IVR to 7.0(1)sr05, I had to change the scripting some to make it work.  They were using a freaky way of getting the value into PV1 using a pre-connect application triggered from the initial application.  Anyway, their method would not work with the new version any longer so I needed to alter the scripts some.
    The problem I’m having is that PV1 is being set after the Place Call step.  This actually needs to be set before it reaches an agent in order to pass the value into CAD.  Currently, I’ve been using some delay statements in the ICM script to give it time to get the value into PV1 but it’s not 100%.  I get sporadic results.
    Current script in test.
    I’m looking to see if anyone can tell me a way to setup the Set Enterprise Call Info step before the Place Call step?  Since this is HTTP triggered, I can’t use (Triggering Contact) and I haven’t been able to set a pseudo contact because debug tells me that the contact is null or because it’s not a call contact.

    Hi Gabriel.  Thanks for the reply.
    The current method that's in place seems to work fine for me in test but when in production, I'm getting about a 60-70% success rate.  As it comes into my ICM queuing script, I'm using another Run Ext Script node to execute a delay to give the Set Enterprise Call Info step from the first VRU script extra time to set it's value before reaching the ICM Queue To Skill Group node.  I definitely notice better results when I did this but still not a 100%.
    The reason I'm doing this is because of the notation that the help file discusses about the Set Enterprise Call Info step:
    "Note    In a Cisco Unified CCX system:
    Beginning with CRS 4.0, this step should be placed script before the call gets connected to an agent. This means the step in the script should be placed before the Select Resource Step or in the Selected/Queued branch of the Select Resource step.
    If call data is set after the call gets connected to the agent, it will not be displayed in Cisco Agent Desktop (CAD)."
    So this is why I've been looking to see if this step can somehow be set before the Place Call step.  I'm not that familiar with altering Sessions or Contacts but was hoping someone might know how to manipulate these in order to let me do this.
    Thanks again.

  • Launch Finder Without Opening a New Window

    Hello,
    I'm making an application that resizes the icons on the desktop, and I would like to know if it's possible to launch the the Finder without it automatically opening a new Finder window.
    My, Applescripts look something like this right now..
    on «event coVScliI» theObject
    (do shell script "defaults write com.apple.finder DesktopViewOptions -dict IconSize -integer 70")
    (do shell script "killall Finder")
    tell application "Finder"
    activate
    end tell
    end «event coVScliI»
    The reason for my killing the Finder in the first place is because it needs to be restarted for the changes to take affect.

    Hi,
    If you don't mind using [GUI Scripting|http://www.macosxautomation.com/applescript/uiscripting/index.html], then the following script should relaunch the Finder without opening any new window (at least it does on Mac OS X 10.6.2) :
    tell application "Finder" to activate
    tell application "System Events"
    key code 53 using {option down, command down} -- ⌥⌘⎋
    click (row 1 of table 1 of scroll area 1 of window 1 of process "loginwindow" whose value of text field 1 is "Finder")
    keystroke return
    keystroke return
    keystroke "w" using command down -- ⌘W
    end tell
    (If the script doesn't work properly on your computer, first try adding a “delay” statement before the problematic line of code, for example “delay 0.2”.)

  • Applescript and iPhoto

    I have an Applescript that will take the photos I've scanned in and imported to iPhoto and extract the date and time for the photo from the JPG filename, and put that info in the iPhoto date and time field. I have just learned that the "Batch Change" feature will change the EXIF date for a photo to match the iPhoto date.
    Does anyone know of an Applescript solution that will do this (take the iPhoto date and use Batch Change to set the EXIF date)?

    Hi Steven,
    I don't know why the script doesn't work properly on your computer. Of course, GUI scripting is far from being foolproof. Maybe some of your preferences are not the same as mine. Maybe a few “delay” statements would be required at some places. Maybe a few other adjustments would be needed. I really don't know.
    To test the script, you could first use the “Adjust Date and Time…” item of the “Photos” menu to manually change the date of a few photos of your photo album. Then select these photos and launch the script. The EXIF date of the original photo should be changed accordingly, exactly as you are asking for, and also as can be verified for example by opening the original photo in Preview.app.
    It is very important to understand that the script calls the “changeDate” handler twice for each selected photo, the first time just in order to activate the "Adjust" button (by temporarily replacing the date assigned to the photo in iPhoto by the current date), the second time to replace the EXIF date of the original photo by the date assigned to the photo in iPhoto.
    Sorry not being able to solve the issue.
    Message was edited by: Pierre L.

  • Network Start Up Drives

    I have some networked drives being started at logon, all that is working great, but is there a way so they don't open in their own Finder folder? I have to manually close each folder when I reboot and it's kind of a pain.
    Thanks.

    Open the Script Editor in the /Applications/AppleScript/ folder and enter the following:
    tell application "Finder"
    close every window
    end tell
    Save it as an application and add it to the bottom of the Login Items list. The computer will then automatically close all the windows at startup. If you know the names of the windows, the script can be written to close only those windows. You can use a delay statement if the script is running too soon, such as 'delay 3' without the quote marks.
    (11908)

  • Need help with paratrooper game

    Dear experts,
    I have developed a game. Vision is given below.
    Helicopters constantly move from left-right as well as right-left.
    They drop parashooters.I have a fixed gun at centre.
    Turret of gun moves from 0 to 180 degree.Upkey fires and kills parashooters as well as helicopters.
    After some random time Jets come and they do proper bombing.I can also cut their bombs and kill jets.
    All actions cause fire (another animations)
    What i have tried to done is traditional old paratrooper game.
    I achieved though , but i face some probs.On my machine it works well .If i remove delay statement,things are very fast.
    If i use delay behaviour is different on different machines.On old PCs (P III or less RAM) machine it is very slow .On 2GB RAM ang
    good processing power ,it is really too fast.
    I want to keep a balance in speed in all machines.I thing javax.swing.Timer would be helpful but there are 15 actions which i do and where will i keep on
    putting actionperformed() bodies.I tried that and it go in vain.
    How to bring a consistent delay.I will post the code very soon.

    Ask specific questions. Post code, but make sure it's in the form of an SSCCE. The shorter it is, the better. Don't post your entire game.
    It sounds like you want to user a single Swing Timer to get a reliable frame rate. What are these 15 actions you mention?
    My guess is that you want to have a single Swing Timer call the methods of everything else instead of having 15 different things trying to sync up from separate timers.

  • Mail Apple Script

    I need to Apple Script so mail closes at login and doesn't stay open. I lost it somehow. Anyone have it?

    To hide Mail when it is open:
    tell application "System Events"
    set visible of process "Mail" to false
    end tell
    To quit Mail:
    tell application "Mail"
    quit
    end tell
    A delay statement, such as 'delay 2', can be placed at the beginning of each script if the event is being triggered too fast. In any case, put the script text into the Script Editor in the /Applications/AppleScript/ folder, save it as an application, and add the script to the list of login items for your account in the Accounts pane of System Preferences.
    (20280)

  • Wifi sync stops before it's finished

    Trying to sync a large library over wifi on a new iPad, but it never completes the sync. A few hundred songs will sync ok, and the next time I look at the iPad I notice that it has stopped syncing. PC is set to stay awake indefinitely. Any ideas what may be causing it to time out?

    "Shaoul Dotan" writes:
    > It's possible to stop for loop in the middle of an operation.
    >
    > T.U.
    Shaoul,
    as others explained why it's a bad thing, here is a very ugly trick to
    acomplish something of it. It's so ugly I won't use it in my programs.
    I'll assume you do something with an array in your for loop. To "stop"
    the loop you can use a case structure with 2 cases: one empty and the
    other with a huge delay (e. g. 40 days). To get the data out of the
    for loop you have to use a local variable for the whole array so you
    need to work with shift registers and "append to array".
    The way to reintroduce data dependency outside the for loop is by
    polling the array size of the local variable. If it didn't grow for
    e. g. 100 ms the for loop is "
    finished" and in the delay state.
    The downside of this trick is that the vi doesn't finish and you have
    to abort it.
    Does someone in this group know about the obfuscated C contest, where
    you try to write C code that noone can understand? What about doing
    something like that in G? We have some guidelines how to wire; the
    contest could reveal ways how _not_ to it.
    Johannes Niess

  • NetQtime vs Delaytime (IPCC 7.0)

    Hi All,
    After i have researched both fields in ipcc report database( using document Schemadoc_722),  i've found the following defintions:
    DelayTime: The time in seconds that the call is active on the switch but not queued to a skill group or trunk resource.
    NetQTime: the time in seconds the call spends in the router queue. Or in other terms it measures the time the call spends queued in the network VRU.
    i can deduce from the above definitions that the delay time and netqtime overlap, however when calculating the call duration in Table TCD, both values are added
    can someone please explain the confusion?
    Thanks,

    Hi there Fabien,
    I've spent many hour trying to figure out some of the metrics like this as well. What I found to be a good resource besides the Schema Doc is the Schema Help in "ICM Admin WorkStation" Program group on the AW.
    Here is the definition it gives about Delay time.
    The time in seconds that the call is active on the switch but not queued to a skill group or trunk resource. For example, if a call arrives at an ACD and an announcement is played before the call is queued, from the time the call arrives at the ACD to the time the call gets queued is the DelayTime. DelayTime includes all time the call spent on announcements. For ACDs that can de-queue calls, a call can go back into the delay state and DelayTime can begin accumulating again.
    DelayTime is used to calculate Duration in the Termination_Call_Detail record. It is also used to calculate the following fields in the Service and Route half-hour tables:
    - DelayQAbandTimeToHalf
    - LongestCallAbandTimeToHalf
    - AnswerWaitTimeToHalf
    The definition for NetQTime is a little more vague
    Represents the time the call spent on Network Queue in the CallRouter. The LocalQTime field is used for local ACD queuing.
    I've tried testing calls to try and get a call to receive a delay, but I haven't been successful. I know when we had issues with high CPU utilization on our CRS calls would take a few seconds to be answered by our IVR, which would create a small delay time.
    Unfortunately I don't have a definite answer for you but hopefully the information I found and my experience will help you out a bit

  • Cash Flow Statement - Average Delay Field Effects

    Hi Everyone,
    Can somebody please explain exactly how the average delay on the business partner record affects the cash flow statement?
    I ran a cash flow statement for 7/01/2008 thru 7/31/2008.  I then found an invoice that was to be paid the week of 7/28/2008 (it hasn't been paid yet), and opened up the corresponding business partner record and changed the average delay from 0 to 10.  I then re-ran the aging and nothing has changed.  The invoice still appears in teh 7/28/2008 week to be paid.  Am I missing a step or something?  If I understand correctly, the invoice should have moved into the next week on the cash flow statement as this is when the customer will be paying it according to past payment schedules.
    Thank you for your help.
    Amanda

    Hi Amanda
    I just tested on 2007A PL37 and it worked fine. Moved to week based on due date + average delay. Are you sure you ticked the "Consider Delays in Payment" box? Also check again if the master record was updated with the average delay value you gave it. Let me know what version of SAP Business One you are running.
    Kind regards
    Peter Juby

Maybe you are looking for