# Manipulating images loaded using URLRequest

**URL:** https://forum.kirupa.com/t/manipulating-images-loaded-using-urlrequest/260381
**Category:** flash
**Created:** [May 15, 2008, 12:11am UTC](https://forum.kirupa.com/t/manipulating-images-loaded-using-urlrequest/260381 "2008-05-15T00:11:19Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![iscarrr](https://avatars.discourse-cdn.com/v4/letter/i/cc9497/32.png) [@iscarrr](https://forum.kirupa.com/u/iscarrr)
#### Post date: [May 15, 2008, 12:11am UTC](https://forum.kirupa.com/t/manipulating-images-loaded-using-urlrequest/260381/1 "2008-05-15T00:11:19Z")

</div>

Hi guys,

So using AS3 I’ve got external images to load perfectly, the code is pretty much:

```php

pageContent.addChild(loadImage("assets/projects/fiji_hilton/hero_nuku_4.jpg"));
...
public function loadImage(url:String):Loader{
            var image:URLRequest = new URLRequest(url);
            var loader:Loader = new Loader(); 
            
            loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loadProgress);  
            loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete);  
            
            loader.load(image);
            return loader;
        }

```

This is working great, BUT i cant seem to get access to the image once its loaded. What i mean is, how can i change its dimensions, or how can i just its smoothing, any of of its properties really.

I’ve tried acessing it through the loader variable, but havent had any luck. It cant be that hard to do, seems like it would be such a common thing.

Thanks!

---

<div class="post-metadata">

### Author: ![iscarrr](https://avatars.discourse-cdn.com/v4/letter/i/cc9497/32.png) [@iscarrr](https://forum.kirupa.com/u/iscarrr)
#### Post date: [May 15, 2008, 1:41am UTC](https://forum.kirupa.com/t/manipulating-images-loaded-using-urlrequest/260381/2 "2008-05-15T01:41:39Z")

</div>

Alright turns out i figured it out 😛

Once the image is loaded so:

```php

loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete); 
...
public function loadComplete(event:Event):void {
            trace("Complete");
            var actualImage = loader.content;
            loader.content.width = 100;
        }

```

You can get the actual bitmap object from the ‘loader.content’ :party:
