我最近問了一個關於鼠標RECORDING的問題。現在我需要弄清楚如何重播它。用Javascript重播鼠標移動
最近的問題:https://stackoverflow.com/questions/8129723/record-mouse-movement-with-javascript
我將用PHP,使當前頁面的相同副本,然後我將插入重播腳本它。該腳本會根據時間(爲了說明鼠標移動),根據多個x和y座標添加並移動一個絕對的posisioned圖像。
有沒有什麼好的方法(更好,然後下)重播多個mousemovements?
<input style="width:100%" type="text" name="onlyforstackoverflow1" value="0" size="4"><br>
<input style="width:100%" type="text" name="onlyforstackoverflow2" value="0" size="4">
<script>
// I want this (a very long array with x-cordinates, y-cordinates and time from pageload)
var very_long_array = [1,2,1000,2,22,2000,3,33,3645,4,44,3456];
// To become the same as this
setTimeout("document.Show.onlyforstackoverflow1.value = 1;document.Show.onlyforstackoverflow2.value = 11;",100)
setTimeout("document.Show.onlyforstackoverflow1.value = 2;document.Show.onlyforstackoverflow2.value = 22;",200)
setTimeout("document.Show.onlyforstackoverflow1.value = 3;document.Show.onlyforstackoverflow2.value = 33;",364)
setTimeout("document.Show.onlyforstackoverflow1.value = 4;document.Show.onlyforstackoverflow2.value = 44;",453)
// in the real script it will be moving around an image instead...
</script>
這對我來說是非常有用的聲明......但我也想整合暫停並恢復重播功能。我一直在尋找它,但答案只適用於setTimeout的情況下,而不是setTimeout內遞歸函數。所以你可以把一些光如何完成它。預先感謝 –