i am using as2 and i want to embed a swf file into another swf project and have the embeded file play once the site is loaded can someone help please. ![]()
are you saying i should put this in the action
this.loadmovie("mymovie.swf",moviswf);
because i try that and this is the error i get
**Error** Scene=Scene 1, layer=otherswif, frame=1:Line 1: Statement must appear within on/onClipEvent handler
this.loadMovie("images.swf",moviswf);
Total ActionScript Errors: 1 Reported Errors: 1
should i create a new layer to place this function or is it ok to place it in the action on the layer with the moviswf? ![]()
do you want to load "mymovie.swf" when your main swf starts or when a button is clicked in your main swf?
if the former, assign your button an instance name (eg, btn) and attached to a frame (NOT the button or any other object), use:
btn.onRelease=function(){
moviswf.loadMovie("mymovie.swf"); // assuming moviswf is a movieclip that you want to replace with mymovie.swf. p.s. watch your spelling of moviswf. it's probable that should be movieswf
}
if the later, just use:
moviswf.loadMovie("mymovie.swf");
North America
Europe, Middle East and Africa
Asia Pacific