Is it possible to use a revBrowser object in a Blind Effect

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
escarroll
Posts: 11
Joined: Tue Jan 28, 2014 5:15 am

Is it possible to use a revBrowser object in a Blind Effect

Post by escarroll » Thu Jan 30, 2014 6:17 pm

Hello,

I created a custom Blind Effect/Slider control per the example on the LiveCode website, however I am using an image object as the slider and attaching a revBrowser instance to it. Once the browser is called and displayed the Image control will not slide back up out of the way.

I close the browser session but I am not sure what else to do to clear up the Image object the revBrowser was attached to so that it will slide back up when I activate the "-" button.

How do you turn the image object back into its original state after closing the revBrowser session? so that you can manipulate it on the card again.

Ideas?

Best Regards,
Shane

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

Re: Is it possible to use a revBrowser object in a Blind Eff

Post by Mark » Mon Feb 03, 2014 6:00 pm

Hi Shane,

I'm not sure I understand your question. You don't describe how you created your custom blind effect. All I understand is that you
- show an image control
- show a browser control on top of it
- close the browser control
- hide the image control

If the script that executes the revBrowserClose command also hides the image, it should work fine. Can you elaborate on the problem?

If you are just looking for a nice visual solution, you could show a grey image with a spinning wheel on it while loading the browser. You can open the browser in a hidden state and display it in a browserNavigateComplete handler, which could also hide the image and spinning wheel.

Kind regards,

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

escarroll
Posts: 11
Joined: Tue Jan 28, 2014 5:15 am

Re: Is it possible to use a revBrowser object in a Blind Eff

Post by escarroll » Thu Feb 06, 2014 5:31 am

Hi Mark,

I am using the code from the Livecode Lesson - Blind Effect on their website.
except I am attaching a revbrowser session to the sliding window part instead of what ever they are using in the blind effect example. I would link it but when I try it gives me some permissions issues saying my account can not post urls and what not, so I just tried to verbally give it a go.

It is very clear, I have not changed the code in that example, and it works if I do not use the revBrowser on the dropdown image. So the code works as long as I just call a regular image or do what is in the example. When I place a webpage in it, the whole thing breaks. I dont know why.

.Shane

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

Re: Is it possible to use a revBrowser object in a Blind Eff

Post by Mark » Mon Feb 10, 2014 2:29 am

Shane,

Got a link to that lesson?

Keep in mind that a browser control is a window and not a control like images and fields. Visual effects may not work with browser "controls". That's why you may have to follow a very different approach, as I proposed in my previous post.

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

escarroll
Posts: 11
Joined: Tue Jan 28, 2014 5:15 am

Re: Is it possible to use a revBrowser object in a Blind Eff

Post by escarroll » Mon Feb 10, 2014 4:08 pm

this is the URL to the lesson.
http://lessons.runrev.com/s/lessons/m/4 ... ind-effect

So once the browser image object is used to open the revBrowser object, it is turned into a window?

.Shane

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

Re: Is it possible to use a revBrowser object in a Blind Eff

Post by Mark » Mon Feb 10, 2014 4:21 pm

Hi Shane,

On that page, there is no mention of a browser. There is also no mention of visual effects. In the lesson, they're just changing dimensions of controls. I don't understand what you are trying to do. Can you post your own code here?

An image control isn't turned into a window. The revBrowser control is actually a window that floats on top of the stack window.

Kind regards,

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

escarroll
Posts: 11
Joined: Tue Jan 28, 2014 5:15 am

Re: Is it possible to use a revBrowser object in a Blind Eff

Post by escarroll » Mon Feb 10, 2014 10:06 pm

I realize that Mark, if you remember in the first post, I stated what I had replaced.
I used an image object as the "slider" from the example, to attach the revBrowser instance to.

It works when I hit the plus button. it slides down and opens the webpage.
Once it has called the webpage, though it breaks. I don't know where to go from there.

I ran the code to close the browser session but I do not know how to manipulate the window.

Regards,
Shane

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

Re: Is it possible to use a revBrowser object in a Blind Eff

Post by Mark » Mon Feb 10, 2014 10:17 pm

Shane,

I assume you want to slide down the browser control. You could change the rect of the browser control multiple times, something like

Code: Select all

repeat with x = 1 to 500 with messages
  put 32,100,400,100+x into myRect
  revBrowserSet gBrowserID,"rect",myRect
  wait 0 millisecs with messages
end repeat
To slide it up, you do the opposite:

Code: Select all

repeat with x = 500 down to 1 with messages
  put 32,100,400,100+x into myRect
  revBrowserSet gBrowserID,"rect",myRect
  wait 0 millisecs with messages
end repeat
revBrowserClose gBrowserID
Kind regards,

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