Thanks Karl.
To Reproduce the first problem:
1. Click (and hold) on the ScrollBar Thumb.
2. Drag the thumb around.
3. Move the cursor outside the stage i.e. to the white area
surrounding the Flash player.
4. Release the mouse.
You will notice that the thumb remains active and if you hover back
into the stage, it will start moving.
I have [at last] solved this problem, however I am unsure that this is
the quickest solution. I've customized the ScrollPane, BaseScrollPane
and ScrollBar classes. Now, when the user clicks on the thumb, a new
listener is added to the stage, that will be able to handle a
mouse_up, even if it doesn't occur on the stage. The scroll bar no
longer "sticks" when the user releases the mouse outside the stage. I
was hoping there was a quicker way to do this, however, it's taken a
day of snooping around component source code to resolve the issue. If
anyone knows a better way, I'm all ears. I've added the new player
(version -0.0.2) [ http://www.mavedu.com/viewer ].
1 down, about a thousand more to go.
Like you have suggested, I want users to be able to use their mouse
wheel when they are viewer the document. The other thing, if you look
at the Scribd player, you can drag a document if you click on the grey
area around it. I'm not particularly fond of that, but I don't want
users thinking "But the Scribd player can do that". Unfortunately,
whether it's a bug or not, people are used to it and I feel it is
somewhat necessary to accommodate for that.
Many thanks,
Joseph Masoud
On 11 Jun 2009, at 06:28, Karl DeSaulniers wrote:
Yes you can do that and that will solve your problem of no mouseover
on the grey areas.
I was able to drag the scroll pane button and let go off stage and
it lost focus. Is that what you mean by the thumb? Im on a MAC
Powerbook G4 using Safari 4.
You could use a "track mouse" _x and _y script that knows the
boundaries of your viewer and force it to stopDrag when it goes past
a point.
One other idea (but may be too much at this point) but to add mouse
wheel functionality to your grey rectangle and loaded movieclips.
Then if the user has one he can just hover and scroll... :D
Question, why do you want the grey area to be a mouse_down?
I would think this would be good for what you have so that the user
only selects the page when they want to drag,
otherwise they may not see that you can drag the page because the
mouse will always be in an "over state".
JAT
Very nice though..
Karl
On Jun 10, 2009, at 11:41 PM, Joseph Masoud wrote:
Hello everyone,
I'm currently working on a document viewer, a very buggy version of
which can be seen on:
http://www.mavedu.com/viewer/
Two issues (among hundreds):
1. If you drag the mouse scroll thumb, and release the mouse
outside the stage, the thumb doesn't lose focus. This is a
scrollPane UI component. I think I need to use the mouse_leave
event on the stage, however I'm not quite sure how remove the focus
from the scroll thumb without creating/extending the scrollPane
component.
2. The movie clip within the scrollPane is draggable. The movie
clip has external swfs loaded into it via the Loader class. There
is a space of 20px between each swf. How would I be able to make
the mouse_down register when the user clicks on the space between
the swfs? Perhaps by adding a transparent rectangle in the
background of the movie clip?
Any suggestions would be greatly appreciated.
Many thanks,
Joseph
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Karl DeSaulniers
Design Drumm
http://designdrumm.com
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders