How Do You Stop a Function (k)

I have this code placed in the second frame of my timeline.
It is there
to pause the playhead for 4 seconds before moving onto the
next frame.
Problem with the code is that once the statement is true it
keeps
jumping ahead doing a perpetual nextFrame.
I want to reset the variables and stop the function. I have
no idea what
I am doing.
startTime = getTimer();
trace("startTime "+startTime);
this.onEnterFrame = function() {
currentTime = getTimer();
//4000 below = 4 seconds
if (currentTime-startTime>4000) {
nextFrame();
trace("currentTime "+currentTime);

Figured it out:
stop();
startTime = getTimer();
this.onEnterFrame = function() {
currentTime = getTimer();
//4000 below = 4 seconds
if (currentTime-startTime>4000) {
nextFrame();
this.onEnterFrame = null;
W. Kirk Lutz wrote:
> I have this code placed in the second frame of my
timeline. It is there
> to pause the playhead for 4 seconds before moving onto
the next frame.
>
> Problem with the code is that once the statement is true
it keeps
> jumping ahead doing a perpetual nextFrame.
>
> I want to reset the variables and stop the function. I
have no idea what
> I am doing.
>
> //
> startTime = getTimer();
> trace("startTime "+startTime);
> this.onEnterFrame = function() {
> currentTime = getTimer();
> //4000 below = 4 seconds
> if (currentTime-startTime>4000) {
> nextFrame();
> trace("currentTime "+currentTime);
> }
> };

Similar Messages

  • What is ChangeWatcher? How do you stop Change Watcher from listening to a propertyChangeEvent?

    What is ChangeWatcher? How do you stop Change Watcher from listening to a propertyChangeEvent?

    ChangeWatcher is a class used to handle the change of a specific property. To stop watching that property, simply call unwatch function as follow:
    var cw:ChangeWatcher = ChangeWatcher.watch( this, "propertyName", changeHandler );
    cw.unwatch();

  • BeginAnimations: starts an animation but how do you stop it?

    Hi everyone:
    I've been using the following code snippet to start an animation:
    [UIView beginAnimations:animationID context:nil];
    [UIView setAnimationDuration:8];
    [UIView commitAnimations];
    but how do you stop it (prematurely)?

    Den B. wrote:
    Oh great! I actually learned about it from one of the Apple's own sample codes...
    The samples are only to get you started, explain the concepts, and show how to use the API. They aren't meant to be functional, production-quality applications.

  • How do you stop downloading itunes match songs to iphone 5

    How do you stop downloading itunes match songs to iphone 5?
    Cell data is turned off but it is still downloading.

    When you initially enable iTunes Match on any iDevice it is wise to let it operate for a good period docked or with good WiFi.
    Best route to stop it if essential is to switch off iTunes Match.

  • HT4753 How do you stop preview from auto save

    How do you stop preview from doing AutoSave?
    Preivew keeps saving different copies of a pdf I am working on (highlighting/annotating), and I now only have 1GB left on my harddrive (had 180GB left).

    If you are using Safari, look at Safari > Preferences > General and make sure 'Open "safe" files after downloading' is not checked.  Other browsers should have a similar setting in their preferences.

  • HT4915 How do you stop syncing address and calendar to iCloud? I only want to sync  from my computer to iPhone.

    How do you stop syncing address and calendar to iCloud? I only want to sync  from my computer to iPhone.  This is because I cannont upgrade to Lion and I do not want to get duplicate contacts when I sync from the computer 10.6.8 to my iPhone iOS5.  You should not upgrade to Lion upless you have 4GB of ram. Lion does not support rosita so all your old programs will not funtion and you have to repurchase all old software the is working fine.

    Welcome to the Apple Community.
    Settings > iCloud, turn off contact and calendar syncing.

  • TS1702 how do you stop itunes from downloading apps over and over again and again like for ever it wont stop  help.

    how do you stop itunes from downloading apps over and over again and again like for ever it wont stop  help.
    i tryed everything i  can in the setting and so on , i even clicked on the downloads arrow to pause it and delete them but like i said it will now stop.
    theres apps i just dont want. theres a list of them but theres not a place were i can get rid of them. it also says some stuff about icloud yeah right like i have ios 5 or 7 ha . pod touch 2 is what i have lol . plz help thanks.

    to the right by search library theres an arrow there click on it : it will show you what it is downloading , from there you can pause and select all and delete them but still will continue to download them if you tell itunes to check for downloads. that download engien is crazy i tell yeah.
    no matter what we do it will still download them trust me i tryed everything and i also went to icloud to see if it was there but to what i see is that there is no apps there this is some crazy itune program that needs to remade.

  • How do you stop music while video plays???

    Ok...so here's the deal. I'm making a movie that is a combination of pictures and videos. It's basically like a slideshow type thing, but now I'm adding video to it. I've already put all the pictures and transitions and music that goes along with that, but now I'm trying to add my videos in between some of the pictures. I'm trying to figure out if there is a way to stop (like completely stop/cut the music clip) while the video is playing, then resume the music at the end of the video at the point where it was stopped before. Does that make sense? I don't want to simply lower the volume of the music...I want to completely stop it so you can hear the audio of the new video. I have tried trimming the audio, but I haven't figured out how to get it to do what I want. So basically, how can you stop music while a video plays and then resume that same music at the end of the video from the point where it was cut?

    So i think you have clips with their own audio that you want the added music track silenced during those clips alone. Click on the clip in question, go to inspector, audio, "Ducking" and X that box "reduce volume of other tracks" and pull it to 0%. i think that will do it
    roger

  • How do you stop mobile sites from loading in safari automatically on my iPad? I can't log into mobile me because of this.

    How do you stop mobile sites from loading in safari automatically on my iPad? I can't log into mobile me because of this.

    The me.com website is not designed for or intended to be accessed by iOS devices. Apple provides support in iOS or seperate Apps for accessing all aspects of MobileMe except for the Accounts section.
    Use MobielMe as intended and you'll have no problems.
    See: http://support.apple.com/kb/ts1673
    Even if you use a different browser to get access to me.com on iOS, you'll find most of it is unusable.
    Other websites that present you with the mobile version have been programmed to do so by their developers. They specifically look for users accessing from 'mobile' devices and switch to the mobile site. Many such sites provide a link to go back to the 'full' site, if not, there's not a lot you can do except use a browser that can pretend not to be a mobile browser.

  • How do you stop the 11.0.44 version from freezing up all the time?

    How do you stop the Itune version 11.0.44 from freezing up all the time. I have two different lap tops with the same version and both do the same thing. The store gives me the most problem.

    Hello rkalanz1,
    The following article should be helpful in stabilizing iTunes on your laptops.
    iTunes for Windows Vista or Windows 7: Troubleshooting unexpected quits, freezes, or launch issues
    http://support.apple.com/kb/TS1717
    Cheers,
    Allen

  • HT3951 how do you stop a download of a movie if you dont have enough space and how do you get the money refunded to your account

    how do you stop a download of a movie if you dont have enough space and how do you get the money refunded to your account

    All sales are final the moment you click buy.
    Make space and download it

  • Itunes start up when comp is turned on.  How do you stop this?

    how do you stop itunes from opening on the start up?

    Check the list of login items for your user account in the Accounts pane of System Preferences.
    (58987)

  • How do you stop the welcome to firefox 4 screen from coming up every time I open firefox? I get two tabs, one the welcome window, then my home page. How do you stop the bloody welcome screen?

    How do you stop the welcome to firefox 4 screen from coming up every time I open firefox? I get two tabs, one the welcome window, then my home page. How do you stop the bloody welcome screen?

    Its not my home page, Like I said, I hae my home page also come up in a different tab (google) I also get the welcome to FF4 on a seperate tab. My home page is set to google. But I dont want the welcome screen to pop up

  • How do you stop my iphone keep asking for my works proxy server name and password

    how do you stop my iphone keep asking for my works proxy server name and password

    Having been in IT for close to 30 years what they actually thought was, "whether you can connect your phone to our network isn't out problem, please go away".
    They don't want to troubleshoot it. And, honestly, if it's your personal phone, they shouldn't have to. it's not their problem unless their boss says it is.

  • How can you stop Apple from forcing an update of PAGES?

    Every time I turn around I'm getting this notification on my screen to update PAGES to the downscaled version 5.  It annoyingly won't leave the screen even though anyone with good sense that has seen the reviews, knows you don't want version 5.   
    How do you stop the perpetual notifications that demand we permit Apple shove this version 5 down our throats?   
    I do not want version 5.
    I do not want to lose the vertical ruler
    I do not want to lose the inspector block
    I do not want to downscale my word-processing to fit on a phone (this is a business not a playground)
    I do not want to lose the variable line spacing capabilities of the better version 4
    and the list goes on....
    How do you stop the perpetual annoyance of it wanting updates?

    System Preferences > App Store > uncheck Automatically check for updates. You may have to reboot for these changes to take effect.
    If you update to IOS 7 on an iDevice, Pages for IOS will update to v2.2.1 — which is the OS X Pages v5 document architecture. Same drill for Pages for iCloud beta. Both of these would require sharing MS Word documents with your OS X Pages ’09 solution for document compatibility.

Maybe you are looking for

  • Can I place a 19" LCD monitor over my Time Capsule (G4)?

    Can I place a 19" LCD monitor over my Time Capsule (G4)?

  • Help on setting up ARD access?

    Hello, I'm new to this so in a nutshell my client has asked me to remotely control a branch office of hers with 3 macs behind a linksys router/firewall. The DSL they have provides static IP addresses but currently I just have the router using DHCP. S

  • Setting "Append file extension" in PSE9 Trial

    I downloaded the trial version, and when I open a RAW file and then go to save it, the .MRW (yes, I know that's old now!) stays in place and I have to type in the required extension,  even though I have set the option in the box below. Looking at the

  • Error in MIGO Movement type 101 E is not planned.(Entry is not copied over)

    Hie Experts, I had created a process order for XYZ material. Now i want to assign this goods receipt to sales order. For this i am trying to go MIGO with mvt type 101 & special stock indicator as 'E'(order stock). I am facing the error as "Movement t

  • ABAP Find Command

    When we upgraded our SAPGUI to 640 (from I believe 620), we noticed one new “feature”. In the ABAP editor in display mode, if you press the find button (or CTL F), you get a popup that asks for the string and has two radio buttons for the direction (