# Diffrent imagesize when loaded

**URL:** https://forum.kirupa.com/t/diffrent-imagesize-when-loaded/99162
**Category:** Uncategorized
**Created:** [January 15, 2004, 10:38am UTC](https://forum.kirupa.com/t/diffrent-imagesize-when-loaded/99162 "2004-01-15T10:38:03Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![monAmour](https://avatars.discourse-cdn.com/v4/letter/m/6a8cbe/32.png) [@monAmour](https://forum.kirupa.com/u/monAmour)
#### Post date: [January 15, 2004, 10:38am UTC](https://forum.kirupa.com/t/diffrent-imagesize-when-loaded/99162/1 "2004-01-15T10:38:03Z")

</div>

I’m using the following AS script to receive an image name from my XML based PHP script.  
But when the image is loaded it’s smaller than the real size in for example photoshop.  
Why is that so? and what can I do to prevent that from happening?

[AS]  
function loadImg(xmlName,myTarget) {  
if (xmlName != “”) {  
loadMovie(“[http://www.mikaelbjorkefall.com/dev/flash/filetree/kundbilder/](http://www.mikaelbjorkefall.com/dev/flash/filetree/kundbilder/)”+xmlName,myTarget);  
}  
}

function displayImg(imgNr) {  
xObj = new XML();  
xObj.ignoreWhite = true;  
xObj.onLoad = function(ok) {  
if (ok) {  
if (imgNr \>= 0 && imgNr \< this.firstChild.childNodes.length) {  
imgToLoad = this.firstChild.childNodes[imgNr].firstChild;  
loadImg(imgToLoad, \_root.container\_mc);  
}  
}  
}  
xObj.load(“[http://www.mikaelbjorkefall.com/dev/flash/filetree/getTree.php](http://www.mikaelbjorkefall.com/dev/flash/filetree/getTree.php)”);  
}

\_global.currNr = 0; // array index  
displayImg(\_global.currNr);  
stop();  
[/AS]
