How can I code for a click and drag to progress forward/backward in timeline

I'm working on a project, the goal is to have a .swf animation like this.
The functionality I'm looking for is:
1. I need my animation to make one full rotation and stop,
and then
2. I need to fix my AS3 so you have to CLICK/HOLD/DRAG to progress forward and backward through the timeline, but only when your holding the mouse button down.
Currently the code progresses the frame forward and backward in relation to the mouseX position.
Here is my current code:
import flash.events.MouseEvent;
var startPosition:Number=mouseX;
var delayTime=10;
gotoAndStop(1);
stage.addEventListener(MouseEvent.MOUSE_MOVE, onMouse);
function onMouse(e:MouseEvent):void{
    stage.removeEventListener(MouseEvent.MOUSE_MOVE,onMouse);
    var currentPosition:Number=mouseX;
    if(mouseX-startPosition<=0){
        nextFrame();
    }else{
        prevFrame();
    setTimeout(setListener, delayTime);
function setListener(){
    startPosition=mouseX;
stage.addEventListener(MouseEvent.MOUSE_MOVE,onMouse);
any help would be appreciated,
Thanks.

Found a thread much like this one that solved all my problems
Here the link to anyone who might be pulling their hair out trying to figure this out in the future
http://forums.adobe.com/thread/570903?tstart=0
Thanks Adobe Forums

Similar Messages

  • How to write code for page up and page down buttons on alv screen?

    Hi,
    Page up and page down buttons are not working in general alv report. Thease buttons are in disable mode. But is stnd. transactions (tcode : fbl5n)  these are enabled and working properly, but we can't debug this with /h
    How to write code for page up and page down buttons on alv screen?

    Poonam,
    On doing the screen debugging it took me over to    Include LSTXWFCC ,kindly check the below code.
    module cc_display.
      fcode = sy-ucomm(4).
      case sy-ucomm(4).
        when 'P--'.
          perform cc_firstpage.
        when 'P-'.
          perform cc_prevpage.
        when 'P+'.
          perform cc_nextpage.
        when 'P++'.
          perform cc_lastpage.
        when 'EX--'.
          perform cc_firstcopy.
        when 'EX-'.
          perform cc_prevcopy.
        when 'EX+'.
          perform cc_nextcopy.
        when 'EX++'.
          perform cc_lastcopy.
    I guess it can give you some lead.
    K.Kiran.

  • On OSX 10.5.8 and I can't cut & paste or click and drag, HELP!

    Hi all,
    Please help! I can no longer click and drag icons or cut and paste.  I'm running OSX 10.5.8 on an '07 macbook, and I really do not want to loose everything, is there a solution???  At the same time I have had a little trouble with the net and downloading files.
    Is there a fix??  I'm desparate

    Could be many things, we should start with this...
    "Try Disk Utility
    1. Insert the Mac OS X Install disc, then restart the computer while holding the C key.
    2. When your computer finishes starting up from the disc, choose Disk Utility from the Installer menu at the top of the screen. (In Mac OS X 10.4 or later, you must select your language first.)
    Important: Do not click Continue in the first screen of the Installer. If you do, you must restart from the disc again to access Disk Utility.
    3. Click the First Aid tab.
    4. Select your Mac OS X volume.
    5. Click Repair. Disk Utility checks and repairs the disk."
    http://docs.info.apple.com/article.html?artnum=106214
    Then try a Safe Boot, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, reboot when it completes.
    (Safe boot may stay on the gray radian for a long time, let it go, it's trying to repair the Hard Drive.)

  • What will make it so you can't move objects by click and drag even though they are not locked?

    I have been using the cc 2014 version for awhile now and this morning  when I select an object with the selection tool, I can't freely move it by click and drag. The object will move with the arrow keys and can be aligned with the alignment tools.

    Does it have a fill of None? Maybe you're trying to select the object on its "fill" but if there's no fill, it does not get selected.

  • How can I search for email senders and/or email subject(s)?

    I'm probably not savvy enough to figure this out. When I search, e.g. for "Katie" I get to look at several messages where she is cc'd. I also receive messages from "Katie." How do I search for them? I know they are there because I just sent one to trash the other day. I suspect there are a number of them in trash. The only way I seem to be able to access them is to scroll...and that's a bummer.

    Hello.
    *You can click in the search field in the ThunderBird toolbar.
    *Type the words you are looking for such as email the email address
    *Hit enter or select an auto completion choice
    To narrow search results:
    *Click any year, month or day to show only results from that time. Click the looking glass to zoom out.
    *If you cannot see the timeline, click the timeline icon in the top right corner.
    *Hover over any filter, person, folder, tag, account or mailing list in the left pane to see where in time and on the timeline the messages matching the filter are located.
    To exclude persons, folders or other criteria from search results:
    *Click the unwanted person, tag, etc..
    *Select can't be… from the menu that comes up.
    To reduce results to a particular contact, account or other criterion:
    *Click the desired person, folder, etc..
    *Select must be… from the menu that comes up.
    To filter your search results:
    *Check From Me to see only messages sent from one of your email addresses.
    *Check To Me that include you as a recipient.
    *Check Starred to see only starred messages.
    *Check Attachments to see only messages that include attached files.
    To open any message, click its subject line in search results. To act on multiple messages or see more details, click Open as list at the top of the results list.
    I got this from [http://email.about.com/od/mozillathunderbirdtips/qt/Search_Mail_in_Mozilla_Thunderbird.htm here]. Go ahead and click that link if you need anymore help! Cheers.

  • How can I format for both Mac and PC and keep software updated?

    I have a dilemma. I need to be able to have the iPod formatted for use with both a Macintosh and PC so I can use it as a hard disk on both Operating Systems. The dilemma? I will be "Administering" the iPod and iTunes Music Library at home on a Macintosh.
    How do I update the iPod software as new updates become available on an iPod formatted for PC? The thing to know is that I don't have the option to update it on a PC as the only PCs I have access to are at work and I'm not allowed to install iTunes.
    Any ideas?

    You cannot format the iPod for a PC outside of iTunes on a PC while retaining the capability to use the iPod as a music player. If you can't install any software on the work PCs, your best solution may be to use an USB flash drive for transferring files and leave the iPod in the Mac format.
    (25091)

  • How can i perform the right click and double click operation in ipad.

    I have an email application i.e web application working fine in desktops, in that application if i will double click on the mail that mail will be open, and after opening that mail if i will right click on the mail it will show the different functionality .
    But i cant do that in ipad, is there solution to this problem ????

    mm.thejeshwini wrote:
    That application is a web-based application and the desktop version of the application has the functionality to open or pop-up a new window when double clicked on a particular text and now i want the same functionality to be performed on ipad. And some functionality to be worked for right-clicked also.
    I understand what you have and what you want. However, the iPad is not a desktop computer. What you want may not be possible. The developer may have already created an app specifically for the iPad. Have you checked the App Store?

  • Flash 8 Pro can't code for flash 9 and AS 3?

    Original post here was deleted before responses showed up to
    this thread. Since there were responses hours after I deleted this
    I am reinstating it with what the thread is about so others that
    may have similar question can see what responses there are.
    Sorry for confusion here.
    Thanks

    Hmmm.. I thought my post was whiney and wasn't worth it so I
    deleted it. After I did, there was responses hours later. I feel
    like an idiot now. LOL
    Thank you for your replies. I was unsure really what was
    going on, it looks like Adobe is taking flash to a new level and
    when they new version comes out next year if I can afford it, will
    be forced to invest in it. I think it is a bit much to have to
    reinvest in entire new software every one or two years though I
    understand now about the total redesign of flash engine.
    For those that didn't get to read my post that started this
    thread. I asked if us Flash Pro 8 users are out of luck with beign
    able to use the flash 9 and AS 3 features. I thought it would be
    nice to have a extension that allows version 8 to use version 9+
    but as the responses and what I have read, it is an entirely
    different animal.
    I hope though that once 9 comes out next year, the IDE not
    the player which came out few days ago, that it wil be software
    that will last more than a year or two without needing to upgrade
    to the next thing. The turn around on technology and trashing the
    old is a bit too fast for me especially when it means multiple
    thousand dollar investments. I guess upgrade discounts help..
    Anyway that was what my original thread was about.
    Thanks

  • How can i do for change my ipod touch 4g screen and how mutch it will cost?

    My screen is Craked how can i do for change it and how mutch it will cost ?
    Is it better buy a new ipod ?

    Check out-of-warranty service options in link below. It would be cheaper to repair.
    Basic troubleshooting steps  
    17" 2.2GHz i7 Quad-Core MacBook Pro  8G RAM  750G HD + OCZ Vertex 3 SSD Boot HD 
    Got problems with your Apple iDevice-like iPhone, iPad or iPod touch? Try Troubleshooting 101
     In Memory of Steve Jobs 

  • Can't right click and drag clips anymore?

    I recently started using version 3 and I can't get the right click and drag to work in multitrack view. I can't remember if it ever worked in this version, but it seems like these two things coincided. Am I missing something? Or could this be a different problem? I've checked and double checked, none of the clips are locked in time. All I wanna do is move files around!

    Out of the four possible cursors in MV, you need to use the first one (the Hybrid tool) if you want to right-click and drag.

  • Click and Drag not working with the trackpad....

    Well, this is an unexpected problem.
    Just this morning, it seems my computer is refusing to let me click and drag with the trackpad button. I can click and hold, but when I move my cursor, say in a menu, nothing is highlighted. For sliders for volume, clicking and dragging does nothing. I can't highlight text. It's getting very annoying. It won't work when I tell just the trackpad to click and drag as well (not using the button).
    My hands have been a little "waxy" since I've been sick, but the mouse works perfectly otherwise, so I don't think that's the problem at all. Any suggestions? Please tell me my 'book isn't goin' bad. >>;;

    That seemed to work! After shutting down and taking out the battery, I cleaned my keyboard and computer, too. Seems to work now Thanks!
    Wonder why it did it...a glitch, prolly...

  • How do I reorder songs in a playlist in the new itunes??? I can no longer just click and drag. When I click, it doesn't move!!!! Need help ASAP- trying to prepare for an aerobics class and need songs in a specific order!

    How do I reorder songs in a playlist in the new itunes??? I can no longer just click and drag. When I click, it doesn't move!!!! Need help ASAP- trying to prepare for an aerobics class and need songs in a specific order!

    Vera,
    Use View > View Options, and set 'Sort By" to "Manual Order."
    Then you will be able to drag-n-drop songs up and down the list.

  • How can i disable a submit button and execute submit_action method on click

    Good Day,
    On my page I have a submit button that execute the submit_action method of the page backing bean that submit data captured on the page into a database and activate another class that send mail at the same time on a click of the submit button,the mail process takes a while before returning back to the page.I was able to disable the submit button to prevent the user from keep click while the process is running but the issue is on clicking the submit button it only disable the submit button without executing the submit_action method of the page backing bean.How can i disable the submit button and execute submit_method of the backing bean at the same time.
    Thanks in advance.

    I tried this out on one of my pages to see if it works.
    First, I added the following JavaScript to my submit button's onClick event:
    this.disabled=true; return true;When I clicked the submit button, it was disabled but the form was not submitted.
    I deleted the JavaScript from the onClick event and added the following JavaScript to the form's onSubmit event:
    var button = document.getElementById("form1:submitButton"); button.disabled=true; return true;When I click the submit button, it was disabled and the form was submitted but the button's action method was not called.
    The next thing I tried was to change the onSubmit event code:
    var button = document.getElementById("form1:submitButton"); setTimeout("button.disabled=true", 500); return true;This seemed to work. The difference was that I added a 1/2 second delay before disabling the button.
    See if that works for you. If not then I'm fresh out of ideas.

  • How can I code to play audio continuously from page to page in iBooks for reflow ePub

    Hi,
    I have tried and successfully completed the iBooks ambient soundtrack option in Fixed Layout ePub. It works fine.
    But while trying the same in Reflow ePub, it is not working in iPad iBooks. I have latest iBooks version and latest iOS version in my iPad.
    Please let me know how can I code to play audio continuously from page to page in iBooks for reflow ePub?
    Thanks,
    Sundaram

    As soon as the user turns to the next page, the audio stops.
    That's how it works in all cases.
    the book is a read aloud book.
    See the 'How-To Read Aloud' section in iBA Tips and Tricks 01

  • Last week I've install Mac OS X Mountain Lion and then after the installation finish my IMAC start up in verbose mode. How can I turn off this mode and start my IMAC normally. I've try to key in the code "sudo nvram boot-args=" in terminal also.

    Last week I've install Mac OS X Mountain Lion and then after the installation finish my IMAC start up in verbose mode. How can I turn off this mode and start my IMAC normally. I've try to key in the code "sudo nvram boot-args=" in terminal also.
    Thank you for all of your answer.

    I've seen it mentioned on here that a PRAM reset may solve it:
    Reset PRAM
    Shut down the computer.
    Locate the following keys on the keyboard: Command, Option, P and R.
    You will need to hold these keys down simultaneously in step 4.
    Turn on the computer.
    Press and hold the Command-Option-P-R keys. You must press this key combination before the gray screen appears.
    Hold the keys down until the computer restarts and you hear the startup sound for the second time.
    Release the keys.

Maybe you are looking for

  • Z97 Gaming 9 AC - How ASIO driver work?

    Hi everyone. Some week ago, i wrote about the 'not working' ASIO driver. This was because some driver issue, fixed with the latest driver release. So now, ASIO device is detected from software like Ableton or Foobar. Fine. Now the main question is: h

  • Error of PO - "Purchase Order Does not exists"

    Dear Experts, Here i am facing one error of Purchase Order Creation and its further processing. I have created purchase order and saved it, system issued message that, Purchase Order XYZ is created. (I have taken trial for 2-3 Purchase orders). When,

  • Acrobat 9 gives an error message when I try to open it.

    I've been using Acrobat 9 Standard on my Windows 7 laptop for 2-3 months without a problem, but now when I open Acrobat 9, it gives me an error message "Licensing for this product has stopped working" and shuts down.  It happens when I try to open a

  • Delete record error really bad...need help

    Hi, I am trying to delete a record but the process is taking too long then it crashes mysql and give this: Warning: mysql_connect() [function.mysql-connect]: Can't connect to  MySQL server on 'localhost' (10048) indb.php on line 9 Fatal error: Can't

  • How to add  new column in VA02?

    I want to add a new column before the column posnr in VA02/VA03 which will be non editable.