across the circle when the mouse is idle?

When the mouse is idle, dynamically create a circle and a scale. the scale must depend on the duration of inactivity mouse... so here I could not put the circle wide, but all others are made. put the code here. Please check and give me the solution to fix this problem. Thanks fo the help...

CODE.................

import flash.display.MovieClip;

Import fl.transitions.Tween;

Import fl.motion.Tweenables;

Import fl.transitions.easing.Strong;

Import fl.transitions.easing.None;

import flash.display.Sprite;

import flash.events.MouseEvent;

import flash.events. *;

import flash.utils. *;

var tweenScaleX: Tween;

var tweenScaleY: Tween;

var scalecir;

var i = 1;

var for_knw:Boolean = false;

var inactiveTime:int;

var t:Timer;

switcher var: int = 0;

var posXa:Number = stage.mouseX;

var posYa:Number = stage.mouseY;

var posXb:Number = stage.mouseX;

var posYb:Number = stage.mouseY;

inactiveTime = 1000;

t = new Timer (inactiveTime);

stage.addEventListener (MouseEvent.MOUSE_MOVE, stall);

t.addEventListener (TimerEvent.TIMER, onTimer);

t.Start ();

function startt(e:MouseEvent):void {}

t.Reset ();

t.Start ();

}

function onTimer(e:TimerEvent):void {}

trace ("Secnds inactive mice:" + i ++);

}

this.addEventListener (Event.ENTER_FRAME, checkMovement);

function checkMovement(e:Event):void

{

If (switcher == 0)

{

posXa = stage.mouseX;

posYa = stage.mouseY;

Switch = 1;

}

on the other

{

posXb = stage.mouseX;

posYb = stage.mouseY;

Switch = 0;

}

var cir:Sprite = new Sprite();

cir.graphics.beginFill (0x0066CC);

cir.graphics.drawCircle(mouseX,mouseY,2);

cir.graphics.endFill ();

If (posXa == posXb & & posYa == posYb)

{

addChild (cir);

tweenScaleX = new Tween (cir, Tweenables.SCALE_X, None.easeNone, cir.scaleX, i, 1, true);

tweenScaleY = new Tween (cir, Tweenables.SCALE_Y, None.easeNone, cir.scaleY, i, 1, true);

}

on the other

{

stage.addEventListener (MouseEvent.MOUSE_MOVE, startDraw);

function startDraw(e:MouseEvent):void

{

i = 1;

graphics.lineTo (mouseX, mouseY);

graphics.lineStyle (1, 0 x 000000);

graphics.moveTo (mouseX, mouseY);

}

}

}

I don't see the need for the i value, but if you want to keep it, you can and you can use instead the end point for the value of the scale of the tween, as in...

tweenScaleX = new Tween (cir, "scaleX", None.easeNone, cir.scaleX, i, 1, true);

To have the circle grow over time, you have to shoot the declaration circle out of the loop so that it is accessible to the Timer event handler function.  You can use the timer event handl. er function to take care of the scaling of the circle and settle the interpolation of...

import flash.display.MovieClip;
Import fl.transitions.Tween;
Import fl.transitions.easing.Strong;
Import fl.transitions.easing.None;
import flash.display.Sprite;
import flash.events.MouseEvent;
import flash.events. *;
import flash.utils. *;

var tweenScaleX: Tween;
var tweenScaleY: Tween;
var scalecir;
var i = 1;
var for_knw:Boolean = false;
var inactiveTime:int;
var t:Timer;

switcher var: int = 0;
var posXlast:Number = mouseX;
var posYlast:Number = mouseY;

var allowDrawingCircle:Boolean = true;

inactiveTime = 1000;
t = new Timer (inactiveTime);
t.addEventListener (TimerEvent.TIMER, onTimer);
t.Start ();

function onTimer(e:TimerEvent):void {}
i ++ ;
   tweenScaleX = new Tween (cir, "scaleX", None.easeNone, cir.scaleX, cir.scaleX + 1, 1, true);
tweenScaleY = new Tween (cir, "scaleY", None.easeNone, cir.scaleY, cir.scaleY + 1, 1, true);

}

this.addEventListener (Event.ENTER_FRAME, checkMovement);

var cir:Sprite;

function checkMovement(e:Event):void
{
If (posXlast == mouseX & posYlast == mouseY)
{
{if (allowDrawingCircle)}
allowDrawingCircle = false;
   
    CIR = new Sprite();
CIR.x = mouseX;
CIR.y = mouseY;
cir.graphics.beginFill (0x0066CC);
cir.graphics.drawCircle (0,0,2);
cir.graphics.endFill ();
   
addChild (cir);
}
} else {}
allowDrawingCircle = true;
}
         
posXlast = mouseX;
posYlast = mouseY;

}

stage.addEventListener (MouseEvent.MOUSE_MOVE, startDraw);
function startDraw(e:MouseEvent):void
{
t.Reset ();
t.Start ();
i = 1;
graphics.lineTo (mouseX, mouseY);
graphics.lineStyle (1, 0 x 000000);
graphics.moveTo (mouseX, mouseY);
}

Tags: Adobe Animate

Similar Questions

  • The mouse loses the Bluetooth connection when left idle

    I'm suddenly having a problem where the bluetooth mouse that works off the preinstalled Toshiba bluetooth stack.
    loses the connection when left idle for a little while.

    This was not the case before.

    What could cause this?
    I just changed the batteries in the mouse, so it's not the question.
    Any ideas?

    It is the forum on Toshiba laptops.
    If you have a laptop from another manufacturer, then you should visit the website of the manufacturer of your laptop

    In any case, the stack of BT from Toshiba page is the most recent which is available on the market, so it should work on your laptop.

  • How to stop the circle of blue on the mouse pointer when the machine turns off

    Regarding Photosmart 5510e printer all in one product No.CQ183B... Model No.B111h... Serial number {content removed}

    Cannot get rid of the attatched blue circle to the pointer of the mouse when the computer is turned off, because it is the noisiest printer that I have ever bought, it even guard the neihgbours awake. Thers seems there have much the same complaint of the HP printer owners concerning the blue circle. Advice please, thank you jh

    Most likely the computer is looking for the printer for features such as Scan computer and alerts the ink. Disable these features should stop the blue circle of projection. Double-click the printer on the desktop icon to open the Printer Wizard. Double-click the ink level chart found at the top of the window. Click the Advanced tab. Under Alerts ink make sure the box "only when I print" is selected, and then click close at the bottom of the window. Double click on manage the Scan of the computer. Click on disable. Close all open windows. This should stop the computer from looking for the printer when it is turned off. Let me know what happens.

  • Keyboard stops working when the computer is idle

    I have an ASUS desktop and windows 7.  When the computer is idle for a few minutes, the keyboard farm operation.  The mouse works fine.  Tried a new keyboard and no solution.  Tried a different USB port and the same thing.  If I restart my computer, it works fine until it is idle for a few minutes and then stops again.  Really frustrating.  any ideas?

    Original title: keyboard closed unexpectedly

    Hi Majohnson,

    Thanks for posting your query in Microsoft Community.

    I imagine the inconvenience that you are experiencing and will certainly help you in the right direction to solve the problem. However, I would be grateful if you could answer a few questions to refine the question in order to provide you with better assistance.

    1. This is not the exact model. your ASUS computer?
    2. The issue has started happening recently? If so, did you do the computer-specific changes before this problem?

    The question could arise is there some problem of corruption of pilot partners or a third party service interferes with the function of the normal keyboard. In order to diagnose and resolve the issue, I would suggest trying the following methods and check if the problem persists.

    Method 1:

    Try to start the system in safe mode and check if the number is reproduced. If this isn't the case, then clean the computer starts and check if that helps.

    Step 1:

    Safe mode is a diagnostic mode in which you are connected with only the minimal necessary services and active pilots. Check if the number is reproduced.

    Start your computer in safe mode

    Step 2:

    Place your system in the clean boot state helps determine if third-party applications or startup items are causing the problem. You must follow the steps in the article mentioned below to perform a clean boot.
    How to perform a clean boot in Windows

    Note: See "how to reset the computer to start normally after a boot minimum troubleshooting" to prepare the computer to start as usual after a repair.

    If the problem persists, try the following method.

    Method 2:

    If you have any security software installed on your computer, try to temporarily disable the security software and check if the key words work properly. Subsequent update of the security after a repair software.

    Disable the anti-virus software

    Warning: Antivirus software can help protect your computer against viruses and other security threats. In most cases, you should not disable your antivirus software. If you need to disable temporarily to install other software, you must reactivate as soon as you are finished. If you are connected to the Internet or a network, while your antivirus software is disabled, your computer is vulnerable to attacks.

    See method 3 for additional assistance on the issue.

    Method 3:

    Uninstall and reinstall the drivers USB controllers. Use Device Manager to uninstall and reinstall all USB controllers. This allows controllers to recover the port USB of his condition does not respond. USB controllers represent the USB ports in Device Manager.

    1. Open Manager devices by clicking the Start button, click Control Panel, click system and security, and then, under System, clicking Device Manager. If you are prompted for an administrator password or a confirmation, type the password or provide confirmation.
    2. In the list of the categories of equipment, locate and expand Bus USB controllers.
    3. Right-click every device under the Bus USB controllers node and then click Uninstall to remove them one at a time.
    4. Restart the computer and let the USB controllers get reinstalled.
    5. Plug in the keyboard and test to make sure that the problem is solved.

    For more information, please refer to:

    Updated a hardware driver that is not working properly

    Mouse, touchpad and keyboard with Windows problems

    Hope this information is useful. Let us know if you need more help, we will be happy to help you.

  • Synaptics message when accessing the mouse on the control panel.

    0

    Unable to connect to the Synaptics driver.
    If you have installed another PS/2 pointing Device Driver please uninstall the Synaptics Driver by clicking on the Yes button. You must then reinstall your device pointing to your external device driver again.

    When I type the mouse in the box search I get the message above on my Acer 5738z running under Windows 7 64-bit.

    If I select no then Synaptics box appears.

    Device is correct.

    This message box is important?

    Thank you.

    You should not be worried because the device works fine without any glitch.

    Uninstall and reinstall the drivers. You can upgrade to the latest drivers from acer support link:

    http://www.Acer.com/worldwide/support/download.htm

    Off-topic:

    While browsing for the solution, I came across this interesting link:

    https://customercare.Acer-euro.com/customercare/AcerUpdate.aspx?CID=GB&lid=Eng&iType=JV50

    You can get the number fixed as soon as POSSIBLE.

  • How doi get back my locked icon saying when the pc is idle

    How can I get my icon saying locked when pc slowed down? He lost

    The settings I gave you will achieve what you want.  When the PC is idle for the period indicated in the screen saver, the PC crashes and when you move the mouse or press a key to try to resume will show your user icon and you won't not resume until you have clicked on the icon.

    You can configure the PC to sleep instead of indulging in idle screen.  If this is what you want then substitute another step 1: -.

    1 the active {power plan} change plan settings, power, options change plan settings advanced, sleep, sleep after - choose a delay for battery & current alternative.

    You must then set the part of connection of this parameter in both

    2 power options, [on the left side of the window] require a password on wake up

    3 power options, plan {power} active settings change, change of plan avancΘs, [you will have to click on "view the currently hidden settings] {active power plan}, require a password on wake up.

  • Graphics performance - lost my points when my mouse on the graph of line in hover

    OK, it sounds a bit lame but, I lost my points when my mouse on the graph of line in hover. You know, the data points of small size that follows your cursor when you move your mouse across the graphic line...

    What should I do to recover / them?

    Interesting.  What happens if you change the tabs, then go back to the performance curve, then click inside the chart somewhere, then try pointing to the lines?

    -KjB

    VMware vExpert

  • A screensaver to close when the mouse moves

    Everything is fine with my screensaver, except that users have to click on the stage to leave... is it possible that I could detect if the mouse is moved at all and then quit? I guess that there is a way to save the mouseLoc in a variable when the screen saver starts then exit if this variable = anything other than it's the value of origin... just can not get quite...

    I hope someone can help - thanks!

    Thank you, but found another way...

    .. .created a very small bitmap circle and the loc value is the mouseloc at the start of the saver. Then added a behavior, telling him when to mouseleave leave me

  • When my Mac restarted the mouse arrow moves in order to type the password

    When my Mac restarted the mouse arrow moves so I can type my password

    I guess the mouse battery is fully charged and that the mouse work? You can see if the mouse is paired with your mac?

    You can also use the arrow keys + return to select a user to connect.

  • How can I stop Firefox toolbar pop up when the mouse is above the screen mode full screen (without kiosk mode, please)?

    I don't want the toolbar always there (so disable auto hide does not solve the issue). I would prefer a right-click or use a combination of keys to retrieve the toolbar. The toolbar arise at any time that the mouse is near the top of the screen is too distracting. It should be an option, users can enable or disable or card for anything other than the mouse hovering. The only solution I've seen mentioned is to go the full kiosk with something like R-kiosk, but it's really a too extreme solution to a simple problem. Is there a setting already hidden in the topic-config for this problem or is it a feature request? Thank you.

    There is no built-in way to disable this feature to display the toolbars when you move the mouse to the top.

    Add code to the file userChrome.css below default @namespace.

    @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */
    
    #fullscr-toggler { display:none!important; }
    

    The file userChrome.css (UI) customization and userContent.css (Web sites) are located in the folder of chrome in the Firefox profile folder.

    You can use this button to go to the current Firefox profile folder:

    • Create the folder chrome (lowercase) in the .default < xxxxxxxx > profile folder if the folder does not exist
    • Use a text editor like Notepad to create a userChrome.css (new) file in the folder chrome (file name is case sensitive)
    • Paste the code in the userChrome.css file in the Editor window
    • Make sure that the userChrome.css file starts with the default @namespace line
    • Make sure that you select "All files" and not "text files" when you save the file via "save file as" in the text editor as userChrome.css.
      Otherwise, Windows can add a hidden .txt file extension and you end up with one does not not userChrome.css.txt file
  • MacBook pro freezes when the mouse stops

    I have a very strange problem with my Macbook Pro 13 "Retina display.   When I login, the system freezes once I have stop moving the mouse.  If I permanently move the mouse, the system works, but if I stop moving for about 2-3 seconds, the system hangs and I have to force turned off using the power button.  I have troubleshooted all the way to the bottom for a pure install of El Capitan 10.11.6 but even after cleaning install it always does the same thing.  Of course, it looks like a HW problem but I just wanted to see if someone else has had this problem and if there was a solution that was not related to HW.

    mblas49 wrote:

    I have troubleshooted all the way to the bottom for a pure install of El Capitan 10.11.6 but even after cleaning install it always does the same thing.

    It would be more helpful if you listed what you've tried already, we can't look in your mind. But, run the Diagnostics to start.

    Diagnosis of Apple is not as complete as the software they use at the Apple Store, but it can pick up something. Depending on the age of your system, you'll use one or the other.

    https://support.Apple.com/en-us/HT202731

    Diagnosis - Apple Support

    Apple Hardware Test

    https://support.Apple.com/en-us/HT201257

  • When I click with the right button of the mouse on videos from facebook it shows no options for me to copy the link and etc.

    When I click with the right button of the mouse on videos from facebook it shows no options for me to copy the link and etc. It only shows the parameters for the flash player. How can I fix?

    You can find the URL of the thumbnail by following these steps:
    In the context menu, choose {inspect element}.
    Now, you can see the URL in the source down (perhaps you click the small arrow to the left of the line of seledted firstly to show).

  • Part of the browser screen will flash intermittently and when trying to select a link out of my drop-down lists, click with the mouse selects the link above it.

    These problems occur only when you use Mozilla Firefox. I am using a Lenovo Thinkpad:
    1 site Web seem to flicker on the images, videos, maps, when the mouse moves around the screen.
    2 pointing the mouse over a link in the browser and a left click activating the link above (if it exists)

    Do not experience problems with google or ie. It started a few days ago.

    Thoughts?

    Hello paulo.eichelberger, try Disabling graphics hardware acceleration.

    You will have to perhaps restart Firefox for it to take effect, so save any work first (e.g. you compose mail, documents online that you are editing, etc.).

    Then perform the following steps:

    1. Open the Firefox Options window as follows:

      • Click the menu button

        then select Options.

    2. In the Options of Firefox window, click the Advanced tab, and then select general.
    3. You will find in the list of parameters, the checkbox use hardware acceleration when available . Clear this check box.
    4. Now restart Firefox and see if the problems persist.

    In addition, please check the updates for your graphics driver by following the steps in the following knowledge base articles:

    This solve your problems? Please report to us!

    Thank you.

  • Bug in the transition from the groups of tabs when the mouse is over a tab

    I use two groups of tabs, each around 3-10 tabs open. I press Ctrl +' to switch between groups of two tabs. Everything works fine except when I have the chance to have the mouse cursor positioned on a tab when I press Ctrl +'. In this case, Firefox seems to get confused and I get an unpredictable mixture of the two groups of tabs tabs. I have to then move mouse tab and then press Ctrl +' twice to the tab group good I tried to move on. It's boring.

    I think it started in FF29, but I'm not sure.

    First of all, I would like to confirm that it is a bug. Secondly, I would like to see it attaches. I tried to find info on this several times without success. Anyone know anything about this?

    Thank you.

    OK nevermind, I did some more research and found a bug in Bugzilla for it. The bug has been fixed and I've confirmed with a night generation. Looking forward from the set in a regular release.

  • the mouse flashes does not work when trying to open the link in TB

    in email receipts-when click on link-mouse flickers and won't work any more, anywhere. I have to restart the computer to make the mouse work.

    and if you click on a link in Wordpad?

Maybe you are looking for