altRevBrowser Noob

Sarah Reichelt sarah.reichelt at gmail.com
Thu Feb 11 17:56:21 EST 2010


> Basically I intend to make a stack that expands to the size of the current monitor resolution (minus the Mac menu or the PC task bar of course) and launch a fixed URL, which is a flash stream coming from our main web site.
>
> This is for a special app for someone who recently had a minor stroke and doesn't always remember how to work all the controls and gadgets that might be in a full featured stack like the sample.
>
> So all I really need to know is how to get the URL of a flash movie to load in a window. Thanks in advance.


Here is what I do:

Script to open browser:

on mouseUp
   put the windowID of this stack into tWindowID

   -- open the browser, using the windowID and initial URL
   put revBrowserOpen(tWindowID, "http://www.runrev.com") into tBrowserId

   -- set the rect of the browser
   revBrowserSet tBrowserId, "rect", rect of grc "BrowserRect"

   -- set a border round the browser
   revBrowserSet tBrowserId, "showBorder", true
end mouseUp


Script to close all browsers when finished:

on mouseUp
   put revBrowserInstances() into tInstances
   repeat for each item tInstance in tInstances
      revBrowserClose tInstance
   end repeat
end mouseUp

I have these as button scripts, but you probably want to make them
part of openStack & closeStack handlers.

Make a stack and draw a rectangle graphic to whatever size you want.
Or if you want to fill the window completely, use this:
   revBrowserSet tBrowserId, "rect", rect of this card

Then in the preOpenStack, you could resize the stack to fill the screen.

Cheers,
Sarah



More information about the use-livecode mailing list