R – Degrafa: Adding a RasterImage in ActionScript

actionscript-3apache-flexdegrafa

I'm trying to add a RasterImage component to a Surface at runtime. My code runs as follows:

var ri:RasterImage = new RasterImage();
ri.loadingLocation = new LoadingLocation('http://resources.mydomain.com/','crossdomain.xml');
ri.source = 'http://resources. mydomain.com/some.jpg'
this.myGeometryGroup.geometryCollection.addItem(ri);

Both the LoadingLocation and source paths work on an mxml declared RasterImage in the same document, but trying to create this in AS doesn't work.
I've tried every variation I could think of, including using null for LoadingLocation, embedded classes for source, etc.

With external resources, the application seizes up. With embedded resources nothing shows up. Any help would be appreciated-

Best Answer

Nevermind- This was a bug in the framework. The Degrafa team heard about it and posted a fix in under an hour (!)

Related Topic