# This coding using loading the image BUT?

**URL:** <https://forum.kirupa.com/t/this-coding-using-loading-the-image-but/210126>\
**Category:** Uncategorized\
**Created:** [December 15, 2006, 6:31am UTC](https://forum.kirupa.com/t/this-coding-using-loading-the-image-but/210126 "2006-12-15T06:31:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kpjothivelu](https://avatars.discourse-cdn.com/v4/letter/k/e8c25b/32.png) [@kpjothivelu](https://forum.kirupa.com/u/kpjothivelu)\
**Post date:** [December 15, 2006, 6:31am UTC](https://forum.kirupa.com/t/this-coding-using-loading-the-image-but/210126/1 "2006-12-15T06:31:54Z")

</div>

The Follwing coding was using help for click the button loading the image but my movie clips BUT i want default load image then before click buttons

PLEASE Modifing my coding…

imgbtn\_center.onRelease = function() {  
infoField.\_visible = true;  
startLoading(“All\_Images/gems\_images/Mc\_01/center1.jpg”);  
};  
imgbtn\_up.onRelease = function() {  
infoField.\_visible = true;  
startLoading(“All\_Images/gems\_images/Mc\_01/up1.jpg”);  
};  
imgbtn\_down.onRelease = function() {  
infoField.\_visible = true;  
startLoading(“All\_Images/gems\_images/Mc\_01/down1.jpg”);  
};  
imgbtn\_left.onRelease = function() {  
infoField.\_visible = true;  
startLoading(“All\_Images/gems\_images/Mc\_01/left1.jpg”);  
};  
imgbtn\_right.onRelease = function() {  
infoField.\_visible = true;  
startLoading(“All\_Images/gems\_images/Mc\_01/right1.jpg”);  
};

function startLoading(whichImage) {  
loadMovie(whichImage, “imageLoader”);  
\_root.onEnterFrame = function() {  
infoLoaded = imageLoader.getBytesLoaded();  
infoTotal = imageLoader.getBytesTotal();  
percentage = Math.floor(infoLoaded/infoTotal\*100);  
infoField.text = percentage+"%";  
if (percentage\>=100) {  
delete this.onEnterFrame;  
infoField.\_visible = false;  
}  
};  
}

please urgent help…:hair::hair::hair::hair::hair::hair::hair::hair::hair::hair::hair:
