how hide image area containing revbrowser?

Visuals, audio, animation. Blended, not stirred. If LiveCode is part of your rich media production toolbox, this is the forum for you.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Barkandgargle
Posts: 9
Joined: Wed Feb 16, 2011 5:32 pm

how hide image area containing revbrowser?

Post by Barkandgargle » Fri Feb 18, 2011 7:53 pm

Sorry if this is a question with an obvious answer, but I haven't been able to figure it out...

I've succeeded at having a youtube video appear within a image ar

I've created an image area, and by using revbrowser am able to have a youtube video to play in the area. So success to this point.

When other buttons are pressed, I want to hide the image area (and thus hide the youtube player). I've set the invisible of the image area to true, but it just sits there.

What am I missing?

Thanks!

BvG
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1239
Joined: Sat Apr 08, 2006 1:10 pm
Contact:

Re: how hide image area containing revbrowser?

Post by BvG » Sat Feb 19, 2011 12:02 am

The image in the example stack is misleading. It's actually serving no function at all. All it does is serving as the rectangle, for the browser to show in. You could as well specify your own rectangle manually, and show the browser there.

To hide the browser instance, you can use the revBrowserSet command with the "visible" parameter:

Code: Select all

revBrowserSet 1,"visible",false
Various teststacks and stuff:
http://bjoernke.com

Chat with other RunRev developers:
chat.freenode.net:6666 #livecode

jstarkman
Posts: 47
Joined: Wed Mar 16, 2011 4:39 am

Re: how hide image area containing revbrowser?

Post by jstarkman » Wed Mar 23, 2011 7:53 am

I'm using a browser on the simulator and want to be able to have other elements display in front of it from time to time (like a popover), but it seems that the browser is always in front, despite the layer setting. How can I get other controls to be in front of the browser?

Thanks,

Joel

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: how hide image area containing revbrowser?

Post by Klaus » Wed Mar 23, 2011 11:13 am

Hi Joel,
jstarkman wrote:How can I get other controls to be in front of the browser?
I'm afraid you can't!


Best

Klaus

jstarkman
Posts: 47
Joined: Wed Mar 16, 2011 4:39 am

Re: how hide image area containing revbrowser?

Post by jstarkman » Wed Mar 23, 2011 1:18 pm

Klaus,

Thanks for replying so promptly.

Are there no work-arounds for this type of behavior? I've only been working with LiveCode for about a week now, and am far from knowing it's capabilities or shortcomings.

The iOS app I'd like to write needs to display a PDF (of drawings) and I was hoping the browser control would work. I've been able to get some basic functionality from the browser, but now find I can't fully develop a UI because of this particular control. Is there some other control I can use to display PDF's on the iOS platform? Is it possible to maybe convert the image in the browser to some a real image, hide the browser/display that image in the back, then show the top layer controls I'd like to popup, then dismiss those controls and show the browser again?

Seems like a real clunky solution, but might it work?

Joel

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: how hide image area containing revbrowser?

Post by Klaus » Wed Mar 23, 2011 9:00 pm

Hi Joel,

might work! :D

You could use "import snapshot..." for this, but I am not sure
if this will work with a "Browser" (WebViewUI or whatever) on iOS.


Best

Klaus

jstarkman
Posts: 47
Joined: Wed Mar 16, 2011 4:39 am

Re: how hide image area containing revbrowser?

Post by jstarkman » Wed Mar 23, 2011 9:54 pm

Yes, I was just looking at the snapshot functions. I'll let the group know if I can make it work. If I can't, it's probably because I'm still a newbie.

Thanks Klaus.

jstarkman
Posts: 47
Joined: Wed Mar 16, 2011 4:39 am

Re: how hide image area containing revbrowser?

Post by jstarkman » Sat Mar 26, 2011 4:21 pm

I'm pleased to say that by using the snapshot feature it's possible to create the illusion of other elements being in front of the browser (or at least an image of the browser).

The problem I'm having now is that when the browser (not the snapshot) is in front, I can't seem to trap touch events. It's as though the OS is grabbing them and not letting me trap them. Any ideas? Is this where I might need to put my handler as far up the message chain as possible, like in a front script?

Joel

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: how hide image area containing revbrowser?

Post by Klaus » Wed Apr 27, 2011 8:18 pm

Hi Joel,

cool that snapshot works for you!

But I am afraid that the iOS IS in fact managing the browser and you have no control over this
except the messages, actions and properties described in the "iOS Release Notes" (menu: Help)


Best

Klaus

Post Reply