Did you try (imageElement.resource as URLResource).url?
Its not the URL I want to set as the source. I want to use an actual loader, which has BitmapData in it.
In that case, I would subclass ImageElement and override processReadyState to add the Loader in a DisplayObjectTrait. It would be something like:
addTrait(MediaTraitType.DISPLAY_OBJECT, new DisplayObjectTrait(loader);
In fact, you could probably just override LoadableElementBase, since there's nothing in ImageElement you would need.