naeluh00
April 8th, 2009, 04:44 PM
Hello,
I am using a scrolling thumnail bar to load external swf with transitions, I got to work using an earlier thread, by including the _parent property, however it loads the same swf everytime. I am really stumped.
heres the code i have actions layer first frame
currMovie = "swf2";
holder.loadMovie(currMovie+".swf");
panel.onRollOver = panelOver;
function panelOver() {
this.onEnterFrame = scrollPanel;
delete this.onRollOver;
}
var b = stroke.getBounds(_root);
function scrollPanel() {
if(_xmouse<b.xMin || _xmouse>b.xMax || _ymouse<b.yMin || _ymouse>b.yMax) {
this.onRollOver = panelOver;
delete this.onEnterFrame;
}
if(panel._x >= 300) {
panel._x = 300;
}
if(panel._x <= -2600) {
panel._x = -2600;
}
var xdist = _xmouse - 500;
panel._x += Math.round(-xdist / 7);
}
Here is the code I have on the 2 buttons
button1
on (release) {
if (_root.currMovie == undefined) {
_root.currMovie = "swf1";
_parent.holder.loadMovie("swf1.swf");
} else if (_root.currMovie != "swf1") {
if (_parent.panel.holder._currentframe >= _parent.holder.midframe) {
_root.currMovie = "swf1";
_parent.holder.play();
}
}
}
button2
on (release) {
if (_parent.currMovie == undefined) {
_parent.currMovie = "swf2";
_parent.holder.loadMovie("swf2.swf");
} else if (_parent.currMovie != "swf2") {
if (_parent.holder._currentframe >= _parent.holder.midframe) {
_parent.currMovie = "swf2";
_parent.holder.play();
}
}
}
the code i used for swfs was
midframe=25
stop()
_root.holder.loadMovie(_root.currMovie+".swf")
the source files are available at
http://www.periodcollection.com/source.rar
I am using a scrolling thumnail bar to load external swf with transitions, I got to work using an earlier thread, by including the _parent property, however it loads the same swf everytime. I am really stumped.
heres the code i have actions layer first frame
currMovie = "swf2";
holder.loadMovie(currMovie+".swf");
panel.onRollOver = panelOver;
function panelOver() {
this.onEnterFrame = scrollPanel;
delete this.onRollOver;
}
var b = stroke.getBounds(_root);
function scrollPanel() {
if(_xmouse<b.xMin || _xmouse>b.xMax || _ymouse<b.yMin || _ymouse>b.yMax) {
this.onRollOver = panelOver;
delete this.onEnterFrame;
}
if(panel._x >= 300) {
panel._x = 300;
}
if(panel._x <= -2600) {
panel._x = -2600;
}
var xdist = _xmouse - 500;
panel._x += Math.round(-xdist / 7);
}
Here is the code I have on the 2 buttons
button1
on (release) {
if (_root.currMovie == undefined) {
_root.currMovie = "swf1";
_parent.holder.loadMovie("swf1.swf");
} else if (_root.currMovie != "swf1") {
if (_parent.panel.holder._currentframe >= _parent.holder.midframe) {
_root.currMovie = "swf1";
_parent.holder.play();
}
}
}
button2
on (release) {
if (_parent.currMovie == undefined) {
_parent.currMovie = "swf2";
_parent.holder.loadMovie("swf2.swf");
} else if (_parent.currMovie != "swf2") {
if (_parent.holder._currentframe >= _parent.holder.midframe) {
_parent.currMovie = "swf2";
_parent.holder.play();
}
}
}
the code i used for swfs was
midframe=25
stop()
_root.holder.loadMovie(_root.currMovie+".swf")
the source files are available at
http://www.periodcollection.com/source.rar