AC: Advanced Animation Techniques

Tips, techniques and tutorials about creation tools.

Re: Need Help

Postby kexter » Fri, 16Jan22 12:00

tlaero wrote:My current theory is that when it works it switches to the anim1rch before you let go of the click. When it doesn't work, you let go of the mouse before it switches, so when it gets to anim1rch, the mouse is already up. I've got a fast computer, so maybe I'm not seeing that.
That is pretty much the issue, mouseup/pointerup happens during the transition between the pages. It's not the fast computer that counts but the driver for the mouse/pointer device, the heavy handedness of the user, the double-click interval settings, ssd/hdd activity, and the browser's internal state (is it in a GC cycle just as the transition happens or is another tab hogging resources that slows down the page-load just enough that the up-event happens before the page is loaded?)
Due to all of the above, I would use only a single page to achieve the same effect.

And on a slightly related note, here's a single function that could replace SetUp, SetUp2, and in the future SetUp3, SetUp4, etc:
Code: Select all
function onUp(id, func, args) {
  var that = this,
    funcArgs = [].slice.call(arguments, 2);
  if (typeof id !== "undefined" && typeof func === "function") {
    document.getElementById(id).addEventListener(
      typeof PointerEvent !== "undefined" ? "pointerup" : "mouseup",
      function () { func.apply(that, funcArgs); });
  }
}

The order of the parameters is different and "id" is not optional but you can call it with any number of arguments. For example:
Code: Select all
function onUp("image", functionRequiringNoArguments);
function onUp("image", functionRequiringOneArgument, arg1);
function onUp("image", functionRequiringTwoArgument, arg1, arg2);
function onUp("image", functionRequiringFiveArguments, arg1, arg2, arg3, arg4, arg5);
@kextercius
User avatar
kexter
Moderator
 
Posts: 214
Joined: Sun, 13Dec29 11:01
sex: Masculine

Re: Need Help

Postby Joka » Fri, 16Jan22 12:47

Win 10 - 64 bits - Chrome 47.0.2526.111 m
Worked fine

Win 10 - 64 bits - Microsoft Edge
Worked fine too
Joka
sirens hunter
 
Posts: 22
Joined: Tue, 07Jun19 23:00

Re: Need Help

Postby tlaero » Fri, 16Jan22 15:54

Thanks Kexter. I explicitly chose to do it that way because I didn't want to type the id.

Tlaero
User avatar
tlaero
Lady Tlaero, games and coding expert
 
Posts: 1829
Joined: Thu, 09Jun04 23:00
sex: Female

Re: Need Help

Postby MrT1melord » Fri, 16Jan22 17:48

W7 x64 Firefox 43.0.4

1) Number goes to 4 instantly and then counts down to 0
2) Works as intended
3) Works like 1 but whatever number I release at it just goes straight to 4 and then counts down normally to 0(EG if I release it at 2 it jumps to 4 and then 3 2 1 0)
User avatar
MrT1melord
Pilot fish
 
Posts: 9
Joined: Thu, 15Aug27 17:40
sex: Masculine

Re: Need Help

Postby karrek » Fri, 16Jan22 18:34

Win 10 x64 Firefox

1 - Most of the time it works as intended, but sometimes it jumps straight to 4 and then counts down, and other times it behaves like 2 (with it continuing until I click again)
2 - Works as intended
3 - Works as intended
User avatar
karrek
lagoon predator
 
Posts: 181
Joined: Sat, 11Jul23 00:47
sex: Masculine

Re: Need Help

Postby Mortze » Fri, 16Jan22 19:00

Do love when karrek posts something [img]images/icones/icon14.gif[/img]
User avatar
Mortze
legend of the South Seas
 
Posts: 648
Joined: Wed, 14Oct29 02:34
sex: Masculine

Re: Need Help

Postby syramore » Fri, 16Jan22 19:53

OS Windows 10 Enterprise Inside Preview - Evaluation Copy Build 11102.rs1_release.160113-1800

Microsoft Edge - 28.11102.1000.0
1 - Goes directly to 4 then count downs to 0
If you click a second time -- it counts to 4 turns black and keeps running even if you are not holding the button. You have to click again to stop it
2 - Works as expected
3 - Works as expected

Microsoft Internet Explorer 11.1000.11102.0
1 - Goes directly to 4 then counts down to zero
This performs the same way no matter how many times you click
2 - Works as expected
3 - Works as expected

Chrome 47.0.2526.106 m (64-bit)

1 - Goes directly to 4 then counts down to zero
This performs the same way no matter how many times you click
2 - Works as expected
3 - Works as expected

Firefox 43.0.4
1 - Goes directly to 4 then counts down to zero
This performs the same way no matter how many times you click
2 - Works as expected
3 - Works as expected
syramore
Pilot fish
 
Posts: 8
Joined: Mon, 14Jul21 03:54
sex: Masculine

Re: Need Help

Postby tlaero » Sat, 16Jan23 02:27

Thank you, everyone. I've got all the data I need now.

Here's what you've done for me.
1) You showed me that it's not an issue of incompatibility between browsers. (I don't need special code for Firefox, etc.)
2) You gave me enough data that I was able to understand what's happening.
3) And, with the understanding of what's happening, I know that, even when this happens, clicking in the middle window will fix it.
4) Finally, I understand that if the user does it correctly (holds the mouse button until the color inverts) it should work for everyone.

There's no good way to harden the current mechanism against the issue. And the right way to fix it is enough of an infrastructure change that I don't want to do it for this release. But, since it can work on all browsers and users can do it right, I'll be able to ship it this way. Non-ideal, but not terrible either. Disaster averted. That reduces my stress a ton.

Thank you very much, everyone. I really appreciate all of your help.

Tlaero
User avatar
tlaero
Lady Tlaero, games and coding expert
 
Posts: 1829
Joined: Thu, 09Jun04 23:00
sex: Female

Previous

Return to The workshop of creators

Who is online

Users browsing this forum: No registered users and 9 guests

eXTReMe Tracker