Calendar AS3 with the position of the mouse control.

Hi everyone, thanks in advance to the community for any help you might be able to offer, it's all the incredably appreceated.

It is a problem which had scratching me my head for months and be a facilitator, was really stretching my AS3 skills a bit.

I create an interactive story of sorts and what is needed is to use the horizontal position of the mouse to scroll forward or backward on a timeline that is, when the mouse is in the dead center of the stage that the playhead does not move, but once he deveates right centre of the read head moves forward and plays the animation and a Once it moves to the left the read head begins to move backwards.

Ideally I would have an acceleration effect, where the animation scrolls while the timeline at a minimum speed when the mouse is always close to the Center but at a faster rate once it is reached the edges, but right now, it is a secondary concern.

There are also keys to move through various scenes, I can code myself, I only mention this in case it affects the rest of the code.

Thanks for you help and any solutions or navagating alternitive methods a timeline are welcome indeed

I'll be sure to pass on the karma to an area im more familiar with.

var mc:MovieClip = MovieClip (this);  //<- timeline="" you="" want="" to="" control="" with="" mouse="">

var maxScrollSpeed:int = 100;  / s max for mc above

var m:Number;

var b:Number;

var prevFPS:int;

paramF(0,-maxScrollSpeed,stage.stageWidth,maxScrollSpeed);

this.addEventListener (MouseEvent.MOUSE_MOVE, scrollF);

function scrollF(e:Event):void {}

var fps:int = Math.round(m*mouseX+b);

{if(prevFPS&&prevFPS!=FPS)}

{if(FPS!=0)}

{if(FPS>0)}

playF (mc, mc.currentFrame, mc.totalFrames, fps);

} else {}

playF(mc,mc.currentFrame,1,-fps);

}

} else {}

stopF (mc);

}

}

prevFPS = images/second.

}

function playF(mc:MovieClip,_m:int,_n:int,_fps:int):void {}

var playFFF2:Function = {function(mc:MovieClip):void}

If (mc.m

mc.nextFrame ();

} else {}

mc.prevFrame ();

}

If (mc.currentFrame == mc.n) {}

clearInterval (mc.int);

}

updateAfterEvent();

};

MC.m = m;

MC.n = n;

MC. FPS = FPS;

mc.gotoAndStop (mc.m);

clearInterval (mc.int);

MC.int = setInterval (playFFF2, 1000/mc.fps, mc);

}

function stopF(mc:MovieClip):void {}

clearInterval (mc.int);

}

function paramF(x1:Number,y1:Number,x2:Number,y2:Number):void {}

m =(Y1-Y2) /(x1-x2);

b = y1 - m * x 1;

}

Tags: Adobe Animate

Similar Questions

  • Drawing line with the mouse clicks on picture indicator

    Hello

    I need to import a JPG file in an image control, draw a line in 2 clicks, read bothe XY positions and perform some basic trigonometry. Any simple or striaghtforward way to draw the line with the mouse and read thos passay on the bitmap (positions relative pixel)?

    Thanks in advance,


  • Dragging points in the chart with the mouse

    Hello

    I would like to ask if any Graph control NOR for .net enables drag and shift the points on the graph with the mouse.

    Here's the simple example to describe what I'm thinking:

    If there is no such functionality, can be implemented and if it cannot, in such a way?

    a.h.

    Hello

    It seems that you may be heading in a different direction, but I thought I would offer my 2 cents.  One possibility would be to update the point in the data table based on the position of the mouse in the MouseMove callback and replot then data.  Although it may not fully satisfy all your needs, below is a simple example of how to proceed.  If all goes well, it may be of some use to you.

    partial class Form1: Form
    {
    xData private Double [] = {2, 4, 7, 8, 5, 4, 2};
    Private Double [] yData = {5, 8, 9, 6, 3, 2, 5};

    private int pointIndex;

    public Form1()
    {
    InitializeComponent();
    }

    private void Form1_Load (object sender, EventArgs e)
    {
    scatterGraph1.PlotXY (xData, yData);
    }

    Private Sub scatterGraph1_MouseDown (ByVal sender As Object, MouseEventArgs e)
    {
    xPoint double;
    Double yPoint;

    scatterPlot1.InverseMapDataPoint (scatterGraph1.Bounds, Object, out xPoint, out yPoint);
    This XYCursor is transparent in color and it is
    SnapMode has the NearestPoint value
    xyCursor1.MoveCursor (xPoint, yPoint);
    Cursor.Current = Cursors.Hand;
    }

    private void scatterGraph1_AfterMoveCursor (object sender, NationalInstruments.UI.AfterMoveXYCursorEventArgs e)
    {
    pointIndex = xyCursor1.GetCurrentIndex ();
    }

    Private Sub scatterGraph1_MouseMove (ByVal sender As Object, MouseEventArgs e)
    {
    xPoint double;
    Double yPoint;

    If (get_Cursor is Cursors.Hand)
    {
    scatterPlot1.InverseMapDataPoint (scatterGraph1.Bounds, Object, out xPoint, out yPoint);
    xData [pointIndex] = xPoint;
    yData [pointIndex] = yPoint;
    scatterGraph1.PlotXY (xData, yData);
    }
    }

    Private Sub scatterGraph1_MouseUp (ByVal sender As Object, MouseEventArgs e)
    {
    Cursor.Current = Cursors.Default;
    }
    }

    NickB

    National Instruments

  • Open submenus when I stop on them with the mouse pointer does not work

    I used to use Vista Upgrade of XP until it hit the big time. With this installation, the option 'Open submenus when I dwell on them with the mouse pointer' worked perfectly well.  Since I did a format and installed the full installation of Vista version, and now this feature does not work. I checked and re-checked the option in the customization of the menu star and nothing. Also unable to find what anyone at the mouse settings itself.

    Does anyone know how to get this feature to work again once it's something I use a lot.

    Concerning

    Owen

    Hello

    If none of these help or you find a solution please report.

    Does work here on Vista either, but I don't want it works even if it is checked.

    Try UnChecking the start - Customize - Menu tab apply / OK and then go back and save
    Apply / OK.

    If no joy this initiative will eventually.

    Follow these steps to remove corruption and missing/damaged file system repair or replacement.

    Run DiskCleanup - start - all programs - Accessories - System Tools - Disk Cleanup

    Start - type in the search box - find command top - RIGHT CLICK – RUN AS ADMIN

    sfc/scannow

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

    Then, run checkdisk - schedule it to run at next boot, then apply OK your way out, then restart.

    How to run the check disk at startup in Vista
    http://www.Vistax64.com/tutorials/67612-check-disk-Chkdsk.html

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

    Maybe something here: [check Control Panel - mouse or TouchPad (as applicable)]

    If a mouse (or if you use a touch screen and a mouse)

    Start - computer, or Windows Explorer - Tools - Folder Options - general tab - check the
    Single click to open an item - APPLY / OK

    Control Panel - mouse - look for hover or click Automatic similar settings according to your mouse.

    When a TouchPad

    Look in the Notification area next to the clock for all TouchPad control program.

    Control Panel - mouse - also look for it TouchPad (mine is on the device however settings tab
    other brands and maybe on the other tabs and more than one). There are usually the parameters that
    can determine if a click, double click, hover or can open or close a program.

    Start - computer, or Windows Explorer - Tools - Folder Options - general tab - check the
    Single click to open an item - APPLY / OK

    If some people are well positioned can change to some other setting if you plan to leave
    them that way and then change again.

    I hope this helps.

    Rob Brown - MS MVP - Windows Desktop Experience: Bike - Mark Twain said it right.

  • Can not enter master password from the keyboard, but can copy with the mouse.

    I use gentoo and installation using portage. Firefox-31, 7 is fine, but firefox-36, firefox firefox-37-38 are cannot enter Masterpassword key, now I use firefox - 38.0.5,.
    When you create the user on this web site, password is can not enter key, so I copy with the mouse.
    I check if a new version is announced for portage (gentoo), check, but once firefox-36 can not enter password to key, even they seem.

    Note that Firefox uses its own storage of password (logins.json and key3db) and not the keychain Linux (hippocampus) application.

  • I can't get the tabs to work, opening with the mouse, cannot be closed only in groups that market

    I was obliged to upgrade of hate, has lost most of my applications, cannot get tabs to work, cannot change the tabs with the mouse, cannot close the tabs,
    UNLESS I go to the tab and then group I have a button close the tab or change the tabs but that is a huge pain. Yes, I opened
    tabs mix more and ticked all the boxes, closed, reopened, restarted nothing works

    Well, don't ask me why, but I logged in today and everything works
    don't know why or how but tabs suddenly works, so if anyone has this problem I don't know how to tell you to fix said WVREDNECK

    I was obliged to upgrade of hate, has lost most of my applications, cannot get tabs to work, cannot change the tabs with the mouse, cannot close the tabs,
    UNLESS I go to the tab and then group I have a button close the tab or change the tabs but that is a huge pain. Yes, I opened
    tabs mix more and ticked all the boxes, closed, reopened, restarted nothing works

  • How to scroll through the tabs with the mouse wheel?

    I used to be able to scroll the selection of tabs when the tab bar is filled using my wheel mouse (like the arrows on each side navigation), but recently it changes the tab I look as if I physically clicked on this subject.

    I'd appreciate help on how to make it work as he did.

    That should still work if you hover over with the mouse, the tab bar.

    Make the scroll buttons on the tab bar work?

    You have maximized the window of Firefox?

    Start Firefox in Safe Mode to check if one of the extensions (Firefox/tools > Modules > Extensions) or if hardware acceleration is the cause of the problem (switch to the DEFAULT theme: Firefox/tools > Modules > appearance).

    • Do NOT click on the reset button on the startup window Mode without failure.
  • Scrolling with the mouse on the pages to create black and white, lines

    When scrolling with the mouse, periodically the entire screen turns into black and white lines. Page sometimes together, sometimes just from ads pictures/side. If you continue to scroll disappear but you need to scroll to where the lines have begun, it's hard to explain, I took 1 picture of the problem but will have more photos that I can, I love how Firefox works on my computer, it has always been the best browser for my needs. I recently bought a new desktop computer, but he did so also, so I deleted and tried to launch the Explorer and Google and I don't like, so I hope that we can settle this problem.

    I don't know if it solved the problem, but he didn't precisely these days. Thank you

  • When the page opens, the scroll bar appears only if I move to bottom of page with the mouse

    It started last week with Firefox 5 and continues with the upgrade to Firefox 6. Each new page that opens in Firefox does not display a scroll bar. By entering the lower right of the page with the mouse and move the mouse to the right, the scroll bar appears and is usable. This "correction" is required on each new page.

    This condition looks similar to the condition met when Firefox 5 was introduced. The fix was to open appearances in tools then choose the default setting. This patch doesn't work anymore.

    Troubleshooting extensions and themes

    Check and tell if its working.

  • Have no control with the mouse on my Satallite P300-123

    I have a problem with my mouse on the laptop. When I use the mouse, the mouse is every time left right up down.
    So I have no good control with the mouse.

    Can someone help me with this probem?

    (Sorry for my English)

    Hello

    Do you use the touch pad or external mouse?
    If you use an external mouse disable touchpad by using the FN + F9 key combination, especially when you use the keyboard.

  • Scrolling with the mouse 5.1 BootCamp

    Scrolling with the mouse stopped working all of a sudden on BootCamp 5.1.

    Do you have any active Windows automatic updates?

  • Pavilion/product #: B3F79AV #ABA / pc starts fast scrolling/no control with the mouse

    my hp Pavilion began to have "spells where the page suddenly begins to scroll. I can't control it with the mouse. I have installed norton. It seems no matter what the content of the page is this scroll occurs. Scrolling is very rapid. Does anyone know what it is and how to fix it? Thank you.

    Glad to know that!

    If you need assistance with your Norton product, please let us know. We are happy to help you!

    Thank you!

    Vineeth

    Norton support

  • With the mouse to draw the edges of a XY Chart to calculate the perimeter and area of him

    I have signals from a stabilometer... I traced X in terms of y in a XY Chart and I want to know how I can draw with the mouse a circle linking most of the points that is the graph of X on Y and calculate the area of her more perimeter. I joined my program labview with two files X and Y

    LV 2009 Version attached.

  • Vertical scrolling with the mouse, Microsoft 6000

    Is that what someone has encountered a problem with the mouse to move the front/diagram of block vertically scrolling panel.  Scroll wheel on the mouse works fine for all other applications, but is very intermittent in LabVIEW 2009.  I'm on a windows 7 OS.

    I tried a series of 5000 ms and that works well.  Any ideas?

    Thank you

    Hi Marc, I reduced the problem by not including not not a software startup in msconfig setup.  Then I discovered the mouse to operate as usual, sort of method of disposal, I reduced to a pointer unwanted facility that I deselected and then ran as usual.  All is well now.

    Thank you

  • I have a Logitech M315 keyboard and bought a new mouse Logitech M325 compatible. I cannot now typing on the keyboard, but I can scroll with the mouse.

    I have a Logitech M315 keyboard and bought a new mouse Logitech M325 compatible. I cannot now typing on the keyboard, but I can scroll with the mouse.

    Hello

    The M325 Nano-receiver allows you to connect up to 6 devices however you
    need a Logitech utility (free download) to achieve this. Check with Logitech
    Their online documentation, support and drivers, utilities and ask in their forums.

    I don't know if that keyboard and mouse are compatible.

    Software Logitech Unifying M325
    http://support.Logitech.com/product/wireless-mouse-M325#download

    Logitech
    http://www.Logitech.com/en-us/home

    Logitech - Support
    http://www.Logitech.com/en-us/support

    Logitech - Forums
    http://forums.Logitech.com/

    I hope this helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle="" -="" mark="" twain="" said="" it="">

Maybe you are looking for

  • How can I reduce the size of the file of my jpeg files.

    I'm trying to reduce the size of my original photos to download to a newspaper.  I tried to do in the preview but I have not one "save under" under my list of file in the menu drop down and I don't want to change my original photos.  Another thing th

  • Satellite 2180cdt suddenly stops

    Hello! I have a Satellite 2180CDT that when it is at room temperature and you install a program, it suddenly shut down and he won t start again until it has cooled. It also happens that he's hanging in the middle of an installation, so you must resta

  • Portege 7200 pci missing scsi controller

    Can someone help me with the following problem. One of my friends was a protégé of 7200. He had reinstalled it by Toshiba. Now when it boots up it it aks for bus pci scsi controller drivers. Because he probably needs to access its external cd-rom dri

  • The "maps" APP, how to remove blue highlight on the satellite, 10.11.3 image?

    How remove blue highlight image on satellite image "cards"? El Capitan 10.11.3 running

  • Satellite A10 - boot priority must be changed

    Hello world I have an old Satellite A10 here, and I'm supposed to put a new operating system on it.Problem: He doesn't let me boot from the CD/DVD!In the BIOS (APCI BIOS version = 1.30), I can not change the boot priority, which is I can not put the