What is the code for looping a clip backwards?

I would loop a front clip and back by clicking a button front or rear.  I found the script code 3 following actions on Adobe, but the code that plays the mc in the opposite direction is not triggered by a button.  Can someone find me the code requiring the user to hit the reverse button for a mc backwards in a loop?

Here is the code to play forward:

function playAnimation(event:MouseEvent):void
{
star_mc. Play();
}
Save the function as an auditor with the key.
startButton.addEventListener (MouseEvent.CLICK, playAnimation);

________________

Here's the code that automatically plays the mc in reverse but that is not triggered by a button in the code above:

This function is called when the enterFrame event is triggered, which means
It is called once per frame.
function everyFrame(event:Event):void
{
If (star_mc.currentFrame == 1)
{
star_mc.gotoAndStop (star_mc.totalFrames);
}
on the other
{
star_mc.prevFrame ();
}
}
star_mc.addEventListener (Event.ENTER_FRAME, everyFrame);


I need code that will play before in a loop and play backwards in a loop and triggered by the buttons.  Please help...  Thank you

Apart from the function that performs the actual reading reverse, you need a button that tell the movieClip to run the "reverse code" each update of the framework.

Suppose you have a button named reverseButton. When you click on it, copy the following code calls the function 'playAnimation', which tells the movieClip with instancename star_mc to run the code you already have.

function playAnimation(event:MouseEvent):void
{
star_mc.addEventListener (Event.ENTER_FRAME, everyFrame);
}
Save the function as an auditor with the key.
reverseButton.addEventListener (MouseEvent.CLICK, playAnimation);

Tags: Adobe Animate

Similar Questions

  • What is the Code for error AHT 4HDD/11 / 40000004:SATA (0,0)

    What is the Code for error AHT 4HDD/11 / 40000004:SATA (0,0)

    This means you have a hardware problem related to the hard drive. The disk may be corrupted or fails and must be replaced. Save your file as soon as POSSIBLE. If the player does not have little time for the backup.

  • What is the code for error "the dependency service or group could not start": 1068

    What is "the dependency service or group could start"?

    This seems to be a HUGE problem for PC users so much; It gives rise to the error 1068 code and effects so many aspects of our machines...

    What is this area of computing? What it means? If we understood this, solutions might be easier to find?
    From what I can deduce (I could be wrong) there seems to be a communication error; But why did affect many different areas of the machine?
    I recently corrected an error 1068 on an internet connection and then again on spooler print issue; Now, I'm trying to solve the error even on a sound broadcast. Frustrated? Isn't the half of it! WHAT IS THIS ERROR?

    the dependency service or group could not start
    http://social.technet.Microsoft.com/forums/en/itprovistanetworking/thread/563b908c-AA24-4000-9b2d-b6ff02f10c56

    No sound in Windows
    http://Windows.Microsoft.com/en-us/Windows/help/no-sound-in-Windows

    Tips for solving common audio problems
    http://Windows.Microsoft.com/en-us/Windows-Vista/tips-for-fixing-common-sound-problems

  • What is the Code for authorization on the order recipt page for?

    I understand that the invoice number must refer to the order, but what is the authorization code for? Is this a code to confirm the payment by credit card? Thank you.

    Yep, it's the code returned by the payment gateway.

  • What is the code for 2009 wireless ketboard

    I want to associate this keyboard for my new Mac Book.  I don't have the code, and it won, t pair.

    The code must be generated by the computer. Do you have unfair keyboard of some old equipment you use?

  • What are the codes for my Magnavox TV remote

    I don't find remote control codes for my magnavox tv to my bdpbx110. Can anyone help as I can't seem to get the cat to support at work.

    Unfortunately, the Blu - ray remote has no channel key, so it is not possible to change the channel using the supplied remote control.

  • What is the code for error windows 800736b, get error after uninstalling Firefox

    using windows 6 vista 1525 32 bit sp 2
    to know that I have a 800736b windows error code
    What does that mean?
    Thank you

    Hello

    This error could have happened since you have installed an incompatible version of Mozilla Firefox with Kaspersky Pure. I understand that after uninstalling Mozilla Firefox from the computer you get no error message. You can contact the Support of Mozilla Firefox and check if they have a compatible version of Mozilla Firefox with Kaspersky Pure.

    Please see the link to contact the Support of Mozilla Firefox: http://support.Mozilla.com/en-us/home

    Let us know if you need additional assistance.

  • What is the code for error E0434F4D when you install netf EPI 1.1 service pack 1

    I tried to install an update to Microsoft .net Framework 1.1 SP1, update security for Microsoft Visual C ++ 2008 (KB2538243) and .net Framework 3.5 Family Update x 86 (KB959209) without success. I kept getting code error E0434F4D, 64 c and 80070663 respectively. Help, please. I can't evaluate all my files window

    Hello

    Method 1:
    You try to use clean tool to remove corrupt .net Framework works.
    http://blogs.msdn.com/b/astebner/archive/2008/08/28/8904493.aspx
    You can perform stand-alone C++ and .net

    Method 2:
    You can run the fix it and check.
    The problem with Microsoft Windows Update is not working
    http://support.Microsoft.com/mats/windows_update/

    Method 3:
    You can also troubleshoot windows update using the link:
    Troubleshoot problems with installing updates.
    http://Windows.Microsoft.com/en-us/Windows-Vista/troubleshoot-problems-with-installing-updates

    Method 4:
    If the problem persists, then try to put your computer in a clean boot state, and then try to install the updates.
    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7
    http://support.Microsoft.com/kb/929135
    Note: After a repair, be sure to set the computer to start as usual as mentioned in step 7 in the Knowledge Base article.


    Method 5:
    You can also try the steps in the supplied knowledge base article and check.
    Cannot install updates in Windows Vista, Windows 7, Windows Server 2008 and Windows Server 2008 R2
    http://support.Microsoft.com/kb/2509997
    Note: This section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base. How to back up and restore the registry in Windows:

    http://support.Microsoft.com/kb/322756

     
  • What is the code for the appropriate button my button inside the UILoader?

    I have problems with the buttons from the file SWF is introduced on the main flash site via UILoader.

    Just in case, here is my code:

    ------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------

    icysophistication_btn.addEventListener (MouseEvent.CLICK, onClick_PlayApplications_fromIcyS_EL);

    function onClick_PlayApplications_fromIcyS_EL(event:MouseEvent): void {}

    MovieClip (parent.parent.parent.parent) .gotoAndPlay ("icysophistication");

    }

    ------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------

    I gathered it is very probably due to the fact that I built a button down the wrong path.

    I tried to do a button, but it was the same result.

    I would try to go through the main storyline. What would be the block of code to put a function on the button located inside an external SWF which is called in via a UILoader?

    If you want to assign a code to a button (btn) located in a SWF is loaded into a component UILoader (ldr) of the timeline that contains the UILoader, you use the content property of the UILoader to target the swf/movie and all that is in it...

    function btnFunction(evt:MouseEvent):void {}

    whatever

    }

    MovieClip (ldr.content).btn.addEventListener (MouseEvent.CLICK, btnFunction);

  • What is the code name for intex fx cloud (required to manually build 2.0)

    I want to manually build the last B2G for an intex phone fx cloud. The build process requires executing the script "config.sh' with the name of the phone code:
    https://developer.Mozilla.org/en-us/Firefox_OS/Preparing_for_your_first_B2G_build#Configuring_the_B2G_build_for_a_mobile_device

    The phones operating system supported firefox page does not display the code name for new devices:
    https://developer.Mozilla.org/en-us/Firefox_OS/Developer_phone_guide/Phone_specs

    Is it possible to get the code for intex phone name. If the list of the devices supported by "config.sh" does not include the code name of intex, is there a way to still be able to build the latest os from firefox for the intex device?

    Hi Notalex,

    The code name for the Intex Cloud FX device is Tarako. However, it uses another optimized codebase that the regular B2G is based so that it can run on lower range with little memory devices.

    Unfortunately, version 2.0 of the B2G code base would go not on the Fx cloud Intex due to material limitations.

    For more information and advanced issues on customizing your Firefox OS device, you can visit the following pages:

    I hope you find this information useful. Please let us know if you have any questions of usability with your new Firefox OS device.

    Thank you!! =)

    -Ralph

  • When to use the cursor for loop and the cursor (open, fetch, close)

    Hello world
    I have a small doubt about when to use the cursor for loop and when to use the cursor for loop and the cursor (open, fetch, close).
    Well, I'm not the difference between implicit and explicit cursor. So please tell me how I got to know, what to use and when?




    Kind regards
    BS2012

    Published by: BS2012 on January 29, 2013 12:15

    All SQLs are analyzed, stored and executed as cursors. Thus, you will always use a cursor.

    The problem is that languages, such as PL/SQL, provide different interfaces to interact with the SQL cursor. As the ref, the slider interface, the interface DBMS_SQL slider interface and so on.

    Each of these interfaces offers different features. For example, using the interface DBMS_SQL allows binding dynamics and dynamic recovery. The Ref Cursor interface allows your code PL/SQL pass a handle to a reference pointing to the SQL cursor, to an external client. Etc.

    The fundamental reason for the use of an explicit cursor interface is mainly that you own and manage bulk made extraction output provided by PL/SQL cursor.

    With a cursor FOR , the motor loop of PL/SQL optimize the loop by extracting block a 100 lines both. However, you cannot access this collection in bulk directly inside the loop.

    With an explicit cursor interface, you specify the size of the extraction in bulk via the clause LIMIT , and you set the variable of collection to use. This allows you to use the collection directly variable inside the loop.

    However, the need to do - code manually in bulk collection - rarely occur in the daily programs in PL/SQL. A line of treatment is both slow and not well fits. And even if your bulk code collects lines, these lines must still be processed one at a time in your code. It is much more efficient and scalable rather write SQL code, and make the engine SQL the line of treatment for you.

  • How can I find the code for the iTunesi

    How can I find the ocated

    What is the code you are looking for?

  • hardware device: what is the code 43?

    hardware device: what is the code 43?

    Hi Timothy,.

    Thanks for posting the question in the Microsoft Community!

    According to the description provided, looks like you want to know the description of error code 43.

    However, we need more information about the issue to help you better. Please help me to answer these questions.

    1. what operating system do you use?

    2. when exactly you get this error?

    3. were there any changes made to the computer before the question?

    Visit this link for the operating system you are using.

    http://Windows.Microsoft.com/en-us/Windows/which-operating-system

    This problem occurs when an engine control unit notified the operating system that the device has failed in some way.

    Visit this link to learn more about Device Manager error codes.

    http://support.Microsoft.com/kb/310123

    Hope this information helps. If you have any questions with Windows do not hesitate to answer and we will be happy to help.

  • What is the color for crimping combination?

    What is the color for crimping combination

    ?

    Try here:

    http://www.Google.com/search?hl=en&source=HP&q=RJ45+color+code&GBV=2&OQ=RJ45+color&AQ=0&AQI=G10&aql=&gs_sm=e&gs_upl=7187l9046l0l15328l10l9l0l2l2l0l218l842l5.0.2l7l0

    Google is your friend.

    Steve

  • How can I find the code for the corrupted by the sfc scan files?

    I'm new to computers and I'm not aware about many of these things, I have a laptop Dell Inspiron 1545 with a Vista Home Premium operating system on a 64-bit platform, I did a sfc scan and it found 8 files corrupted. I have also a code will correct corrupted files, but I don't know where to find the codes for the corrupted files to put in the code for fixing corrupted files. I found the log file for the corrupted files and it's the same as the instructions I had to use the code to fix the corrupted files but there is nothing in the log file that corresponds with the file name needed to repair the corrupted files. Where can I find these files? Thanks for any help.

    Hello

    Not sure what you mean by you have a code to solve those? Create a sfcdetails.txt and that you post a copy
    each section of a message here - they will repeat in order to do not post duplicate sections, as appropriate.

    ------------------------------------------------------------

    Many files that SFC cannot resolve are not important.

    Start - type in the search box-> find CMD in top - click right on - RUN AS ADMIN

    put the command from below (copy and paste) in this box and her and then press ENTER.

    findstr/c: "[SR]" %windir%\logs\cbs\cbs.log > sfcdetails.txt

    who creates the sfcdetails.txt file in the folder that you are in when you run it.

    So if you're in C:\Windows\System32 > then you will need to look in that folder for the file.

    How to analyze the log file entries that the Microsoft Windows Resource Checker (SFC.exe) program
    in Windows Vista
    http://support.Microsoft.com/kb/928228

    This creates sfcdetails.txt in C:\Windows\System32 find and you can post the errors in a message
    here. NOTE: there are probably duplicates so please only post once each section error.

    You can read the newspaper/txt files easier if you right click on Notepad or Wordpad then RUN AS ADMIN - then
    You can navigate to sfcdetails.txt (in C:\Windows\System32) or cbs.log (in C:\Windows\Logs) as needed.
    (You may need to search sfcdetails.txt if it is not created in the default folders.)

    I hope this helps.

Maybe you are looking for

  • Could not find the wifi on 2006/2007 mac pro antenna cables

    I just installed an Airport card in my Mac Pro to 2006 but I can't find the antenna inside the case cables? Does anyone know where they would be located? Included with every Mac Pro models, or is mine were too old for this? I have experience with thi

  • HP TouchSmart 300

    Every time I click on Internet Explore a prompt appears at the bottom of the screen that says "only Secure Content is displayed.  How can I get this to stop? or disable invites him so I x it out every time?

  • Stop error blue screen

    I did experience windows restarts due to the stop as 000000 c 2 or 100008e error. First I reinstalled windows and all adjacent software, but it seems that the problem is to hit me again. Last week I have connected my laptop to the internet and since

  • 9211 with new support files

    Hello! I'm learning module 9211 and I used the start-up 9211-example and it worked but readings had been arrested with two degrees. Then I found this: http://digital.ni.com/public.nsf/allkb/AAEC7BF96A019EFB862570E4006D9204 I downloaded the file, repl

  • How can I connect to my sony wifi new tv to my pc using a wireless connection its not having

    How can I connect my new Sony Bravia WIFI active TV to my computer via WiFi, my system is vista. I connect fine with my ipad