WebResourceResFileclass | webui.t[980] |
Superclass Tree | Subclass Tree | Global Objects | Property Summary | Method Summary | Property Details | Method Details |
To expose a bundled game resource as a Web object that the client can access and download via HTTP, simply create an instance of this class, and set the virtual path (the vpath property) to the resource name. See coverArtResource below for an example - that object creates a URL for the Cover Art image so that the browser can download and display it.
You can expose *all* bundled resources in the entire game simply by creating an object like this:
WebResourceResFile
vpath = static new RexPattern('/')
;
That creates a URL mapping that matches *any* URL path that corresponds to a bundled resource name. The library intentionally doesn't provide an object like this by default, as a security measure; the default configuration as a rule tries to err on the side of caution, and in this case the cautious thing to do is to hide everything by default. There's really no system-level security risk in exposing all resources, since the only files available as resources are files you explicitly bundle into the build anyway; but even so, some resources might be for internal use within the game, so we don't want to just assume that everything should be downloadable.
You can also expose resources on a directory-by-directory basis, simply by specifying a longer path prefix:
WebResourceResFile
vpath = static new RexPattern('/graphics/')
;
Again, the library doesn't define anything like this by default, since we don't want to impose any assumptions about how your resources are organized.
class
WebResourceResFile : WebResource
WebResourceResFile
WebResource
object
WebResourceResFile
WebWindow
WebCommandWin
WebLayoutWindow
WebStatusWin
coverArtResource
webMainWin
webuiResources
Inherited from WebResource
:
group
priority
vpath
isTextFile
matchRequest
processName
processRequest
Inherited from WebResource
:
sendAck
sendXML
binaryExts | webui.t[1083] |
browserExtToMime | webui.t[1043] |
isTextFile (fname) | webui.t[1061] |
matchRequest (query, req) OVERRIDDEN | webui.t[986] |
processName (n) | webui.t[1054] |
processRequest (req, query) OVERRIDDEN | webui.t[992] |