Problem Integrating 2 Tutorials

[left]Hi there![/left]
[left] [/left]

[left]First of all, I wanted to say thank you to all of you who post here regularly and provide tutorials for all us n00bs to benefit from. I have learned more about Flash MX from this site than I ever would have reading a book about the topic.[/left]
[left] [/left]

[left]I am in the process of creating a little personal site, and I am using a couple of tutorials found on this site to do so. The first is “The Complete Flash Site” tutorial ( and the second is “Creating a Photo Gallery” ([url=“”][/left]

[left] [/left]
[left]Anyway. I’ve successfully created both and they run fine on their own. My problem begins when I try to integrate the two. I’ve created the basic navigational structure for my site (i.e. “Home”, “Contact”, etc…) and it all works fine. Each page being linked too on the navigation is a published .swf file that gets loaded into the movie clip “contents” which is an instans of the main window. This works just great for all the buttons EXCEPT for “gallery”[/left]

[left]My gallery works fine on it’s own. The pictures show up as they are supposed to, and fade in and out, etc… The code (by suprabeener) for the gallery is as follows:[/left]

[left] [/left]
[left]//Code written by sbeener (suprabeener)[/left]
i wrote this code, but you can use and abuse it however you like.
the methods are defined in the order which they occur to make it
easier to understand.
// variables ------------------------------------------
// put the path to your pics here, include the slashes (ie. “pics/”)
// leave it blank if they’re in the same directory
this.pathToPics = “…/graphics/”;
// 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
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.fadeSpeed) { -= this.fadeSpeed;
} else {
MovieClip.prototype.loadPhoto = function() {
// specify the movieclip to load images into
var p =;
p._alpha = 0;
this.onEnterFrame = loadMeter;
MovieClip.prototype.loadMeter = function() {
var i, l, t;
l =;
t =;
if (t>0 && t == l) {
this.onEnterFrame = fadeIn;
} else {
MovieClip.prototype.fadeIn = function() {
if (<100-this.fadeSpeed) { += this.fadeSpeed;
} else { = 100;
this.onEnterFrame = null;
// Actions -----------------------------------------
// these aren’t necessary, just an example implementation
this.onKeyDown = function() {
if (Key.getCode() == Key.LEFT) {
} else if (Key.getCode() == Key.RIGHT) {

[left] [/left]

[left] [/left]
[left]When I click on my “gallery” button, instead of loading in the designated area (like the other links do), my gallery loads in the top left corner of the screen, and I only see part of the .swf page (the first .jpeg I am trying to display, without the navigation arrows, etc…). I also don’t see any of my “main” navigation, etc…[/left]
[left] [/left]

[left]The action code on the “gallery” button is the same as the others:[/left]

[left] [/left]
[left]on (release) {[/left]

[left] [/left]
[left]Any ideas what may be causing this? I’ve tried multiple workarounds, but none work very well. Any help is appreciated :)[/left]

[left] [/left]
[left]-Swedish Mike[/left]