# Getting images to load - actionscript / path problem?

**URL:** <https://forum.kirupa.com/t/getting-images-to-load-actionscript-path-problem/177847>\
**Category:** Uncategorized\
**Created:** [February 5, 2006, 10:14pm UTC](https://forum.kirupa.com/t/getting-images-to-load-actionscript-path-problem/177847 "2006-02-05T22:14:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pixelate](https://avatars.discourse-cdn.com/v4/letter/p/ac8455/32.png) [@Pixelate](https://forum.kirupa.com/u/Pixelate)\
**Post date:** [February 5, 2006, 10:14pm UTC](https://forum.kirupa.com/t/getting-images-to-load-actionscript-path-problem/177847/1 "2006-02-05T22:14:18Z")

</div>

[http://developdesign.com/sites/aquaglide/maui\_main.htm](http://developdesign.com/sites/aquaglide/maui_main.htm)  
Two sections one loads SWFs, one isn’t loading JPGs

Loaded from main file ag\_master\_maui.swf in main\_mc

```auto
 loadMovie("maui_products/me_hiddenstrap_main.swf", "media_mc");

```

and

```auto
 loadMovie("maui_photos.swf", "media_mc");

```

click on ‘photo gallery’ - images load  
Folders: main folder - ag\_master\_maui.swf (main file) maui\_photos.swf (photogallery) , and subfolder “photogallery\_images” with SWFs

```auto
 var checkLoad = true;
var picture;
riders_mc.loadMovie("photogallery_images/me_pic1.swf");
whatToLoad = riders_mc;
for (i=1; i<11; i++) {
    nav_mc["thumbnail"+i+"_mc"].player = "photogallery_images/me_pic"+i+".swf";
    nav_mc["thumbnail"+i+"_mc"].pressed = false;
    nav_mc["thumbnail"+i+"_mc"].onPress = function() {
        if (this.pressed == false) {
            reset();
            this.pressed = true;
            picture = this.player;
            transition_mc.play("close");
            this.gotoAndStop("_mydown");
            // delete this.onRollOver;
            // delete this.onRollOut;
            this.useHandCursor = false;
        }
    };
    nav_mc["thumbnail"+i+"_mc"].onRollOver = function() {
        if (this.pressed == false) {
            this.gotoAndStop("_myover");
        }
    };
    nav_mc["thumbnail"+i+"_mc"].onRollOut = function() {
        if (this.pressed == false) {
            this.gotoAndStop("_myup");
        }
    };
}
function reset() {
    for (i=1; i<16; i++) {
        nav_mc["thumbnail"+i+"_mc"].pressed = false;
        nav_mc["thumbnail"+i+"_mc"].gotoAndStop("_myup");
        nav_mc["thumbnail"+i+"_mc"].useHandCursor = true;
    }
}
// LOADER FUNCTION
hintWin_mc.onEnterFrame = function() {
    if (checkLoad) {
        loadedbytes = whatToLoad.getBytesLoaded();
        totalbytes = whatToLoad.getBytesTotal();
        loadedkbytes = Math.round((loadedbytes/1000));
        totalkbytes = Math.round((totalbytes/1000));
        if (loadedkbytes == totalkbytes && totalkbytes != 0) {
            checkLoad = false;
            hintWin_mc._visible = false;
            transition_mc.gotoAndPlay("open");
        } else if (totalkbytes != 0) {
            perc = int(loadedkbytes*100/totalkbytes);
            hintWin(perc+"% LOADED");
        } else {
            hintWin_mc._visible = false;
        }
    }
};
// hint window
hintWin_mc._visible = false;
hintWin_mc.hintWin_txt.autoSize = true;
function hintWin(daText) {
    da = hintWin_mc;
    da.hintWin_txt.text = daText;
    da.bg_mc._width = da.hintWin_txt._width+15;
    da._visible = true;
}
stop()

```

=================  
click on ‘hiddenstrap’ - images not loading  
Folders: main folder - ag\_master\_maui.swf ( main file ), me\_hiddenstrap\_main.swf ( product file ) in subfolder “maui\_products” and 'maui\_product\_images" with JPGs in “maui\_products”  
Part of Actionscripting:

```auto
 var checkLoad = true;
var num_photos = 4;
photo_mc.loadMovie("maui_product_images/me_hiddenstrap1.jpg");
whatToLoad = photo_mc;
for (i=1; i<=num_photos; i++) {
    trace("here");
    nav_mc["btn"+i+"_mc"].photo_name = "maui_product_images/me_hiddenstrap"+i+".jpg";
    nav_mc["btn"+i+"_mc"].pressed = false;
    nav_mc["btn"+i+"_mc"].onPress = function() {
        if (this.pressed == false) {
            reset();
            this.pressed = true;
            photo_name = this.photo_name;
            transition_mc.gotoAndPlay("close");

```
