我想把几个FLASH都放在一个FLASH里面播放,可是当我浏览页面的时候,FLASH有时候能自动播放,有时候要刷新才能播放
function intro_load()
{
intro_mc._x = 0;
intro_mc._y = 0;
intro_mc.loadMovie(swfPath + intro_file);
} // End of the function
function main_load()
{
main_loaded = true;
main_mc._x = 0;
main_mc._y = 0;
main_mc.loadMovie(swfPath + main_file);
} // End of the function
function init()
{
skip_all.onRelease = function ()
{
skip_action();
};
skip_mc.onRollOver = function ()
{
this.nextFrame();
};
skip_mc.onRollOut = function ()
{
this.prevFrame();
};
skip_mc.onRelease = function ()
{
skip_action();
};
foot_mc.loadMovie(swfPath + "footer.swf");
if (page == "main")
{
go_main();
}
else
{
go_intro();
} // end else if
if (this == _level0)
{
link_load();
} // end if
} // End of the function
function link_load()
{
xml_mc.loadMovie(swfPath + "xml_link.swf");
} // End of the function
function loading(target, mc_name, playTar)
{
var _loc2 = _level0.attachMovie("loadBar_mc", "loadBar_mc", _level0.getNextHighestDepth());
_loc2._visible = false;
_loc2.tar = target;
_loc2.playTar = playTar;
_loc2._x = Stage.width / 2;
_loc2._y = Stage.height / 2;
_loc2.bar.tw = 0;
_loc2.t = 0;
_loc2.onEnterFrame = function ()
{
if (this.t > 5)
{
this._visible = true;
}
else
{
++this.t;
this._visible = false;
} // end else if
this.tar_loaded = this.tar.getBytesLoaded();
this.tar_total = this.tar.getBytesTotal();
this.per = this.tar_loaded / this.tar_total;
this.per_txt.text = Math.floor(this.per * 100) + "%";
this.bar.tw = this.per * 180;
this.bar._width = this.bar._width + (this.bar.tw - this.bar._width) * 2.500000E-001;
this.name_txt.text = mc_name;
if (this.tar_loaded != undefined && this.tar_loaded >= this.tar_total)
{
trace (this.tar + "_loaded");
this.playTar.play();
delete this.onEnterFrame;
removeMovieClip (this);
} // end if
};
} // End of the function
stop ();
main_kind = Math.ceil(Math.random() * 2);
intro_file = "intro" + main_kind + ".swf";
main_file = "main" + main_kind + ".swf";
thisMc = this;
_global.mainOn = true;
System.useCodepage = true;
Stage.scaleMode = "noScale";
Stage.align = "LT";
Stage.showMenu = false;
url = this._url;
http = url.substr(0, 4);
trace (http);
if (http == "http")
{
_global.linkPath = "/";
_global.swfPath = linkPath + "flash/";
}
else
{
_global.linkPath = "";
_global.swfPath = "";
} // end else if
_global.xmlPath = swfPath + "link.xml";
_global.goURL = function (n)
{
trace (n);
if (linkOn == true)
{
var _loc1 = _level0.linkMc["link_" + n];
var _loc2 = _level0.linkMc["target_" + n];
if (_loc2 == "_blank")
{
trace ("_blank");
getURL(_loc1, _loc2);
}
else
{
getURL(_loc1, "");
} // end else if
trace (_loc1);
} // end if
};
_global.go_intro = function ()
{
trace ("Run_intro");
intro_load();
};
_global.go_main = function ()
{
trace ("Run_main");
main_load();
};
_global.intro_unload = function ()
{
trace ("Intro_unload");
delete intro_mc.onEnterFrame;
unloadMovie(_level0.intro_mc);
trace ("aaaaaaa_" + intro_mc);
};
_global.navi_load = function ()
{
navi_loaded = true;
navi_mc.loadMovie(swfPath + "navi.swf");
};
_global.skip_action = function ()
{
trace (intro_mc.skip_mc);
skip_all.enabled = false;
skip_all._visible = 0;
skip_mc.enabled = false;
skip_mc._visible = 0;
intro_mc.onEnterFrame = function ()
{
this.stop();
};
main_load();
};
this.onEnterFrame = function ()
{
var _loc3 = this.getBytesTotal();
var _loc2 = this.getBytesLoaded();
if (_loc2 >= _loc3 && _loc2 > 0)
{
this.onEnterFrame = null;
init();
} // end if
};
MovieClip.prototype.easingValue = function (target, now, speed)
{
return ((target - now) * speed);
};
MovieClip.prototype.ElasticValue = function (target, now, speed)
{
return ((target - now) * speed);
};
MovieClip.prototype.ptMoveY = function (mc, tY, speed)
{
mc._y = mc._y + easingValue(tY, mc._y, speed);
};
MovieClip.prototype.ptMoveX = function (mc, tX, speed)
{
mc._x = mc._x + easingValue(tX, mc._x, speed);
};
MovieClip.prototype.ptAlpha = function (mc, tA, speed)
{
mc._alpha = mc._alpha + easingValue(tA, mc._alpha, speed);
};
MovieClip.prototype.ptScaleW = function (mc, tW, speed)
{
mc._width = mc._width + easingValue(tW, mc._width, speed);
};
MovieClip.prototype.ptMoveYE = function (mc, tY, speed, elastic)
{
mc.vy = easingValue(tY, mc._y, speed) + mc.vy * elastic;
mc._y = mc._y + mc.vy;
};
MovieClip.prototype.ptScaleH = function (mc, tH, speed)
{
mc._height = mc._height + easingValue(tH, mc._height, speed);
};
MovieClip.prototype.goFrame = function (frame, fnc, en)
{
if (this.goFrameMc)
{
trace (this.goFrameMc);
delete this.goFrameMc;
}
else
{
goMc = this.createEmptyMovieClip("goFrameMc", this.getNextHighestDepth());
} // end else if
this.goFrameMc.onEnterFrame = function ()
{
if (this._parent._currentframe < frame)
{
this._parent.nextFrame();
}
else if (this._parent._currentframe > frame)
{
this._parent.prevFrame();
}
else
{
fnc(en);
delete this.onEnterFrame;
removeMovieClip (this);
} // end else if
};
};
帮忙看看,谢谢