RevBrowser Doesn't Like Backdrop?

Mark Talluto userev at canelasoftware.com
Tue Dec 30 14:19:13 EST 2008


On Dec 30, 2008, at 10:57 AM, Scott Rossi wrote:

> Recently, Mark Talluto wrote:
>
>> I can confirm this problem.  I ended up creating a black background
>> stack and used that to cover the desktop.  That will do the job.
>
> Thanks Mark -- how did you get the background stack to stay behind  
> all other
> stacks?


Hi Scott,

Brief history.  I wanted to play animations that were in the flv  
format.  They were not interactive in any way.  It was just want the  
client had provided us.  We could not get revBrowser to accept any  
messages like mouse clicks or rawKeyDowns...  So we ended up making a  
stack that floated over the browser stack to accept mouse clicks.  We  
used a third party flv player to play the content in revBrowser and  
this player gave us control over the sizing of the videos to be played  
plus a variety of other things.

In short, we ended up ditching the flvs and converted the content over  
to QT movies.  This provided many benefits (full control and use of  
Trevor's QT external).  I had to look up the handler that set this all  
up and it turns out we made the stack that held the browser full  
screen.  We then used the third party player to control the dimensions  
of the flash player.  Here is the relevant code.  If you have any  
questions, please let me know.

--> PATIENT EDUCATION
on startBrowser pChosenAnimation
      global gBrowserId, gTest, gInternetStatus, gPrefs,  
gDecryptedAnimation
      global gMiniDisplay, gMMDisplayNum

      put empty into gDecryptedAnimation

      --SIZE AND PLACE THE PATIENT EDUCATION STACK
      put monitorPlacement("Patient Education") into theResult
      put line 1 of theResult into tVres
      put line 2 of theResult into tHres
      put line 3 of theResult into tScreenLoc
      put line 4 of theResult into tRect

      --CREATE BACKGROUND FOR BROWSER
      hide menubar
      lock screen
      create stack "browser"
      set the resizable of stack "browser" to false
      set the decorations of stack "browser" to empty
      set the destroystack of stack "browser" to true
      set the rect of stack "browser" to tRect
      set the backgroundcolor of card 1 of stack "browser" to 0,0,0

      --CREATE STACK TO FLOAT ON TOP OF WEB BROWSER
      --TO RECEIVE INPUT FROM USER
      create stack "browser floater"
      set the resizable of stack "browser floater" to false
      set the decorations of stack "browser floater" to empty
      set the destroystack of stack "browser floater" to true
      set the rect of stack "browser floater" to tRect
      set the defaultstack to "browser floater"
      set the blendlevel of stack "browser floater" to 94
      unlock screen

      decryptAnimation pChosenAnimation

      put empty into tLocalAnimation
      put "file://" before tLocalAnimation
      put gDecryptedAnimation after tLocalAnimation
      replace " " with "%20" in tLocalAnimation
      put tLocalAnimation into gDecryptedAnimation

      --SETUP THE HTML CODE TO MANAGE THE EMBEDED FLV PLAYER
      setupHTML gDecryptedAnimation,tHres,tVres

      put (gPrefs & "mediaplayer/PatientEd.html") into tHTML
      put "file://" before tHTML
      replace " " with "%20" in tHTML
      put revBrowserOpen(the windowid of stack "browser", tHTML) into  
gBrowserId

      if gBrowserId is not an integer then
           answer "Failed to open browser"
      end if

      --SIZE BROWSER
      revBrowserSet gBrowserId, "rect", (0,0,the width of stack  
"browser",the height of stack "browser")
      unlock screen

      --REMOVE CHARTS FRONTSCRIPT
      removeFrontScript
      removeGodFrontScript

      put "patient education" into gTest

      --SET UP THE FRONTSCRIPT TO MANAGE PATIENT EDUCATION
      insertFrontScript

      set the vis of stack "media center" to false
      toplevel stack "browser"
      toplevel stack "browser floater"

      --MOVE THE MOUSE OUT OF THE WAY
      set the itemdel to ","
      put the screenrect into temp
      set the screenmouseloc to (item 3 of temp),(item 4 of temp)
end startBrowser



More information about the use-livecode mailing list