# Help!

**URL:** <https://forum.kirupa.com/t/help/26172>\
**Category:** Uncategorized\
**Created:** [July 20, 2003, 3:43pm UTC](https://forum.kirupa.com/t/help/26172 "2003-07-20T15:43:10Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![samba\_7](https://avatars.discourse-cdn.com/v4/letter/s/bbce88/32.png) [@samba\_7](https://forum.kirupa.com/u/samba_7)\
**Post date:** [July 20, 2003, 3:43pm UTC](https://forum.kirupa.com/t/help/26172/1 "2003-07-20T15:43:10Z")

</div>

👽

I have a combination of Flash goodies.

1. My main site is index.swf - has 2 buttons, one of the buttons (Annuals) loads another flash file (annuals.swf) into the main \*.swf file.

2. My secondary flash file (I used tutorials "Photo Gallery " from the site) loads pictures (image0.jpg) from a folder named “annuals”. The gallery should have 10 images and 2 buttons to scroll forward and back.

The problem?

Open up “annuals.swf” on it’s own and the whole dynamic loading works fine. Now, open up the “index.swf”, press the “annuals” button and it only loads “image0.jpg” - The buttons don’t appear?

Please see the files attached… because it baffles me!

Thanks.  
Sam.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 20, 2003, 5:58pm UTC](https://forum.kirupa.com/t/help/26172/2 "2003-07-20T17:58:33Z")

</div>

I’m not gaining much from your attachment, there could be some thing wrong with your layers, or your action script. It would help us to help you if you supply the .fla’s.

Regards,  
Viru.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 20, 2003, 6:11pm UTC](https://forum.kirupa.com/t/help/26172/3 "2003-07-20T18:11:43Z")

</div>

Sorry guys… I was up late last night and early this morning…

Here are the ‘correct files’…

Sam.

[www.samblakeley.com/download/perennials.fla](http://www.samblakeley.com/download/perennials.fla)  
[www.samblakeley.com/download/index.fla](http://www.samblakeley.com/download/index.fla)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 20, 2003, 6:43pm UTC](https://forum.kirupa.com/t/help/26172/4 "2003-07-20T18:43:02Z")

</div>

I’m thinking that the problem is obviously the actionscript when loading the pictures…

Because the 2nd \*.swf file is… placed within the 1st and main file… the references to the second file might be conflicting?

Either way… it needs to be sorted… I will continue reading…

Sam.  
:bandit:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 20, 2003, 9:24pm UTC](https://forum.kirupa.com/t/help/26172/5 "2003-07-20T21:24:35Z")

</div>

Yes, its was the referal to \_root.  
I corrected the fla, find it attached.  
Regards,  
Viru.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 21, 2003, 1:00am UTC](https://forum.kirupa.com/t/help/26172/6 "2003-07-21T01:00:09Z")

</div>

So how much do i send for technical support? And to what account… ?

You should have a Donation/Paypal account… and everytime you help someone, they can offer to donate $2/3 - they all add up in the end.

👽

Sam.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 21, 2003, 6:54pm UTC](https://forum.kirupa.com/t/help/26172/7 "2003-07-21T18:54:16Z")

</div>

Solving the problem and helping others in need is all the reward that i need, lol.

Heres the code in the main timeline:

this.pathToPics = “annuals/”;  
// fill this array with your pics  
this.pArray = [“image0.jpg”, “image1.jpg”, “image2.jpg”, “image3.jpg”, “image4.jpg”, “image5.jpg”, “image6.jpg”, “image7.jpg”, “image8.jpg”, “image9.jpg”];  
this.fadeSpeed = 20;  
this.pIndex = 0;  
// MovieClip methods ----------------------------------  
// d=direction; should 1 or -1 but can be any number  
//loads an image automatically when you run animation  
photo.loadMovie(this.pathToPics+this.pArray[0]);  
MovieClip.prototype.changePhoto = function(d) {  
// make sure pIndex falls within pArray.length  
this.pIndex = (this.pIndex+d)%this.pArray.length;  
if (this.pIndex\<0) {  
this.pIndex += this.pArray.length;  
}  
this.onEnterFrame = fadeOut;  
};  
MovieClip.prototype.fadeOut = function() {  
if (this.photo.\_alpha\>this.fadeSpeed) {  
this.photo.\_alpha -= this.fadeSpeed;  
} else {  
this.loadPhoto();  
}  
};  
MovieClip.prototype.loadPhoto = function() {  
// specify the movieclip to load images into  
var p = photo;  
//------------------------------------------  
p.\_alpha = 0;  
p.loadMovie(this.pathToPics+this.pArray[this.pIndex]);  
this.onEnterFrame = loadMeter;  
};  
MovieClip.prototype.loadMeter = function() {  
var i, l, t;  
l = this.photo.getBytesLoaded();  
t = this.photo.getBytesTotal();  
if (t\>0 && t == l) {  
this.onEnterFrame = fadeIn;  
} else {  
trace(l/t);  
}  
};  
MovieClip.prototype.fadeIn = function() {  
if (this.photo.\_alpha\<100-this.fadeSpeed) {  
this.photo.\_alpha += this.fadeSpeed;  
} else {  
this.photo.\_alpha = 100;  
this.onEnterFrame = null;  
}  
};  
// Actions -----------------------------------------  
// these aren’t necessary, just an example implementation  
this.onKeyDown = function() {  
if (Key.getCode() == Key.LEFT) {  
this.changePhoto(-1);  
} else if (Key.getCode() == Key.RIGHT) {  
this.changePhoto(1);  
}  
};  
Key.addListener(this);  
stop();

And then the two buttons:

left button:

on (release) {  
changePhoto(-1);  
}

right button:

on (release) {  
changePhoto(1);  
}

Regards,  
V.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 22, 2003, 11:33am UTC](https://forum.kirupa.com/t/help/26172/8 "2003-07-22T11:33:01Z")

</div>

:rd:

Thank You humble Sir! Much appreciated.

Sam.

[http://www.samblakeley.com/samba](http://www.samblakeley.com/samba)

(Rainbow Greenhouse in the making)
