Is it possible to change the revlet embed html?
J. Landman Gay
jacque at hyperactivesw.com
Thu Dec 3 13:02:24 EST 2009
George C Brackett wrote:
> One way to enable students to produce information-handling projects
> for themselves (where information is entered, stored, edited,
> deleted) would be giving them an environment where the URL of the
> revlet is passed by parameter to the revlet code, and including a
> pre-written 'save' command in a project starter stack that can write
> the information to a text file at the revlet's URL. A big help would
> be to alter the standard test HTML so that the embed code passes that
> information.
>
> Is it possible to change the test HTML generated by revMedia?
Sure, and you can do that yourself easily. The HTML file is created in
the same folder as your revlet after you do a build. Just alter that.
You need to add a parameter to the javascript section. You can name it
whatever you want, and give it the value of the URL where you will be
storing the revlet on the server. Then in your stack, call "the
revletParams of this stack" to get a list of all those parameters that
the javascript has passed.
For example:
<object classid="CLSID:B2EC94AF-4716-4300-824A-3314BF23664A" width=640
height=480>
<param name="src" value="myMain.revlet"/>
<param name="stack" value="myMain"/>
<param name="requestedName" value=""/>
<param name="instanceID" value=""/>
<param name="myPath" value="http://www.mydomain.com/myrevlet.revlet"/>
<embed type="application/x-revolution"
src="myrevlet.revlet"
width=640 height=480
stack="myMain"
requestedName=""
instanceID=""
myPath="http://www.mydomain.com/myrevlet.revlet"
></embed>
</object>
For saving, you'll need to use scripts that act like desktop apps; the
revlet's defaultfolder is on the user's local hard drive, not on the
server. You can think of revlets as mini standalones, for the purposes
of file paths. You'll need to use an FTP URL that includes a user name
and password if you want to write to the server.
--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode
mailing list