PDA

View Full Version : loadMovie to be loaded in movie clip



flash_legend
August 20th, 2003, 06:37 PM
good day members

i have a question

i want to loadmovie using targets

exactly i want as follow
in the main scene i will drag a blank movie clip
this movie clip will loadmovie a movie with defferent width and hight
for examble
the index movie 800*600
the movie to be loaded is 500*300

is that possible
if it is can you please add the code

thanks for help

claudio
August 20th, 2003, 06:46 PM
Create a empty movie clip and give it an intance name of "container_mc" (no quotes). Now im assuming you want the external swf to be centered onstage. If so, place the container_mc on center of stage. Now place this code on main timeline:container_mc.loadMovie("yourmovie.swf");
_root.onEnterFrame = function() {
if (container_mc._width>0) {
delete this.onEnterFrame;
container_mc._x -= container_mc._width/2;
container_mc._y -= container_mc._height/2;
}
};

flash_legend
August 20th, 2003, 06:54 PM
thanks claudio

but the problem is that i dont have FLASHMX
i use flash 5
so please if possible to give me the code in flash 5
thanks alot

claudio
August 20th, 2003, 06:58 PM
Ahh ****! I always forget about that. :P
You want the external swf to be centered?

flash_legend
August 20th, 2003, 07:01 PM
no not to be centered
u know the movie clip i will drag it ,,, i will drag it the place i want so it can be loaded the movie

i hope you understand me
thank you

claudio
August 20th, 2003, 07:04 PM
Just use:container_mc.loadMovie("yourmovie.swf");
OrloadMovie("yourmovie.swf",container_mc);

flash_legend
August 20th, 2003, 07:07 PM
ok now
this code will be inside the movie clip
and i will drag it in the stage

this is i hope the final question

claudio
August 20th, 2003, 07:08 PM
Nope, place it on the main timeline

flash_legend
August 20th, 2003, 07:13 PM
ok now iam not sure how to explane to you
now on the movie clip can i add this link
===========
onClipEVent(load){
loadMovie("file.swf",_root.mc)
}
================

is this code will work

claudio
August 20th, 2003, 07:15 PM
Yes i think it will work

flash_legend
August 20th, 2003, 07:17 PM
i am sorry for the lot of questions
hope i am not getting you mad from that

thanks alot

claudio
August 20th, 2003, 07:19 PM
me mad? not at all :P
welcome ;)