Stoping a timeline for set durations at various frames (AS3) ?

Hi Guys,
I'm wondering how to stop the root timeline at a given frame using action script 3 in flash CS4
With AS2 I used this kind of script that worked all the time.
this.createEmptyMovieClip ("timer",50);
timer.onEnterFrame = function () {
    if (this.startTime > 0) {
        var difference = getTimer () - this.startTime;
        if (difference > this.timerLength) {
            this.target.play ();
            this.startTime = 0;
function pauseFor (theTime) {
    stop ();
    timer.timerLength = theTime;
    timer.startTime = getTimer ();
    timer.target = this;
And I called the pause duration from the frame that needed it, etc.
Any ideas for AS3? (I've been away from flash for a year and it shows...ouch! but I'm a n00b to as3)
Thanks in advance!!

Hi Thali-Hoo,
What you're going to want to do is take advantage of the timer class here, use a document class for your FLA and use an undocumented method addFrameScript. I've written up a sample of how to do all of this and posted it in a zip file. Basically here's what I've done though:
package
    import flash.display.MovieClip;
    import flash.events.Event;
    import flash.events.TimerEvent;
    import flash.utils.Timer;
     * @author Jesse Nicholson
    public class PauseTimeline extends MovieClip
        public function PauseTimeline()
            if (stage) {
                init();
            }else {
                addEventListener(Event.ADDED_TO_STAGE, init);
        private function init(e:Event = null):void
            trace(totalFrames);
            addFrameScript(30, frame30);
        private function frame30():void
            //The playhead has just hit frame thirty. This is the same as having a script on a frame icon in the IDE
            trace("Hello, frame thirty");
            stop();
            var delayTimer:Timer = new Timer(5000, 0);
            //It's not the best thing to throw a function right into the handler reference but in this case it's short and sweet. See below on how you'd write the function out proper
            //This is how you would do the listener normally
            //delayTimer.addEventListener(TimerEvent.TIMER, frameThirtySleepTimerExpired);
            delayTimer.addEventListener(TimerEvent.TIMER, function(TimerEvent):void { gotoAndPlay(1); } );
            delayTimer.start();
        private function frameThirtySleepTimerExpired(e:TimerEvent):void
            //Check and see if the timer listener is on the currentTarget (the delayTimer object) and remove it if exists
            if(e.currentTarget.hasEventListener(TimerEvent.TIMER) == true){
                e.currentTarget.removeEventListener(TimerEvent.TIMER, frameThirtySleepTimerExpired);
            //Do whatever you want to do in here (when your timer has expired/completed)
             gotoAndPlay(1);
So, to explain. The FLA has 50 frames on the root timeline. On init (which is when the stage is present, which means that the class has fully initialize and the constructor has been processed etc blah blah) I use addFrameScript and attach the method frame30 to frame 30 on the root timeline. This is the same as just going to frame 30 in the IDE, making a keyframe and writing on the timeline.
So when the play head lands on frame 30, it calls the frame30 function. Inside that function we stop the playing of the timeline, create a timer object with a delay of 5 seconds and instead of passing in a reference to a handler function I just write a function on a single line right in there. Not the best way but for this example it's short and clean, but I still included a sample of how to do it normally commented out.
When the timer is started, the clock starts ticking. When the timer has finished counting through it's delay, it will fire an event to the listener handler function which only has the code "gotoAndPlay(1)" to restart playing from frame 1, looping the whole process. I think this is what you're looking for but if not or if you have any questions let me know. In my job I try to work with AS3 as much as I can but sometimes (like today) they force me to go back to AS2 and.. well basically I can sympathize with you so let me know if you need any other help transitioning to AS3! lol Hope this works for ya,
Jesse
PS - DL The example here! http://ascensionsystems.ca/Pause Timeline.zip

Similar Messages

  • Set duration of still frame

    I have a few hundered short clips on the timeline.
    Now i want to put my watermark on it.
    I created my name in PS, saved it as PNG file and brought it in the timeline above my videos. No matter what I do, I can not stretch the stillframe longer than 00:02:10:01. The total lenght of my footage is 01:30:00:00. I tried to set it in pref, before putting the frame on the timeline, I rightclicked on it, change duration..... none worked. (Copy, Paste, Paste...etc, will not work, because I have to export every clip indivituell. I need 1 frame, 1.5 hours long, because I will need to cut right there where the clip ends.
    Also tried to drag the clip (it worked a little bit, but not much)
    Thank you

    Sooooo,
    Thanks for explaining your needs. Although they puzzle me sometimes.
    Because if your source footage is DVCPRO NTSC (720x480), there's no need to convert it to HD.
    The PhotoJPEG's (or ProRes files) are to be viewed on a computer. And computers don't care about NTSC or PAL. They can just play it. Only DVD players and televisions can be picky about that issue. Computers and computermonitors do not bother at all. Besides that: HD is international, but still there's a difference in Framerate between US and Europe for instance, so you do not eliminate that problem.
    So main question is: Is the original footage DVCPRO NTSC? Then stay in NTSC.
    Is the main footage DVCPRO HD, then stay in HD.
    Whatever choice you make, at least keep the framerate the same as your original footage.
    Because I don't know the specs of you footage, the below examples are examples. Change the settings to wahtever suits you (or your footage) best.
    First, let's do it again. Please follow the instructions. Do not only look at the pictures.
    Skip the whole FCP idea. It won't help you.
    Now, open Compressor.
    Find the NTSC 100 Photo Jpeg preset. I know, that might not be the one you want. But hold on: Select it and press Command D for Duplicate. You'll now see a copy.
    Select the copy. And now in the Inspector window you can give it a new name and tweak all settings.
    - You say you want the quality to 91 % ? So go into Inspector's second Tab.
    Press the video settings (second arrow in the above image)
    In there choose your settings. Now the Quality slider does not have numbers. So it's guessing. But in the Inspector you can see what setting it turned out to be (third arrow in the above picture). You'll need to go a bit back and forth with this until it's 91. If that is really what you want....
    Happy so far?
    Now the frame size. Again choose whether you need NTSC or HD.
    If you want the new files to be the same size as the original footage, then choose this:
    If you like to force NTSC into 720pHD, then you need to choose this:
    (You might need to change the fielddominance to Progressive (in one of the other tabs) in that paricular case)
    ....read on in the next reply [I think there's a maximum of screen grab's, I can't add them any more]

  • IMovie 11 - set duration for still pictures in project

    Hi,
    I work with iMovie 11 since recently and I never had any problem with previous versions. Now I'm doing my first project in iM 11 and it just ignores my request for setting durations to still pictures.
    When I set the duration in 'Project Properties' 'Apply to all photos' to 4 sec for example it will set the duration anything from 5 to 7 sec and no matter how often I change it will not react. This is very annoying. Is there anything I have overlooked?
    What can I do? Thanks for help.
    thl

    A transition borrows frames from the photos or video clips on either side of a transition. There is a general rule that a transition cannot be longer then half the length of the shortest adjacent clip or photo.
    Also, check the setting for EDIT/TRANSITION OVERLAP.
    I copied the following from iMovie Help...
    Whether transitions are added to your project automatically or manually, you can set how much they overlap with the clips they’re adjacent to. This setting, which applies to all transitions in your project, affects the duration of your project.
    Double-click any transition icon in your project. In the inspector that opens, choose an option from the Overlap pop-up menu:
    All - Maintain Clip Range: The two clips are made to overlap by the length of the transition, and the transition is placed over the overlapping region. In this case, no additional content from clip ends is added. The total duration of your project decreases by the length of the transition.
    Half - Maintain Project Duration: The transition is placed so that it spans the clips; one half of the transition overlaps each clip. In this case, additional content from the end of each clip is added to fill out the transition. The total duration of your project remains the same.

  • Setting specific timeline for user login in EBS

    Hi All,
    Is it Possible to define specific timelines for specific users or user groups in EBS? (e.g. Mr X can only log in between 08 00 hrs and 16 00 hrs and session is automatically terminated with a grace period afterwards).
    Thanks,
    Prasad

    Hi Hussein, here is the exact req.
    I need to allow a few specific users to work only during office hours like 8.00 to 6.00 etc . So i will create a form to capture these timing details in a custom table.
    When the user logs into the application outside of his allowed timing ie after 6.00 i need to check for this user in my custom table which has the timing and if he is not allowed to work then should not allow him to login. I was thinking a trigger will help me solve this any suggestions from yourside.

  • How to change Unit for Breakdown Duration in Maintenance order.

    Hello,
    In cuni, somebody created Unit "TST" by mistake, system can not convert it to "second" for calculation automaticlly.
    "TST" make no sence. So if maintain "TST" as Unit for Breakdown Duration in a maintenance order, dump will happen. However there is a maintenance order maintained Unit for Breakdown Duration as "TST" saved by mistake, Dump will happen when I try to access to this order by IW32 to change the Unit for Breakdown Duration. Is there any way to change the Unit for Breakdown Duration"TST" to "H" so that I can access to this order by IW32.
    Thank you.

    Hi,
    You could temporarly adjust the CUNI definition for TST so that it can be converted to seconds. Adjust the notifications to set a valid unit of measure.
    The alternative would be to update the field MAUEH in table QMIH with a valid breakdown unit of measure.
    -Paul

  • Project Management Question - timelines for Production system deployment

    Hi
    I need an expert advice on setting up timelines for establishing an Oracle Apps Production environment. We are implementing Oracle HR & Payroll at an organization.
    Our system architecture is a 2-node application tier and 2-node DB tier (RAC). RAC is configured by another party and we only have to prepare the application tier (2 nodes)
    We would be installing Oracle Apps R11i (11.5.10) with jserv load balancing on the 2-nodes
    Can anyone suggest how much time this should take to install/configure & patching of the application tier (on 2 nodes)?
    Regards
    Saira

    Duplicate post (check your other thread):
    Project Management Question - timelines for Production system deployment
    Re: Project Management Question - timelines for Production system deployment

  • How to set duration on multiple still images?

    Is there a way to select a range of stills within a project and set the duration of them all to the same value. One can copy the image adjustments from a still and then paste that to multiple stills, but there isn't a Paste Adjustments menu item for duration.
    The only way I've found to accomplish this is rather clumbsy. Copy the selected images to a new project and then with the project properties set all the durations to the same value there, and copy them back into the original project. This also limits the choices for the duration to whole seconds between 1 and 10, so if you want 1:15 we're out of luck apparently.
    Is there a better way?
    Also the min. duration seems to be 0:08. Setting the duration to anything less results in the duration being set to 0:08.

    AFAIK there is no easy way to set a range of clips to the same duration. The only method within iMovie I know of was the one outlined above, copy to a new project, set all in that project and copy back to original project. That works but is slow and a clumsy way to do it.
    What's missing is a paste duration command and/or a setting in the dialog to set duration for the selected photos (plural since the range has yellow outlines around the thumbnails, says to me they are the selected photos).
    Also the values as x:ff are not seconds. It's seconds and frames. So ff can only range between 0 and 29, thus 8.97 isn't a valid value and when I used it to set a duration the duration ended up being 11:07. I understand the 11 (90 additional frames, thus 3 seconds more) with 7 additional frames.
    Apparently you can not set a duration of just a single frame in iMovie - no subliminal messages allowed I guess. (There were no transitions between the images.)

  • I want to create a timeline for events which have occurred in my past life

    IT would be better if I could run several at a time for example Work Life, Personal life, health events etc
    I would like to tie documents, pictures etc to them
    I would like to be able to present the timeline in either printed or projected form or both
    it is to help explain a sequence of events over a ten year period
    i do not mind paying but as this is not a commercial enterprise i do not want to pay to much

    Try going to the App Store, and search on things like timeline, other teams that come to mind.  A quick look turned up several programs that track timelines, calendar timelines, for various prices.  The default Calendar program is not designed to do this.
    You can use other programs, also, such as Keynote to create graphics of events.

  • Triggering and Recording for specific duration

    Enclosed is the VI which I am using to trigger a electrical circuit for generating a spark.
    My system is very simple wherein I am generating spark in a vessel (by a triggred electrical pulse to HV generator) and measuring the pressure and temperature for a specified time of X and Y seconds after the spark.
    Part A:
    On a single Boolean input (TRUE) I would like to have following:  
    1. The Trigger pulse (USB 6009 device) should start and last for say 1.5 sec. which is input to my electrical circuit. Two DAQ max is used since current from one port is not sufficient to trigger the HV generator - electrical circuit.
    2. At the same time the pressure inside the vessel should be recorded for X sec. only (writing to file)
    3. Simultaneously the temperature should also be recorded for Y sec. only (writing to file)
    In the present VI, I have to keep the “Auto fire and record” button pressed to write the data to file. I have set up preset time for the trigger pulse.
    After triggering and recording for specific time 1.5, X and Y sec. the Boolean should go to FALSE position since long duration pulse to electrical circuit can be damaging.
    *** REQUEST SOME-ONE HELP ON THIS MATTER ASAP. ****
    Part B:
    Later I have to record the values of current and voltage measured at three locations by Tektronix TDS 3034B Scope (channel 1, 2  and 3) for a duration of 300 nano-seconds after the spark has occurred (i.e. say P sec. after trigger pulse and recording till P + 300 duration)
    This simple logic seems to be more difficult than, I expected, can some one please help
    / suggest in the right direction. (**VI attached**)
    Sorry for the language – New to Labview and not an electrical engineer. So pl. explain.
    THANKS
    Email: [email protected]

    Hi xseadog,
    Sincere apologies for inordinate delay in reply.
    Was blocked up with actually setting up the experiment in physical sense. Keeping all the bits and pieces in right place.
    The pressure sensor / transducer is Omega PX219 with output 0 – 5 V. Recording pressure reading every 0.001sec. immediately after the spark trigger (USB 6009 signal) is switched ON. (through labview)
    The temperature is K type thermocouple. Recording temp every 1/12 sec.(0.0833 sec) after spark.
    I have made a provision to trigger the spark manually – through push button. But this mode requires me to start recording press and temp., before pushing the button to generate spark. Hence keen on using the trigger initiated through Labview.
    Regarding relay controlled by the 6009, I understand that circuit is similar to that. The HV is generated through an EHT pulse generator, which is ready now, the only thing is it requires a trigger of 5 V and more than 10 mA.
    Manually when we generate spark, we do not require the USB 6009, so we get spark every time when button is pushed, it was only during the Labview trigging we diagnose this prob. And hence clubbed the two channels of 6009.
    As of now the loop time “Auto fire and record” which is the key for firing –spark generation –runs every 1.011 sec. can you suggest, how to reduce the loop time ?.
    Does the DAQ’s consumes time or which step consumes more time. I would request your comments.
    Thanks for the continuous help / replies.
    nnnsh

  • Compare BI publisher set-up between various environments

    Hi All,
    DB:10.2.0.4.0
    Oracle Apps:12.0.6
    BI Publisher version:10.1.3.0
    Is there a way to Compare BI publisher set-up between various environments.
    It looks like that reports are behaving differently in different environments.
    Could anyone please share the steps/procedure to compare.
    Thanks for your time!
    Regards,

    One option might be to use Diagnostics to print out settings from each instance, then compare them.
    Pl see MOS Doc 388165.1 (11i : Oracle Application Object Library XML Publisher Data Collection Test) for details - this is for 11i but should be applicable for R12 also.
    HTH
    Srini

  • Advice needed for setting up hard drives.

    My new editing machine is pretty well complete. Now it's time for configuring everything, so to bring it's performance up to speed.
    Starting with hard drives.
    Core Components list-
    MB- ASUS P9X79-PRO.
    CPU- i7-3930k.
    Memory- RipjawsZ 8x8 @1600. 64GB.
    GPU- GTX 670 4GB.
    C: drive- SSD- intel 520s - 180GB (Windows 7 Pro 64 bit OEM is on this drive).
    Plus various 7200rpm disks, and more to be added.
    I had someone install most of the components for me, as I'm far too ill to handle the heavy lifting. They did a fairly good job, cept for the hard drive setup. So I need to ask some questions to help me get these drives setup correctly, and running at their full potential.
    There's some questions in particular that I must ask first-
    1/ For some reason they put the SSD on a SATA II port, but put a DVD-ROM drive on a SATA III port. To correct that I just swapped around the SATA data connections between the two. Windows appeared to work ok when I rebooted, but when I gave it a quick test with the WEI, the test failed.
    I expected some problem to come as a result.
    Here's what it said-
    After several reboots the WEI finally ran, and gave the primary disk a higher score than before swapping the connections .
    My question is- Should I take the fact that WEI is now able to run the primary disk test as an indication that it's working fine, and setup correctly ?
    I also ran several HD Tune tests for that SSD. It's still a bit slower than I expected.
    2/ Raid-0 setup. I take it that plugging 2x 7200rpm disk drives into the Marvell ports would be the parsimonious solution, so my question there is- What is the procedure for setting up a 2x disk Raid-0 on those Marvell ports?
    The two disks for RAID-0 I chose are the cheap 'n nasty model from Seagate's 2TB range. I know they're not reliable, which is why I'm not relying on them to store such things as project files, or project media (for things like that I have a Seagate Constellation ES.2 2TB) . This RAID-0 volume's sole purpose is to move along high bit rate Uncompressed Intermediatory video at an acceptable speed.
    If the data is lost to disk failure it's not a huge problem. The videos can be rendered again.
    I tested both of these (see images below) Seagate Barracuda's multiple times in HD Tune. Are their speeds close enough to each other to be paired together in a RAID-0 ?
    Barracuda A-
    Barracuda B-
    3/ So far I have four 7200rpm drives, but wish to add two more.
    The model I'm considering is the Seagate ST2000NC000 Constellation CS.2 2TB .On the surface they seem like good value, and faster than my Constellation ES.2, but what's the catch?  Are they suitable, and reliable enough to hold such things as project files?    

    Non-recoverable read errors per bits read:
    Value line CS: 1 in 10**14 (1.065% annualized failure rate)
    See http://www.seagate.com/em/en/internal-hard-drives/enterprise-hard-drives/hdd/enterprise-va lue-hdd/
    Constellation ES2: 1 in 10**15 (0.73% annualized failure rate)
    See http://www.seagate.com/em/en/internal-hard-drives/enterprise-hard-drives/hdd/enterprise-ca pacity-3-5-hdd/
    For testing whether everything works as it should, try the Passmark benchmark and Prime95 stress-test.

  • Any timeline for NOVA?

    Any timeline for when 1.9 will roll out in Northern Virginia?  Just curious and will be happy if anyone can provide any insight.  Thanks

    apemandan wrote:
    Ok...just got FIOS installed today.  I'm in Reston and did my homework and some friends in Alexandria told me they had 1.9.  I open up my setting after the install tech hooked it up and 1.8 is showing up.  He said he couldn't help so I called Verizon and the guy on the phone told me the same thing.  can't push an update and he had no timeline.  This blows.  I have a 2TB eSATA hard drive just aching to be plugged into my new DVR.
     You are in the same DAC as me, Which is DAC 3. And are in VHO 9 or 9a, Which means you should have the 1.9a update on or around the 25th of this month. 6 days before Halloween. It does suck it hasn't happened yet, but it won't be long now

  • Please send me list direction for set up abode creative cloud?

    Please send me list step-by-step direction for set up abode creative cloud? i tried to call abode too long time.
    James westmoreland
    [email protected]

    I will email you too. Here are instructions:
    In your browser go to https://creative.adobe.com.
    If you have an Adobe ID already then sign in, otherwise click the blue Get Started button which will take you to the Plans page https://creative.adobe.com/plans.
    There are various paid plans depending on if you own previous Adobe software, are a student/teacher, and want a month-to-month or annual subscription. If not sure just choose the Free plan.
    Once you are signed in you will see an Apps page https://creative.adobe.com/apps and a Files page https://creative.adobe.com/files.
    The Apps page is where you download the various desktop applications like Photoshop and access services like Typekit. The first time you download an application you will need to install the Adobe Application Manager. This program will handle downloading and installing the desktop applications.
    The Files page is wher you can upload files for online storage. Once uploaded you will see image previews of your files and be able to share them for comment feedback if wanted.
    If you have more questions just post again or email me at [email protected]

  • I have two Apple IDs, and this is causing problems with syncing via iCloud. How do I move everything to one ID? All advice is for setting up, not for after it's already set up.

    My problem is that I have been a Mobile Me user for the past couple of years, and because of that a second Apple ID was generated in addition to the one I've been using for years. When iCloud was introduced last fall I did everything I was supposed to in setting it up, but it is evident that the syncing is not working as it should. In checking, I am certain this is because I now have two active Apple IDs. I would assume this is a common issue with all who were/are Mobile Me users.
    The online help says you can't merge two IDs. Okay. What I want to do is to get rid of the Moble Me ID and only use my regular Apple ID. But the help on that issue seems to only give instructions for setting up the iCloud account. It seems that when I go into my iCloud accounts, both on my iPhone and my Mac, I can view the ID but there is no way to change them to another ID or to eliminate the account.
    Please help. I am a long-time Apple user and this really should be a fairly simple matter to take care of, but this is one issue where the normally user-friendly Apple way of life is giving me fits. Thanks.

    I am logged into the same things on both my iPhone and my MacBook Pro, except for mail. I use a gmail IMAP account and everything there already works on both machines. The iCloud account on my iPhone uses one Apple ID and the one on the Mac uses the second Apple ID.

  • I cannot send an email from my iPad 2? No problem receiving, why does this happen? Have tried the suggestions for setting up email and after doing the sync mail through iTunes receiving worked great but still cannot send? Any help would be great

    I cannot send an email from my iPad 2? No problem receiving, why does this happen? Have tried the suggestions for setting up email and after doing the sync mail through iTunes receiving worked great but still cannot send? Any help would be great!

    The fact that you can receive means you have a valid e mail address, and have established the connection to the incoming server, so all of that works.  Since the send does not work, that means your outgoing server is rejecting whatever settings you used formthe outgoing set up.  Try them again. 
    Google your particular isp, and ipad and many times you will find the exact settings needed for your isp.  Or tell us here, and soneone else may be on the same isp.  Some mail services need you to change a port, or have a unique name for the outgoing server.  
    Kep trying.

Maybe you are looking for

  • Searching for a text in the file.

    I have a to search for a particular text, in the file. Since my file is of large size, I do not want to read the file line by line searching for the text. Is there any API which will help me do this?

  • Recording problem menubar

    Hi, i am working on BDC call transaction .My req.. is to put dear2 flag = X . This is located in EXTRAS =>account group info=>customer types. How i can record this path please help me on this.

  • Basic (try catch finally)

    Try catch and finally were thing i recently neglected to use unless my ide made me, but i was just reading on how to use them and I have a question about something i couldn't find an answer for: objects you declare in try statements e.g.: try{ Buffer

  • Working with a QuickSwipe comp

    Questions about working with a QuickSwipe comp: 1) If I drag a new file into a take folder containing several takes, the new take file gets placed on top. This is fine unless I want the order to match the takes from another track. How can I change th

  • Need help fixing my router: WRT54G

    I just got rid of Vonage and went back to this router.  I tried puting in some firware and now everything is screwed up.   I have no access to 192.168.1.1 to make any changes.  Is there a way to clear everyhting out of the router and start over. Mess