Page 1 of 1
Is it possible to use a revBrowser object in a Blind Effect
Posted: Thu Jan 30, 2014 6:17 pm
by escarroll
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
Re: Is it possible to use a revBrowser object in a Blind Eff
Posted: Mon Feb 03, 2014 6:00 pm
by Mark
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
Re: Is it possible to use a revBrowser object in a Blind Eff
Posted: Thu Feb 06, 2014 5:31 am
by escarroll
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
Re: Is it possible to use a revBrowser object in a Blind Eff
Posted: Mon Feb 10, 2014 2:29 am
by Mark
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
Re: Is it possible to use a revBrowser object in a Blind Eff
Posted: Mon Feb 10, 2014 4:08 pm
by escarroll
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
Re: Is it possible to use a revBrowser object in a Blind Eff
Posted: Mon Feb 10, 2014 4:21 pm
by Mark
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
Re: Is it possible to use a revBrowser object in a Blind Eff
Posted: Mon Feb 10, 2014 10:06 pm
by escarroll
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
Re: Is it possible to use a revBrowser object in a Blind Eff
Posted: Mon Feb 10, 2014 10:17 pm
by Mark
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