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-