View Full Version : importing a swf in another swf

05-28-2009, 01:25 PM
i have a fla with few buttons and images
few button are in the centre of the page which when clicked shld display another swf

but i am not getting it
i have the following code
on (release) {

createEmptyMovieClip("mc_clip", 15);

mc_clip._height =318;
mc_clip._x = 500;
mc_clip._y = 300;

05-29-2009, 07:22 PM
Though not ideal code for several reasons (e.g. you should be defining your onRelease handler outside the button, you should be explicitly placing your newly created empty movie clip by calling it from another movie clip, and it's best to pass the target as a reference rather than a string) but it does work.

a) you have "services.swf" in the same directory as your parent movie, and
b) you open up a blank fla, create a simple button, and place the following actionscript into it

then it will successfully insert your services.swf into your new fla at coordinates (0,0).

Your problem then lies in either your layering of movie clips, a conflict with an onRelease handler specified elsewhere, your coordinates are off, or your services.swf isn't acting as you expect it to.