Loop, pause, reverse clip...please help

Hi guys,
I seldom work with action script but rather using a normal animation by adding graphic to the timeframe.
the graphic is done but the file is 1,8 MB which is too big for 1 file.
can someone help me?
I am trying to create a function where at :
-first frame, the event will pause till certain amount of second and play till the last frame.
-last frame will also pause certain amount of time and play reverse to the first frame.
can someone please help me?

var mc:MovieClip = whatever movieclip your want to pause, play, pause, reverse
var pause1:int=3000; // pause for 3000 ms
var pause2:int = 2000; // pause for 2000 ms
var n:int = 0;
var t:Timer=new Timer(pause1,1);
t.addEventListener(TimerEvent.TIMER,pauseF);
t.start();
function pauseF(e:TimerEvent):void{
if(n==0){
mc.play();
mc.addEventListener(Event.ENTER_FRAME,enterframeF);
n=(n+1)%2;
function enterframeF(e:Event):void{
if(n==1){
if(mc.currentFrame==mc.totalFrames){
mc.stop();
mc.removeEventListener(Event.ENTER_FRAME,enterframeF);
t.delay=pause2;
t.reset();
t.start();
} else {
mc.prevFrame();
if(mc.currentFrame==1){
mc.removeEventListener(Event.ENTER_FRAME,enterframeF);
t.delay=pause1;
t.reset();
t.start();

Similar Messages

  • Missing recording clip - PLEASE HELP!

    Recording some speech clips in GB and went back to them this am to find them missing... I did discover that if I move the clips back and forth through the track, they shorten (cutting off) other clips that take up the same space... So if I slid a recorded clip over too far, and it covered over my previous clip is it gone forever?
    I'm working on a senior project and it's due tomorrow and now I'm missing audio
    PLEASE HELP ME!

    I was afraid of that.
    I wish that didn't happen. I would think that if you slide a clip over, it might push the other clips along with it, or hide it underneath or something to prevent loss of data...
    I think ACID worked like that.
    bummer.
    thanks.

  • ODI error when trying ro reverse engineer-- Please help

    Hi all,
    I am receiving the error below "ImportError: no module named java" when I am attempting reverse engineer from Essbase into the models tab in the ODI Designer.
    I am using ODI version 10.1.3.5
    I have all jar files related to Essbase in drivers folder. And all KMs related to Essbase in impexp folder. I have created CLASSPATH system variable with "D:\OraHome_ODI\oracledi\drivers". Should i need to add this path in PATH system variable?
    What should i do to get this problem solved. Please help.
    Thank you in advance for the help!!
    org.apache.bsf.BSFException: exception from Jython:
    Traceback (innermost last):
    File "<string>", line 1, in ?
    ImportError: no module named java
         at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:146)
         at com.sunopsis.dwg.codeinterpretor.k.a(k.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlC.treatTaskTrt(SnpSessTaskSqlC.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
         at com.sunopsis.dwg.cmd.e.i(e.java)
         at com.sunopsis.dwg.cmd.g.y(g.java)
         at com.sunopsis.dwg.cmd.e.run(e.java)
         at java.lang.Thread.run(Thread.java:619)
    Regards,
    Srinivas

    MOS Note 424232.1 says
    Such messages are probably due to either a stale Jython cache (.../scripting/cachedir folder) and / or insufficient access privileges attributed to the Unix user account which has launched either the ODI Agent or Designer GUI and is executing a Jython script and writing to the Jython cache (default value being .../lib/scripting/cachedir/packages folder).
    Alternative workarounds:
    1. Stop all ODI processes and remove the cachedir folder, the restart ODI and retest the process.
    2. Use a different "python.cachedir" information, on which the User has write privileges. This Java property may be set into the Jython Registry and specifies the directory used internally by Jython for cached information about Java packages in ".jar" files. If the directory is relative, it is interpreted relative to the Jython root. For complete information, refer to Jython documentation, at:
    http://www.jython.org/Project/userguide.html#the-jython-registry
    3. Try running Jython once as "root" in order to create the Jython cache directories or take appropriate administrative actions (for example, chmod 777....) to allow the user account to access these files.
    4. Please bear in mind that Unix is case sensitive... As such, do not forget to verify lower/upper case attributes of folder names.
    If the ODI process is run by an Agent and the message is displayed:
    1. Please check the ODI Agent in Topology Manager to determine on which host it is running then proceed to its installation folder and ...:
    2. Verify that Jython is included with the Agent installation folders:
    * In oracledi\bin - jython.sh
    * In oracledi\lib\scripting - jython.jar, cachedir, and lib
    * In oracle\lib\scripting\lib - numerous jython .py files
    3. Also give Unix user account full permissions to every file and folder in the Agent installation and the java installation.
    4. Restart the Agent.
    5. Test the Agent in Topology Manager (ensure that the hostname is correct). If the test is successful, retest the Package/Scenario.
    Thanks,
    Sutirtha

  • Language of some of my icons has changed and I can't seem to reverse it, please help!

    A friend of mine was messing around with my laptop and managed to change the language to what I believe to be Russian.  I changed the language under the 'International' tab back to English, but for some reason some of my icons (e.g. system preferences, software update and language menu) are still written in whatever language this is.  I've fiddled about with the settings in the 'International' tab for hours but with no success and I can't find a solution anywhere.  Please help!

    Did you do logout/login after moving English to the top of the list?
    Also you could try going to system prefs/international/language and using the Edit button to uncheck the box for Russian.

  • ListCellRenderer causing extra looping and slow down, please help

    Guys
    Please could you kindly help me with my long-lasting problem
    concerning ListCellRenderer.
    I sent it originally to Programming Essentials but no replies at all:
    http://forums.sun.com/thread.jspa?threadID=5388059&tstart=15
    Here is more detailed description of my problem that did not fit to my original posting (chech link above):
    For your convenience I made a special simplified version of my problem.
    Here are two fully compilable java-files that indicate my problem with simple GUI and System.out.print output. Please try to run my program, please.
    I try use ListCellRenderer and ListSelectionListener with a simple interactive list that contains four names, either male or female names, like:
    Bill
    James
    Martin
    Peter
    With a simple button "Change gender" the names can be changes to female names, and then again male names, etc...
    If you select THE FIRST NAME in the list and press "Change gender" button, the System.print.out shows unnecessarily repeating loops.These accumulating extra loops slow seriously down performance with long lists.
    Example output (the first name selected, so accumulating extra loops!!):
    Entering method ChangeGender
    ChengeGender method (name, index): Bill, 0
    Cell renderer (name, index): Bill, 0
    ChengeGender method (name, index): James, 1
    Cell renderer (name, index): Bill, 0
    Cell renderer (name, index): James, 1
    ChengeGender method (name, index): Martin, 2
    Cell renderer (name, index): Bill, 0
    Cell renderer (name, index): James, 1
    Cell renderer (name, index): Martin, 2
    ChengeGender method (name, index): Peter, 3
    Cell renderer (name, index): Bill, 0
    Cell renderer (name, index): James, 1
    Cell renderer (name, index): Martin, 2
    Cell renderer (name, index): Peter, 3
    Quitting method ChangeGender
    However, if you select OTHER NAMES THAN THE FIRST ONE (or no names at all) and press "Change gender", then no extra loops occur in System.out.print. Why?
    Example output (the second name selected, so no extra loops):
    Entering method ChangeGender
    ChengeGender method (name, index): Bill, 0
    ChengeGender method (name, index): James, 1
    ChengeGender method (name, index): Martin, 2
    ChengeGender method (name, index): Peter, 3
    Cell renderer (name, index): Bill, 0
    Cell renderer (name, index): James, 1
    Cell renderer (name, index): Martin, 2
    Cell renderer (name, index): Peter, 3
    Quitting method ChangeGender
    I will have list containing hundreds of names and therefore extra loops slow severely my application.
    Please explain how to avoid extra loops, also when the first name is selected.
    And please - if just possible - show me exactly which rows of my program must be rewritten and how.
    Thank you very much!

    Change
    for (int counter = 0 ; counter < names.length; counter++) {
        defaultListModel.addElement(names[counter]);
    }to
    ListDataListener[] listeners = defaultListModel.getListDataListeners();
    for(ListDataListener listener : listeners) {
        defaultListModel.removeListDataListener(listener);
    for (int counter = 0; counter < names.length; counter++) {
        defaultListModel.addElement(names[counter]);
    ListDataEvent evt = new ListDataEvent(defaultListModel,
            ListDataEvent.INTERVAL_ADDED,0,names.length-1);
    for(ListDataListener listener : listeners) {
        defaultListModel.addListDataListener(listener);
        listener.intervalAdded(evt);
    }

  • SET UP NEW IPHONE LOOP!!! PLEASE HELP!

    Hey everyone...
    Well i have an iPhone with major issues...
    It doesn't sync and apps crash etc...
    Anyway Apple are sending me out a new iPhone seen as though this has a list of things wrong with it...
    Anyway thats fine... Today i thought it would be an idea to back up everything so thats exactly what i did... just before i did this my iPhone froze So i thought i'de plug it into iTunes to restore it.
    While doing this i noticed the Set Up new iPhone pop up window - i ignored it...
    ANyway so i restored everything etc...
    I got a call answered it and everything was normal.
    I went to Sync when i was stuck in a continuous loop of "Set up New iPhone"
    After doing it 4 times i eventually gave up and rang apple...
    They couldn't really diagnose anything...
    If this has happened to anyone please let me know as i have alot of data on that phone which i'de rather not loose...
    Thanks.... =]
    Have a good night... =]
    Carl =]

    Disk Utility MAY or MAY NOT help
    It depends on a few things.
    1. Is the disk over heating, IF so then you need to wait for it to cool off.
    2. If its a bad cable (using a USB 1.1 cable with a 2.0 drive, broken internally, etc) then you may want to try a new cable.
    3. If its a file system issue then Disk Repair may fix it but if its serious then you may want to use DiskWarrior.
    DiskWarrior has saved my drive several times!
    I would recommend trying the following in this order.

  • IPOD TOUCH KEEPS PAUSING ITSELF! PLEASE HELP

    HI EVERYONE<
    I HAVE PROBABLY THE MOST ANNOYING PROBLEM THE IPOD TOUCH COULD HAVE...IT KEEPS PAUSING THE SONGS (AND EVEN VIDEOS) AFTER EVERY FEW MINUTES...EVEN IF ITS LOCKED. NOW I HAVE TRIED EVERYTHING LIKE RESETTING IT, RESTORING IT AND ALL THAT AND EVEN DRAINING THE WHOLE BATTERY AND CHARGING IT AGAIN. IT WONT WORK.
    I HAVE HAD MY IPOD TOUCH FOR A MONTHS NOW AND I HAVE HAD JUST ABOUT ENOUGH OF **** FROM IT. THING IS, FIRST IT COULD NOT TURN OFF BUT I SORTED THAT BY RESTORING IT AND RESETTING IT MULTIPLE TIMES I MUST SAY. BUT NOW, ANYTHING I PLAY EITHER A VIDEO OR A SONG PAUSES ON ITS OWN!!! I COULD SIMPLY PRESS PLAY AGAIN BUT AFTER A FEW SECONDS INTO THE SONG, IT PAUSES AGAIN. I CAN NEVER HAVE IT IN MY POCKET NOW BECAUSE I HAVE TO CLICK "PLAY" EVERY 15 SECONDS ARGGH. PLEASE SOMEBODY HELP ME

    I also want to submit my experience. Same exact thing happened to mine. It only happened after the recent update to ver 2.0.2 (5C1), and it's really ANNOYING!! You can't listen to an mp3 or any music this way when it pauses every few seconds! Of course, all the free apps I downloaded could be subject to scrutiny... Overall, the new apps as well as the default apps seem to still work with minimal issues.
    The music sometimes jumps ahead to the next track, but mostly just pauses randomly within each track. Last night I temporarily cleared it up by holding the power off for 5 seconds, and it provides a red slide off [something I never saw before], waited a few minutes, then turned back on. (Found this step on another post.) I imagine this resets the system and may clear some garbage. After I did this [a few times] I successfully listened through a track or two, but was so peeved, and paranoid, I couldn't enjoy the music! I hope this doesn't happen next time. I thought it was a corrupted mp3 at first, but it happens to all tracks, and it seems to be an internal problem. If this continues, I may want to clear reset the whole device and possibly revert back to when it worked great, but then again, they may clear it up with another software revision.
    Message was edited by: ProGraphicScott

  • Infinite Apple logo loop on 30gb ipod, please help

    Ive had my ipod for 2 years now, so of course its not under warranty.. basically my problem is when i try to turn on my ipod, it looks like it will boot up, it shows the apple logo, screen goes black, and does it all over again, until the battery dies. I've tried the 5 R's, I've tried dropping it, (which seems to work for a lot of people) And I can't format it or look at it on my computer, because the computer doesn't even recognize it as being plugged in. Is it a lost cause? Any help is appreciated

    it caused by the low battery level and not sufficient power to run the iPod software.
    See put it into disk mode and allow you to charge and restore
    http://docs.info.apple.com/article.html?artnum=93651
    otherwise you should get better chance to fix it by doing the following
    Windows users having trouble with their iPods should locate a Mac user. In many cases when an iPod won't show up on a PC that it will show up on the Mac. Then it can be restored. When the PC user returns to his computer the iPod will be recognized by the PC, reformatted for the PC, and usable again. By the way, it works in reverse too. A Mac user often can get his iPod back by connecting it to a PC and restoring it.
    Tips
    a. It does not matter whether the format is completed or not, the key is to erase (or partly) the corrupted firmware files on the Hard Drive of the iPod. After that, when the iPod re-connected with a computer, it will be recognized as an fresh external hard drive, it will show up on the iTunes 7.
    b. It is not a difficult issue for a Mac user to find a window base computer, for a PC user, if they can’t find any Mac user, they can go to a nearest Apple Shop for a favor.
    c. You may need to switch around the PC and Mac, try to do several attempts between “Format” and “Restore”
    http://discussions.apple.com/thread.jspa?messageID=2364921&#2364921

  • Extracted Audio longer than movie clip, please help...

    I was reading some of your FAQ's about extracted audio being
    recomposed with a mono instead of stereo for exported audio from a microphone or other mono device, and then importing it back into iMovie after mixing it in Quicktime, to make it stereo (albeit with only mono feed).
    My question is this:
    I extract the audio from the clip that I am running, and it is fine and good while within iMovie, however, once I drag and drop it to my desktop, and open it with quicktime and either play it or export it as mono to get it to play through both speakers, it uses the original
    length of audio not the edited version that i pull from imovie. It is very frustrating, and I am not sure why it keeps doing this.
    While it is in iMovie, the audio and video match, and are synched. But, when I export it, for some reason, it exports the original audio from the unedited clip (which has already been deleted!), and I don't know what to do to get it to export just the audio clip as it stands now within iMovie.
    Any help would be appreciated.
    Thanks,
    Chris
    G5   Mac OS X (10.4.9)  

    Hi Aesthesia - that is a fact of life of non-destructive editing. When audio is extracted from a shortened, cropped clip, it actually extracts the entire audio from the underlying original source clip. You can test this by extracting audio from a cropped clip, and you will find that you can, by direct editing, extend it back to its original length.
    That explains why the audio file when played outside of iMovie plays at the original length.

  • Applying Same EQ Ajustiment to Another Sound Clip -- Please Help

    I have been working with the Gain and Channel EQ's on a sound clip to raise audio levels and adjust sound levels, etc. How can I apply the same adjustment I created on a clip to a different audio clip (that follows immediately after for the same sound, etc.) I know there is a simple way to do this...but I don't know how.
    Please let me know.
    Thanks.

    If the different clip is in the same environment and same type of sound as the first, you could just create a preset with your settings and apply it, or if you're in a multi-track project, group these clips together on one track and put the EQ on the entire track.
    If the different clip is not in the same environment and you are trying to get them to match, you could try EQ matching in the processing menu. Take a snapshot of your EQ curve, apply to the 2nd clip. Haven't tried it myself, but give it a go.

  • Lining up Two Video clips-please help!

    So hi! I've been using premiere for about a year, I came from Sony Vegas Pro.
    Anyway, we had a shoot yesterday, a two camera interview on one subject. (7d &5dmII) both shooting 23.976fps and we recorded our audio with an external recorder.
    So, I lined up the audio by turning the turning the 'Show Audio in Time Units' on. This works great. I can move the audio to perfectly match up between the frames of the video in 1/4800 increments. Lovely. 
    After I lined up the audio I attempted to line up the two video tracks on top of each other (when the clap board strikes) and even though the Show Audio in Time Units is enabled, I can't perfectly line up these tracks. The track snaps between frames, making it impossible to line up. Yes, snapping is turned off. How do I move the video 'between the frames' so to speak? This was quite easy to do in Vegas.
    Thank you!

    Craig,
    I strongly agree. Back in those days, I never felt comfortable with video, even if we recorded it to 2" tape. I could not hold that up to the light and see my images! It was "the devil's work." Back then, there was no deck-to-deck editing, and only doing a diagonal cut and tape job - but you could not really see where you were cutting.
    Regarding NLE work nowadays, like you, I'd only go back for a "trip down memory lane." I can do on a simple laptop, 10,000 more things than I could ever do on an 8-plate Moviola - things that I could not even imagine back then. Had I been given a peak at PrPro in 2010, back in '72, I would never have been able to either believe it, or comprehend it.
    You know, every time that I see the word Bin, I can conjure up those laundry "bins," with racks above and either clips or clothes pins. I also remember squinting to try and read the cryptic notes in grease pencil at the head of each in the darkened edit booth. "is that a 5, or an 8? Oh SHOOT, I just smudged it!"
    Don't get me started on mixed formats. I'd never have considered mixing 8mm (split-16), S-8, 16mm and a bit of 35mm in an edit. Only recourse was a trip to the lab for prints, and we always knew that quality was going to differ greatly. Now, we just run the stuff through a conversion program, Import and edit happily, or nearly so.
    Yes, I will take that random crash/hang, and smile. If the Moviola crashed, we had to fly a tech from Dallas and then hold our breath. Of course we could jump over to our rewinds and splicing block, and still get a bit of work done - the "old fashioned way."
    The kids have no idea of easy they have it - right on their desktops. I envy them, 'cause they started with NLE and probably have creative ideas, that I will never have, just 'cause I still have a slightly closed view of things. I envy them!
    OK, back to our regularly scheduled programming...
    Hunt

  • Reversing Songs (please help)

    i have a DJ software program on my computer--it is a demo-- i took some of my songs and totally made the be played backwards.. is there anyway possible to make your songs play completely backwards from end to beginning? and then edit it that way?
    thanks
    DJ Jones

    i ment in Logic Express 8 is there anyway to take your songs and completely black them backwards from end to beginning?

  • Since yesterday, when I push the play button, that automatically  activates the pause putton. Result : I cannot watch nor listen anithing. Please help me ¡

    since yesterday, whwn I push the play button, that automatically activates the pause button. Please  help me¡

    The play button in which App?
    Have you tried restarting or resetting your iPad?
    Restart iPad: Press and hold the Sleep/Wake button until the red slider appears. Slide your finger across the slider to turn off iPad. To turn iPad back on, press and hold the Sleep/Wake until the Apple logo appears.
    Reset iPad: Press and hold the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears. Ignore the "Slide to power off".

  • TOMCAT problem on REDHAT 9,PLEASE HELP

    Hello, i am new to redhat and i installed tomcat 4.0.1 and it worked properly, i used tomcat for studying issues so i used to start it and stop it many times
    now when i use mozilla and try to request the server using http://localhost:8080/ ,mozilla status bar shows "Transfering data from localhost" and loops for ever
    so please help me

    I think this is not problem of redhat just check reinstalling tomcat.

  • Not getting Result please Help

    Hi All
    query_string VARCHAR2(2000);
    query_string are EMPNO,ENAME
    for rec1 in (SELECT query_string FROM p_table_name ) loop
    utl_file.put_line(v_file, rec1.result1);
    END LOOP;
    not getting Result please Help
    Regards

    You may look at this:
    michaels>  DECLARE
       cur            sys_refcursor;
       query_string   VARCHAR2 (2000) := '';
       p_table_name   VARCHAR2 (30)   := UPPER ('emp');
       p_stmt         LONG;
    BEGIN
       FOR c IN (SELECT ROWNUM rn, column_name, COUNT (*) OVER () cnt
                   FROM user_tab_cols
                  WHERE table_name = p_table_name AND hidden_column = 'NO')
       LOOP
          query_string :=
             query_string || c.column_name
             || CASE
                WHEN c.rn != c.cnt
                   THEN ' || ''|'' || '
             END;
       END LOOP;
       p_stmt := 'select ' || query_string || ' FROM ' || p_table_name;
    -- DBMS_OUTPUT.put_line (p_stmt);
       OPEN cur FOR p_stmt;
       FOR rec1 IN (SELECT EXTRACTVALUE (t.COLUMN_VALUE, '/ROW//text()') result1
                      FROM TABLE (XMLSEQUENCE (cur)) t)
       LOOP
          /*  replace with utl_file in case ... */
          DBMS_OUTPUT.put_line (rec1.result1);
       END LOOP;
       CLOSE cur;
    END;
    7369|SMITH|CLERK|7902|17-DEC-80|800||20
    7499|ALLEN|SALESMAN|7698|20-FEB-81|1600|300|30
    7521|WARD|SALESMAN|7698|22-FEB-81|1250|500|30
    7566|JONES|MANAGER|7839|02-APR-81|2975||20
    7654|MARTIN|SALESMAN|7698|28-SEP-81|1250|1400|30
    7698|BLAKE|MANAGER|7839|01-MAY-81|2850||30
    7782|CLARK|MANAGER|7839|09-JUN-81|2450||10
    7788|SCOTT|ANALYST|7566|19-APR-87|3000||20
    7839|KING|PRESIDENT||17-NOV-81|5000||10
    7844|TURNER|SALESMAN|7698|08-SEP-81|1500|0|30
    7876|ADAMS|CLERK|7788|23-MAY-87|1100||20
    7900|JAMES|CLERK|7698|03-DEC-81|950||30
    7902|FORD|ANALYST|7566|03-DEC-81|3000||20
    7934|MILLER|CLERK|7782|23-JAN-82|1300||10
    PL/SQL procedure successfully completed.

Maybe you are looking for