FlashMXML_0.2-0.tar.gz (07 February 2010)
This package provides
This does not make R available to the Flash run-time engine. The connection between R and Flash is when we generate the Flash code from within R to later render the plots in Flash quite separately.
The mxmlDevice() function creates an MXML application
document (and compiles it by default) containing the ActionScript
code to display the document. One can augment this MXML document
after the device has been closed to annotate the plot with interactive
components, event handlers, etc.
The flash() function implements
a device that produces just the ActionScript code for the plot.
It generates code that creates ActionScript objects of different
classes such as RCircle, RLine, RText, RPolyline, RPolygon.
These can be redrawn, moved, transformed, etc. and each
has an RGContext object that represents the graphical parameters.
These can be changed and the object redrawn.
This device forms the basis of the mxmlDevice()
device which adds processing of the MXML file.
A third device flashDevice is
a simpler, more direct rendering of the R plot in Flash.
It generates the ActionScript code that draws the lines, circles,
polygons, etc. using simpler Sprite objects. The objects do not have
knowledge of the original R graphics parameters or the coordinates of
their path(s).
This is a very early release that is intended as a prototype and an example of how we might go about leveraging R's graphics from Flash. The graphics device works, but needs some work with respect to fonts and positioning of text. I hope that others will take this and experiment and develop better versions or feedback changes to me to improve this version. All of the code is in R as we use the RGraphicsDevice package. This makes it quite easy to explore alternative implementations of different aspects or write an entirely new device.