hhiiffii
November 30th, 2004, 06:06 PM
I am new to this and need help in creating correct paths in several swf files. I have given this a good deal of effort but can’t seem to be able to figure it out. I believe it has to do with _root in some of my code but everything I try like this or _parent doesn’t do it. I obviously don’t know what I am doing.
General site layout: (I think this is how it is supposed to work)
- Main Movie = jcproject.swf
- Button (photo_btn) in jcproject.swf loads photogalery.swf.
- photogalery.swf has Movie Clips (content) and (transition) within it.
- script attached to MC (content) starts MC (transition) playing at transition frame labelled “opening”.
- transition identifies slideshowa at frame 1 and loads it at frame 9 on transition timeline.
- buttons (b1-b4) in photogalery.swf load slideshowa – d.swf’s into MC (content) on photogalery timeline.
photo_btn code is:
on (release) {
gotoAndStop(89);
holder_mc.loadMovie("photogalery.swf");
}
photogalery frame 1 code is:
b1.onRelease = function() {
if (_root.section != "slideshowa.swf") {
_root.section = "slideshowa.swf";
_root.transition.gotoAndPlay("closing");
}
};
b2.onRelease = function() {
if (_root.section != "slideshowb.swf") {
_root.section = "slideshowb.swf";
_root.transition.gotoAndPlay("closing");
}
};
b3.onRelease = function() {
if (_root.section != "slideshowc.swf") {
_root.section = "slideshowc.swf";
_root.transition.gotoAndPlay("closing");
}
};
b4.onRelease = function() {
if (_root.section != "slideshowd.swf") {
_root.section = "slideshowd.swf";
_root.transition.gotoAndPlay("closing");
}
};
MC (content) code is:
onClipEvent (enterFrame) {
if (!loaded && this._url != _root._url) {
if (this.getBytesLoaded() == this.getBytesTotal()) {
loaded = true;
_root.transition.gotoAndPlay("opening");
}
}
}
MC (transition) frame 1 code is:
_root.section = "slideshowa.swf";
MC (transition) frame 9 code is:
loadMovie(_root.section, _root.content);
stop();
General site layout: (I think this is how it is supposed to work)
- Main Movie = jcproject.swf
- Button (photo_btn) in jcproject.swf loads photogalery.swf.
- photogalery.swf has Movie Clips (content) and (transition) within it.
- script attached to MC (content) starts MC (transition) playing at transition frame labelled “opening”.
- transition identifies slideshowa at frame 1 and loads it at frame 9 on transition timeline.
- buttons (b1-b4) in photogalery.swf load slideshowa – d.swf’s into MC (content) on photogalery timeline.
photo_btn code is:
on (release) {
gotoAndStop(89);
holder_mc.loadMovie("photogalery.swf");
}
photogalery frame 1 code is:
b1.onRelease = function() {
if (_root.section != "slideshowa.swf") {
_root.section = "slideshowa.swf";
_root.transition.gotoAndPlay("closing");
}
};
b2.onRelease = function() {
if (_root.section != "slideshowb.swf") {
_root.section = "slideshowb.swf";
_root.transition.gotoAndPlay("closing");
}
};
b3.onRelease = function() {
if (_root.section != "slideshowc.swf") {
_root.section = "slideshowc.swf";
_root.transition.gotoAndPlay("closing");
}
};
b4.onRelease = function() {
if (_root.section != "slideshowd.swf") {
_root.section = "slideshowd.swf";
_root.transition.gotoAndPlay("closing");
}
};
MC (content) code is:
onClipEvent (enterFrame) {
if (!loaded && this._url != _root._url) {
if (this.getBytesLoaded() == this.getBytesTotal()) {
loaded = true;
_root.transition.gotoAndPlay("opening");
}
}
}
MC (transition) frame 1 code is:
_root.section = "slideshowa.swf";
MC (transition) frame 9 code is:
loadMovie(_root.section, _root.content);
stop();