Developing widget application
Widget applications can be Flash applications or any Desktop applications. It’s recommended that your application makes a query like
http://[your_site]/ray/XML.php?action=getWidgetCode&widget=[widget_name]
at start-up for protection from unauthorized use. The result of this query can look like this:
<ray> <result status="success" code="[your_widget_unique_code]" license="[license]"/> </ray>
You should make a unique code verification in your widget application.
Desktop applications development is up to you. Here you just need to provide the community or any multimedia features for users and provide a connection with Web-Server via XMLS application and assume the following requirements:
At initial startup of desktop application it should make the query like
http://[your_site]/ray/XML.php?action=getSettingValue&widget=[widget_name]&file=main&key=status.
The result of this query can look like this:
<ray> <result value="enabled" status="success"/> </ray>
The “value” attribute can be one of the following: “enabled”, “disabled”, “not installed”. For any case except “enabled” your application shouldn’t run and should alert the respective error.
Flash applications have some requirements:
1. Every flash application should be described in “inc/constants.inc.php” file;
2. If your application requires any variables they should be also defined in the “inc/constants.inc.php” file. Besides these variables “module”(your widget system name) and “url”(Ray XML Server Url) will be passed to your application. These two variables are needed to form proper queries to XMLS like
“[url]?module=[module]&action=[some_action]”;
3. All Flash applications are loaded into the global container(global/app/holder.swf), so if your Flash application is resizable you should use the “_root.setSize(width:Number, height:Number)” method in your application, that is called on every Stage resizing event. To know the current application size you can call “_root.getSize():Object” method, which will return the object with “width” and “height” properties.
Your Flash application shouldn’t refer to the Stage object for resizing listening.
Please look through demo widgets 1-3 to see examples.










