Author Topic: Support for slow computers  (Read 527 times)

Gil

  • Newbie
  • *
  • Posts: 13
Support for slow computers
« on: February 16, 2010, 04:24:12 PM »
We are currently running a Megazine based application on a relatively slow computer (Atom 270).
Most things run well, however the slow response exposes certain things that on a regular setup the user cannot see.

One of those is when flipping a page for a fraction of a second (although quite visible) the user sees another page while the flipping effect starts. I guess it's all due to the slow refresh rate of the computer. Can you offer a solution?

Thanks
Gil

Florian Nücke

  • κρύα πόδια
  • Administrator
  • Hero Member
  • *****
  • Posts: 1342
  • MegaZine3 Developer
    • MegaZine3
Re: Support for slow computers
« Reply #1 on: February 17, 2010, 09:31:41 PM »
Could you do a real short screencap of that effect, so that I can see it? Would help a lot to know which page
gets shown (it's probably a lacking update after updating visibility somewhere, but the where is the problem ;))
For the Snark was a Boojum, you see.

Before you ask a question
          After you get an answer
  • please document your problem with the answer in the Project Wiki. (e.g. in the FAQs)
  • help others out if you can, by answering their questions on the forum.

Gil

  • Newbie
  • *
  • Posts: 13
Re: Support for slow computers
« Reply #2 on: February 21, 2010, 09:33:52 AM »
Hi Florian

Well, one issue that can be easily reproduced on modern computers is the "sticky cursor": double click a book's edge (middle, not top or bottom) and you should see the page starts to follow the mouse regardless of a click (if it doesn't happen then try a few more times). I have managed to bypass the problem by adding a custom check on the following function:

DragHandler.as
private function handleMouseMovement(e:Event):void {
...
if (inCorner || draggedPage.state
                        == Constants.PAGE_STATE_DRAGGING_USER && megazine.flipState != "megazine_flip_state_ready")

Florian Nücke

  • κρύα πόδια
  • Administrator
  • Hero Member
  • *****
  • Posts: 1342
  • MegaZine3 Developer
    • MegaZine3
Re: Support for slow computers
« Reply #3 on: March 05, 2010, 04:38:34 PM »
Hm, that change makes it impossible to start a manual drag (keeping the lmb pressed)
while a page is turning though, so I don't really want to use it. As you say it happens
when clicking (are you 100% sure you're not moving the mouse even a little?) the call
to the function must be triggered due to a state change... could you please try this:
Add a variable to the DragHandler class:
Code: (actionscript3)
  1. private var mouseMoveTimeout:uint;
And then adjust the changeState function:
Code: (actionscript3)
  1. // replace
  2. setTimeout(handleMouseMovement, 100, null);
  3. // with
  4. clearTimeout(mouseMoveTimeout);
  5. mouseMoveTimeout = setTimeout(handleMouseMovement, 100, null);

I tried a lot, but I can't reproduce it, so I'm flying blind here, though.
For the Snark was a Boojum, you see.

Before you ask a question
          After you get an answer
  • please document your problem with the answer in the Project Wiki. (e.g. in the FAQs)
  • help others out if you can, by answering their questions on the forum.

Gil

  • Newbie
  • *
  • Posts: 13
Re: Support for slow computers
« Reply #4 on: March 08, 2010, 02:03:52 PM »
Well, I can testify that my change allows a manual drag just as always.
The weird thing is that when I run one of the basic demos the issue doesn't exist.

But getting back to the original problem. This is what I see (even now):
If I click the middle of the edge of a page to flip it. The page auto-turns. Works wonderfully.
But if I click a button which triggers a gotoNextPage, for example, the following thing happens:
1) Let's assume I am at page 2 going to page 4 (single page flip).
2) Before I call the function I see page 1 on the left side as I should.
3) When I call the function I see page 3 appearing for a very brief moment.
4) The page flipping effect starts and page 3 disappears to reveal page 1 once again.
5) The page flipping effect is over and page 1 is now replaced by page 3 as it should.

The thing to notice: if I could trigger the page flipping effect externally EXACTLY like clicking the page itself then the problem would disappear altogether. However, the process seems to be very complicated, since you are relying heavily on mouse location throughout several classes and interact between mouse down and up events.

I think it would be a very good feature to add an auto-flip function (not the way gotopage currently works).

Gil

  • Newbie
  • *
  • Posts: 13
Re: Support for slow computers
« Reply #5 on: March 08, 2010, 02:40:55 PM »
I have attached a screen recording of the problem.
You should see the blinking effect after the 3rd and 5th time I click the left arrow (instead of the page). The movie was recorded on a strong system. On a slower system the effect is more evident and severe.

Gil

  • Newbie
  • *
  • Posts: 13
Re: Support for slow computers
« Reply #6 on: March 08, 2010, 02:44:02 PM »
Another VERY important note: I am using movieclips with dynamic content on the pages, so definitely it is taking its toll on the system resources.

Gil

  • Newbie
  • *
  • Posts: 13
Re: Support for slow computers
« Reply #7 on: March 28, 2010, 08:02:17 AM »
Hi Florian

I haven't received any reply to this issue. Did you get to look at it?

Thanks
g

Florian Nücke

  • κρύα πόδια
  • Administrator
  • Hero Member
  • *****
  • Posts: 1342
  • MegaZine3 Developer
    • MegaZine3
Re: Support for slow computers
« Reply #8 on: March 28, 2010, 02:47:57 PM »
Hi,

sorry for the late reply, I hadn't forgotten, though. Weird effect.
I'll definitely have another look at this over the next days. And will
try to get running Flash on my not so fast laptop (which is currently
running Linux... so it should be even slower, if the Adobe flamers
are to be believed :P)
For the Snark was a Boojum, you see.

Before you ask a question
          After you get an answer
  • please document your problem with the answer in the Project Wiki. (e.g. in the FAQs)
  • help others out if you can, by answering their questions on the forum.