Mouse Cursor Recorder
| Category | : Flash | Views | : 13397 | ||
| Version | : 8 | Rating | : | ||
| Type | : Text | Source File | : mouse-cursor-recorder.zip | ||
| Result | : See the result | ||||
//recording button
recBtn.onRelease = function()
{
//show the original mouse
Mouse.show();
//hide the copy
_root.mouseMC._visible = false;
//recording is true
_root.recording = true;
//playing is false
_root.playing = false;
//index equal 0 to start recording from the beginning
_root.index = 0;
//this will make the arrays empty, erasing any position that was there before
_root.mPosX = new Array();
_root.mPosY = new Array();
}
//play button
playBtn.onRelease = function()
{
//hide mouse
Mouse.hide();
//show copy
_root.mouseMC._visible = true;
//not recording
_root.recording = false;
//now we are playing
_root.playing = true;
//index equal 0 to start playing from the beginning
_root.index = 0;
}
//stop button
stopBtn.onRelease = function()
{
//show mouse
Mouse.show();
//hide copy
_root.mouseMC._visible = false;
//not recording
_root.recording = false;
//not playing
_root.playing = false;
_root.index = 0;
}
Test it now. If you are using a low frame rate the movement wont look good, so increasing it is a good idea.

Code Explanation
mouseMC._visible = false;
Set mouse copy visibility to false.
var recording = false;
var playing = false;
These two variables are used to know if we are recording or playing.
var index = 0;
Used for the array’s index in recording and playing.
![]() |
![]() |
![]() |
![]() |
![]() |







