# Dynamic load in component ImageVewer

**URL:** <https://forum.kirupa.com/t/dynamic-load-in-component-imagevewer/320564>\
**Category:** Uncategorized\
**Created:** [March 27, 2011, 2:00am UTC](https://forum.kirupa.com/t/dynamic-load-in-component-imagevewer/320564 "2011-03-27T02:00:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![walerka](https://avatars.discourse-cdn.com/v4/letter/w/ea5d25/32.png) [@walerka](https://forum.kirupa.com/u/walerka)\
**Post date:** [March 27, 2011, 2:00am UTC](https://forum.kirupa.com/t/dynamic-load-in-component-imagevewer/320564/1 "2011-03-27T02:00:09Z")

</div>

Hello all, i have small flex application where we can load images:

```auto
<?xml version="1.0" encoding="utf-8"?>
<mx:Application 
    xmlns:mx="http://www.adobe.com/2006/mxml" 
    xmlns:ns1="com.kirupa.*" 
    layout="absolute"
    width="400"
    height="400">
    
    <mx:Script>
        <![CDATA[
            import flash.net.navigateToURL;
        
            //[Bindable]
            private var _imageURL:String = "Img/img.png";
        ]]>
    </mx:Script>
    <mx:Canvas 
         left="5" right="5" top="5" bottom="10">
        
        <!--ImageViewer -->
        <mx:HRule x="6" y="345" width="380"/>
        <mx:HRule x="6" y="378" width="380"/>
        
        <mx:HSlider minimum="{ imgCanvas.bitmapScaleFactorMin }" 
                    maximum="{ imgCanvas.bitmapScaleFactorMax }" 
                    value ="{ imgCanvas.bitmapScaleFactor }"    
                    change ="{ imgCanvas.setZoom((event.currentTarget).value) }"                 
                    snapInterval=".001"
                    liveDragging="true" x="114" y="355"/>
        <mx:Button 
            styleName="ZoomOutButton"
            toolTip="Zoom In"
            click="{imgCanvas.zoom('in');}"
             x="279" y="351" cornerRadius="10" label="+" width="32"/>
        <mx:Button 
            styleName="ZoomInButton"
            toolTip="Zoom Out"
            click="{ imgCanvas.zoom('out'); }"            
             x="74" y="351" cornerRadius="10" label="-" width="32"/>
        <ns1:ImageViewer x="10" y="10" width="370" height="327" imageURL = "{_imageURL}" id="imgCanvas"/>
    </mx:Canvas>
</mx:Application>

```

but i need add functional where we can load anywhere images with local PC user, how i can modify this code?  
Please help me  
Thanks

P.S. imageURL = “{\_imageURL}” - if removed, will not work, but i need use ImageViewer without imageUR, - possible?
