revbrowser & graphic

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
sm
Posts: 14
Joined: Sun Oct 22, 2006 1:17 pm

revbrowser & graphic

Post by sm » Sun Jul 20, 2008 4:53 am

I want to have a line follow the cursor. No problem. Simple with only one line of code.

I also want the line to move over a revBrowser object that has had a pdf loaded. Problems-
1) The revBrowser object always seems to be "on top" and the graphic (ie the line) will not display over the browser.
2) The mouseMove event does not register when the cursor is in the area of the revBrowser object. The midpoint of the line stops at the edge of the browser.

I have found some similar problems raised in other topics, but no solution.

Thank you for any help you can offer.

Garrett
Posts: 386
Joined: Sat Apr 08, 2006 8:15 am
Contact:

Post by Garrett » Sun Jul 20, 2008 10:10 am

This is not a rev specific problem, it's an IE problem really. You'll find this behaviour in other programming languages on Windows also. And no way to circumvent it either.

The only suggestion I can think of is to create another stack that acts as the line, that is, if the line is simply a straight line, and set that stack as a topmost stack. Since the first stack is the one that the browser is addressed to, the second stack will not be affected by the browser wanting to be ontop of everything else.

As for the mouse tracking.. Hmmmmm... Nothing off the top of my head at the moment for that issue.

sm
Posts: 14
Joined: Sun Oct 22, 2006 1:17 pm

Post by sm » Sun Jul 20, 2008 12:00 pm

Thank you for your help. I started this project in RealBasic and thought I would see how it could be done with Rev, but now I know I may as well stop there. At least I did not waste any time as the limiting factor was almost immediately apparent.
Back to RealBasic. Thanks again.

gyroscope
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 404
Joined: Tue Jan 08, 2008 3:44 pm
Contact:

Post by gyroscope » Sun Jul 20, 2008 2:12 pm

Back to RealBasic.
Hey, wait! You don't know what you're missing!! :wink:

:)

Garrett
Posts: 386
Joined: Sat Apr 08, 2006 8:15 am
Contact:

Post by Garrett » Sun Jul 20, 2008 8:10 pm

Wow, RealBasic doesn't suffer from this browser issue? It'd be one of the few that I've heard doesn't suffer from this, unless it's not using the IE browser component.

sm
Posts: 14
Joined: Sun Oct 22, 2006 1:17 pm

Post by sm » Mon Jul 21, 2008 12:49 am

I have no real expertise in programming, which can sometimes be an advantage. I just try things to see if they work without knowing or worrying about some complexities.
The RealBasic HTMLViewer seems to behave for what I am trying to do. I do not know why that is.

Gyroscope is partly correct. I do have some idea. The way Rev handles some objects would make the project much simpler and it would be my preferred approach, except for the fatal problem of the browser. I have said it before- Rev is very good and can be stunning in it's simplicity to perform powerful tasks. It can be very difficult for me to find the necessary information or approach, but that is partly my problem (time, experience, etc) and partly the software and it's documentation.

Thanks again for your help.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10043
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Post by FourthWorld » Mon Jul 21, 2008 8:43 am

sm wrote:The RealBasic HTMLViewer seems to behave for what I am trying to do. I do not know why that is.
It may be worth finding out. I suspect this is ultimately a case of trading one set of problems for another, except that the others aren't yet known. Determining why RB's browsers has such unusually good buffering may help avoid a more costly shift further down the road.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

sm
Posts: 14
Joined: Sun Oct 22, 2006 1:17 pm

Post by sm » Mon Sep 29, 2008 7:43 am

A (delayed) follow up note.
I finally had time to get back to realbasic (2008- recently released) for this project. It does NOT behave correctly. It behaves differently to revolution and some aspects encouraged me to think it would do what I want. However, the more detail I applied the more it became apparent that it will not work correctly.
Thanks again to those who helped me with this. I don't think I will be able to find an answer to my problem, at least not one that I can manage.

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Mon Sep 29, 2008 9:09 am

Hi SM,

To get the mouseLoc while no mouseMove message is sent, you might try to send your own message.

Code: Select all

global gMouseMessageSwitch
global gCustomMouseLoc
on mouseMessage
  put the mouseLoc into gCustomMouseLoc
  if gMouseMessageSwitch is "on" then
    send "gCustomMouseLoc" to me in 40 millisecs
  end if
end mouseMessage
However, this will not tell you whether the mouseLoc is within a particular object of the website. Neither is this "simply one line of code".

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Post Reply