PDA

View Full Version : layer issues



nounderscore
January 9th, 2008, 10:55 PM
hey there,
im new to this and i been doing this flash proj. i have to use a external swf file and load it into my main file. i used this code



onLoad = function() {
loadMovieNum("security.swf",1);
}

and it works however it is over my buttons and everything. anyone know a solutions

thanks in advance

heres the pic
http://img207.imageshack.us/img207/2980/eughfv2.th.jpg (http://img207.imageshack.us/my.php?image=eughfv2.jpg)

lewi-p
January 10th, 2008, 05:44 AM
Hi,

What I usually do is create an empty movieclip, and load my external one inside that. This is handy as I can just move the containerMC where ever I want and the external SWF always loads in.

Create an empty movieclip, drag it onto the stage and give it an instance name...something like 'containerMC'. Then the AS would be...


loadMovie("security.swf", containerMC);

Hope that helps!

zups22
January 10th, 2008, 09:16 AM
Try to add a higher depth? Or use .swapDepth(depth); function...

lewi-p
January 10th, 2008, 09:59 AM
Try to add a higher depth? Or use .swapDepth(depth); function...

That can get quite messy when you start to copy and paste new objects on the stage...every object is on its own depth so when those change you'll have to go back and change the code again.

lewi-p

nounderscore
January 10th, 2008, 07:29 PM
Hi,

What I usually do is create an empty movieclip, and load my external one inside that. This is handy as I can just move the containerMC where ever I want and the external SWF always loads in.

Create an empty movieclip, drag it onto the stage and give it an instance name...something like 'containerMC'. Then the AS would be...

ActionScript Code:

loadMovie("security.swf", containerMC);





Hope that helps!

and how would you do this with a roll over action of btn_mc0

lewi-p
January 10th, 2008, 08:23 PM
btn_mc0.onRollOver = function() {
loadMovie("security.swf", containerMC);
}

nounderscore
January 10th, 2008, 08:33 PM
thanks for the help. works like a charm