# Starling - Load SWF and draw its content

**URL:** https://forum.kirupa.com/t/starling-load-swf-and-draw-its-content/330291
**Category:** flash
**Created:** [December 26, 2012, 2:45pm UTC](https://forum.kirupa.com/t/starling-load-swf-and-draw-its-content/330291 "2012-12-26T14:45:29Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Tompa](https://avatars.discourse-cdn.com/v4/letter/t/6de8d8/32.png) [@Tompa](https://forum.kirupa.com/u/Tompa)
#### Post date: [December 26, 2012, 2:45pm UTC](https://forum.kirupa.com/t/starling-load-swf-and-draw-its-content/330291/1 "2012-12-26T14:45:29Z")

</div>

Hi!  
I have a Image and a RenderTexture-variable.  
I’m loading SWF’s dynamically and once they are loaded I want to use the RenderTextures draw-function to draw the SWFs content into the Image variable.

Here is the code of the completeEvent of the loader:

```php
private function swfLoaded(e:LoaderEvent):void {       
       var spr:Sprite = e.currentTarget.content as Sprite;
       renderTexture.draw(spr, 1);
}

.

```

This is resulting in a #1034 error - Type Coercion, because renderTexture is looking for a starling.display.DisplayObject-variable and e.currentTarget.content is a flash.display.DisplayObject.  
Is there some way to “convert” the SWF’s content \*(flash displayObject to Starling displayObject) \*so I can use it as a texture?

_Thanks in advance,  
Tompa_
